Question: Split BAM by average coverage
gravatar for h.mon
6.3 years ago by
h.mon32k wrote:

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.

bam assembly genome • 1.8k views
ADD COMMENTlink modified 6.3 years ago by Pierre Lindenbaum133k • written 6.3 years ago by h.mon32k
gravatar for Pierre Lindenbaum
6.3 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum133k wrote:

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 -Lselect.bed old.bam'


ADD COMMENTlink written 6.3 years ago by Pierre Lindenbaum133k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2410 users visited in the last hour