FastQC to check the quality of the reads

Can you use FastQC on command line?

The tool has a Graphical User Interface, making it easy to use for people who don’t know command line but you can also use it on command line. The command to create a report for each FASTQ file in a folder will look like this:

#!/bin/bash
#save this file as scriptNGSQC.sh and make it executable using chmod 755
#run the file by typing ./scriptNGSQC.sh from within the folder where you saved the script

#create variables representing the folders where the tools and the data files are located
#you will have to adjust the paths so that they fit your file system
#folder where the tools are installed
toolsfolder=”/opt/”

#folder with the FASTQ files
inputfolder=”/home/VIBTraining1/inputs/”

#folder where results will be stored
outputfolder=”/home/VIBTraining1/results/”

#create subfolders in output folder
#folder to store FastQC reports
mkdir ${outputfolder}fastqc/

#loop over all FASTQ files in the folder with the input files
for file in ${inputfolder}*.fastq
do
     echo “creating FastQC report for” $file
     #create FastQC reports for every FASTQ file (can be opened in your browser)
     #you might need to adjust the path if you use a different FastQC version
     ${toolsfolder}fastqc-0.11.9/fastqc -f fastq -o ${outputfolder}fastqc/ ${file}
done