Add FRiP score
total reads
total_reads=$(samtools view -c ${sample}.bam)
reads in peaks
reads_in_peaks=$(bedtools sort -i ${sample}_peaks.narrowPeak
| bedtools merge -i stdin | bedtools intersect -u -nonamecheck
-a ${sample}.bam -b stdin -ubam | samtools view -c)
FRiP score
FRiP=$(awk "BEGIN {print "${reads_in_peaks}"/"${total_reads}"}")
Do this step after calling peaks; add in multiQC report
Colored cutoff: The fraction of reads in called peak regions (FRiP score) should be >0.3, though values greater than 0.2 are acceptable. For EN-TEx tissues (ENCODE GTEx tissue sample), FRiP scores will not be enforced as QC metric. TSS enrichment remains in place as a key signal to noise measure.