Step 1: Quality Control (FastQC MultiQC) - rsalani13/EPP622-2026-SNPCalling GitHub Wiki
Commands
cd analyses
mkdir fastqc1
cd fastqc1
#symboloically link reads files
ln -s ../../rawdata/reads/
#make bash script
nano forloop.sh
-----------------------------------
for file in reads/*.fastq.gz
do
fastqc -t 2 $file
done
-----------------------------------
#run the script
Bash forloop.sh
#this runs for a while then outputs a bunch of fastq files!
#run multiqc report
Multiqc .
MultiQC gives a rounded number for total reads and does not report total bases per sample. To find out those numbers...
nano multiqc_analysis.sh
-----------------------------------------------------
for f in reads/*.fastq.gz; do
echo -ne "$f\t"
zcat "$f" | awk 'NR%4==2{r++; b+=length()} END{printf "%d\t%d\t%.1f\n",$
done | column -t
-----------------------------------------------------
bash multiqc_analysis.sh
This gives the total reads, then the total bases, then the average read length for each file.
Results
MultiQC report path and name: /lustre/isaac24/proj/UTK0505/rsalani/exam2/analyses/fastqc1/multiqc_report.html
| Sample | Total reads | Total bases | Quality issues? |
|---|---|---|---|
| A (R1, R2) | 1609300 | 241395000 | none |
| B (R1, R2) | 321860 | 48279000 | low coverage |
| C (R1, R2) | 1609300 | 241395000 | polyG |
| D (R1, R2) | 1609300 | 241395000 | low quality |