Skip to content

Commit

Permalink
Fix fripReads
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Sep 14, 2022
1 parent 419b6c5 commit 1fe7064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Adapting_new_script_for_computing_cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ execute() {
mapFrac=$(printf "%.4f" $(echo $map / 100 | bc -l))
dedup=$(printf "%.4f" $(grep -Po 'Unknown Library.*' dedup/${id}_dedupMetric.txt | awk '{print $10}'))
filtered=$(expr $(samtools view -c dedup/${id}_dedup.bam) / 2)
ripReads=$(expr $(bedtools intersect -a dedup/${id}_dedup.bam -b dedup_peaks/${id}_peaks.narrowPeak -u -ubam | samtools view -c) / 2)
fripReads=$(expr $(bedtools intersect -a dedup/${id}_dedup.bam -b dedup_peaks/${id}_peaks.narrowPeak -u -ubam | samtools view -c) / 2)
FRiP=$(printf "%.4f" $(echo $fripReads / $filtered | bc -l))
peaks=$(expr $(wc -l <"dedup_peaks/${id}_peaks.narrowPeak") - 1)
echo -e "$id\t$fragments\t$filtered\t$mapFrac\t$dedup\t$FRiP\t$peaks" >> cnt_gata_qc_metrics.txt
Expand Down

0 comments on commit 1fe7064

Please sign in to comment.