Skip to content

Commit bc76619

Browse files
authored
update
1 parent a897156 commit bc76619

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exomeCov.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
function back_ground_process () {
1414
# fetch regions of interest from BAM files to speed up the process
15-
samtools view -bh /mnt/isilon/maris_lab/target_nbl_ngs/CellLineExome/aligned_2019/${1}.sorted.reheader.bam -L allExons.bed > ROI_bams/${1}_regionofinterest.bam
15+
samtools view -bh /path/to/bam/${1}.sorted.reheader.bam -L allExons.bed > ROI_bams/${1}_regionofinterest.bam
1616

1717
# Calculate average exome coverage
1818
samtools depth -b allExons.bed ROI_bams/${1}_regionofinterest.bam | awk '{sum+=$3} END { print "Average = ",sum/NR}' >> ${1}_samtools_exomCoverage.txt
1919

2020
# output the mean depth of coverage for each region in the BED file
2121
bedtools coverage -a allExons.bed -b ROI_bams/${1}_regionofinterest.bam -mean >> ${1}_bedtools_exomCoverage.txt
22-
#wk '{sum+=$4} END { print "'$1' Average = ",sum/NR}' ${1}_bedtools_exomCoverage.txt >> exomeCov_bedtools.txt
22+
awk '{sum+=$4} END { print "'$1' Average = ",sum/NR}' ${1}_bedtools_exomCoverage.txt >> exomeCov_bedtools.txt
2323
echo "${1} done!"
2424
}
2525

@@ -38,4 +38,4 @@ done
3838
# wait until all child processes are done
3939
wait
4040

41-
echo "All background processes are done!"
41+
echo "All background processes are done!"

0 commit comments

Comments
 (0)