Step 1 Quality Control (FastQC & MultiQC) - alyrcoun/EPP622-2026-SNPCalling GitHub Wiki
Lab Notebook Wiki - Test2 SNP Calling
Your Name: Alyssa Counce
Server: Sphinx
Repository URL: https://github.com/alyrcoun/EPP622-2026-SNPCalling/
Setup
NOTE: Make sure you have miniconda downloaded and activate snps.
conda activate snps
Navigate to project directory
cd /lustre/isaac24/proj/UTK0505/alyrcoun/epp_622
Create directory for test2.
mkdir test2
cd test2
Objective
Running FastQC to assess quality of the raw data for samples A, B, C, D.
# Create directories for each analysis to keep raw data and separate analyses organized.
mkdir -p test2_analyses/fastqc_results \
test2_analyses/fastp_results \
test2_analyses/bwamem2_results \
test2_analyses/bcftools_results \
test2_analyses/eval
# Navigate into FastQC direcory
cd test2_analyses/fastqc_results
# Symbolically link the raw FASTQ files. This saves disk space and prevents accidentally editing or deleting OG raw data.
nano link_data.sh
for file in /lustre/isaac24/proj/UTK0505/test2/reads/*fastq.gz
do
echo $file
ln -s $file .
done
Now run it and check if it worked.
bash link_data.sh
ls -la
Automate running FastQC on all read files without typing commands.
# Loop over each compressed FASTQ file in the directory. Run FastQC to compute per-base quality scores, GC content, and adapter content (fastqc -t 2 allocates 2 multi-threading threads to speed up execution!)
for file in *fastq.gz; do
fastqc -t 2 "$file"
done
OR Save time using MultiQC. It aggregates all individual FastQC HTML and zip output reports into a single summary report. (multiqc -o outputs the combined report into the current directory)
multiqc -o .
MultiQC gives a rounded number for total reads and does not report total bases per sample. To find out those numbers use this:
for f in *.fastq.gz; do
echo -ne "$f\t"
zcat "$f" | awk 'NR%4==2{r++; b+=length($0)} END{printf "%d\t%d\t%.1f\n", r, b, b/r}'
done | column -t
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/alyrcoun/epp_622/test2/test2_analyses/fastqc_results/multiqc_report.html
scp [email protected]://lustre/isaac24/proj/UTK0505/alyrcoun/epp_622/test2/test2_analyses/fastqc_results/multiqc_report.html .
One sample has adapter and polyG issues, one sample has low quality, one sample has low coverage, and one is problem free. Label each sample below with its quality issues. For each sample, report R1 + R2.
| Sample | Total reads | Total bases | Quality issues? |
|---|---|---|---|
| A | 804650+804650 | 120697500+120697500 | None: Q-score > 30, normal GC 38% |
| B | 160930+160930 | 24139500+24139500 | Low coverage: 20% of standard read count |
| C | 804650+804650 | 120697500+120697500 | Adapter contamination (~35%) and PolyG (GC shift to 50-55%) |
| D | 804650 +804650 | 120697500+120697500 | Low Quality (Phred score drops below 15 toward 3' ends) |