Split BAM by average coverage
1
0
Entering edit mode
9.5 years ago
h.mon 35k

I have a BAM file of a microbial genome assembly, performed on CLC (assembly+read mappings). The assembly has some contigs with extremelly low or high coverages - about ten-fold bellow or above the "average" average coverage. Is there a easy way to extract contigs based on average coverage thresholdds? I want to have a closer look and possibly reassemble those contigs.

For example, one contigs with much above average coverage seems to be rRNA genes, and there seems to be a lot of SNPs there. I want to reassemble these reads with more stringent settings and see if I have multiple copies of the rRNA genes.

Assembly BAM genome • 2.3k views
ADD COMMENT
2
Entering edit mode
9.5 years ago

Create a BED of your regions of interest and use, for example, GATK DepthOfCoverage to get the mean depth of those regions.

Create a new BED file with the filtered regions

Create a new BAM with samtools view -o new.bam -L select.bed old.bam

ADD COMMENT

Login before adding your answer.

Traffic: 2739 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6