Skip to main content

STEP 7: Quality Checks

Quality checks (QC) and downstream analysis ensure your ChIP-seq/ATAC-seq data is high quality and biologically meaningful.

Quality Metrics

There are a number of way to check the quality of data post processing, a QC report can include:

  1. Alignment rate
  2. Duplication rate
  3. Number of peaks called | FRiP score
  4. Insert Size Distribution (ATAC-seq)
  5. Correlation between replicates

MultiQC

You can also use tools like MultiQC to make a combined report across multiple samples. This can be run after you have completed the full analysis pipeline to get an overview of all your samples.

MultiQC

It is availible on the CCB under the python module:

module load python-cbrg
multiqc --help

If you have a project folder with each sample in a subfolder, with final concatenated fastq.gz you can run multiqc like this:

multiqc --ignore-symlinks /path/to/project_folder/ 

This will create a html report in the current working directory called multiqc_report.html. You can view this file by downloading it or if you’re using VSCode with the Live Preview extension right click and select Show Preview.

1. Alignment Statistics

Check alignment rates from your aligner (Bowtie2) output, if running the pipeline on the slurm cluster you can find the log files in the .err job file generated.:

# Bowtie2 alignment rate
# Look for "overall alignment rate" in the log
# Good: >70% for ChIP-seq, >80% for ATAC-seq

2. Library Complexity

Assess PCR duplication rates:

module load picard

picard MarkDuplicates \
  I=sample.bam \
  O=sample_dedup.bam \
  M=dup_metrics.txt

Good duplication rates: - <20% for ATAC-seq - <50% for ChIP-seq

3. FRiP Score (Fraction of Reads in Peaks)

Calculate what percentage of reads fall within called peaks:

# Count total reads
total_reads=$(samtools view -c sample.bam)

# Count reads in peaks
reads_in_peaks=$(bedtools intersect -a sample.bam -b peaks.bed -u | samtools view -c)

# Calculate FRiP
frip=$(echo "scale=3; $reads_in_peaks / $total_reads" | bc)
echo "FRiP score: $frip"

FRiP Score Guidelines:

  • Excellent: >20%
  • Good: 5-20%
  • Acceptable: 1-5%
  • Poor: <1%

4. Insert Size Distribution (ATAC-seq)

ATAC-seq should show nucleosomal pattern:

picard CollectInsertSizeMetrics \
  I=sample.bam \
  O=insert_metrics.txt \
  H=insert_histogram.pdf

Expected pattern:

  • Peak at <100bp (nucleosome-free)
  • Peak at ~200bp (mono-nucleosome)
  • Peak at ~400bp (di-nucleosome)

5. Replicate Concordance

Correlation Between Replicates

When performing ChIP-seq/ATAC-seq with replicates, assess for correlation between the replicates as a quality check. I would highly recommend looking over the deepTools documentation for more details on these tools and their parameters.

multiBamSummary bins \
    --bamfiles Sample_rep1.bam Sample_rep2.bam Sample_rep3.bam Input.bam \
    --labels Sample_rep1 Sample_rep2 Sample_rep3 Input \
    --outFileName Sample.correlation.summary.npz \
    --ignoreDuplicates \
    --numberOfProcessors 40 ;

plotCorrelation --corData Sample.correlation.summary.npz \
    --corMethod pearson \
    --whatToPlot heatmap \
    --removeOutliers --skipZeros --plotNumbers \
    --plotFile summary_correlation_pearson.pdf \
    --labels Sample_rep1 Sample_rep2 Sample_rep3 Input \
    --plotTitle "Pearson Correlation of Average Scores Per bin" ;

plotPCA --corData Sample.correlation.summary.npz \
    --plotFile Samples_pcaplot.png \
    --plotTitle "PCA of read counts" \
    --labels Sample_rep1 Sample_rep2 Sample_rep3 Input ;

Good correlation: Pearson r > 0.9

Peak Overlap Between Replicates

You would expext that for good quality replicates that there would be a high percentage of peaks which overlap between replicates. For peak calling see Peak Calling.

# Using bedtools
bedtools intersect -a rep1_peaks.bed -b rep2_peaks.bed | wc -l

Good overlap: >60% of peaks shared between replicates

Troubleshooting

Low FRiP score?

  • Check antibody quality (ChIP-seq)
  • Check library quality
  • May need deeper sequencing

Poor replicate correlation?

  • Check for batch effects
  • Review experimental protocol
  • Consider removing outlier replicates

Few peaks called?

  • Adjust MACS2 parameters (try less stringent cutoff)
  • Check if control/input is over-normalized
  • Verify sufficient sequencing depth