SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   When viewing a BAM, can you specify regions of a certain coverage? (http://seqanswers.com/forums/showthread.php?t=16701)

oiiio 01-09-2012 11:32 AM

When viewing a BAM, can you specify regions of a certain coverage?
 
Does anyone know of a tool to view only regions of a BAM with specific coverage? Ideally, it would constrain the coverage using either a max or min

swbarnes2 01-09-2012 11:39 AM

You could make a pileup, which would have the depth at every point. Then some kind of script to make a .bed file of all those windows you wanted, and you can apply the .bed file to the .bam with samtools view to get a .bam just at those coordinates.

You could probably use BEDTools to do much of that. I'm not sure there's an easier way.

Jim Robinson 01-10-2012 05:43 AM

Elaborating on this just a little... After creating the bed you can load both the bed and the BAM into IGV. Then click on the name panel over the bed track, and use ctrl-f to skip from one region to the next.

mgogol 01-10-2012 06:59 AM

I think you could use genomeCoverageBed from bedtools for the first step. I know you could do the second part in R quite easily, but it would take me awhile to figure that one out. Once you have a bed file you could use intersectBed to get a bam just with those coords.


All times are GMT -8. The time now is 07:59 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.