SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting unmapped reads from BAM using Samtools? Lspoor Bioinformatics 17 08-25-2013 12:22 AM
Extracting (Slicing) a BAM file ashkot Bioinformatics 4 12-13-2011 11:02 AM
How to get mapped reads ID from bam files using samtools? fabrice Bioinformatics 15 08-20-2011 06:03 PM
Extracting base coverage and quality values from BAM files unagaswamy Bioinformatics 9 11-11-2010 06:55 AM
Extracting unique reads from a .ma or .bam file? JohnK SOLiD 14 06-04-2010 12:32 AM

Reply
 
Thread Tools
Old 10-12-2011, 12:38 PM   #1
alpesh
Junior Member
 
Location: Iowa

Join Date: Oct 2011
Posts: 7
Default Extracting reads from BAM files

Hi All,

I am new to samtools and some help will be awesome.

I have BAM files and I have a long list of loci which I want to extract reads for. Basically I want to pass a lot a loci in the regions parameter of samtools view.
I am guessing its a 1 liner code in samtools?

Thanks,
Alpesh
alpesh is offline   Reply With Quote
Old 10-12-2011, 02:59 PM   #2
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

Use BEDTools intersectBed. It can take a bed file of your regions, and a bam file, and return a bam file filtered for only reads that cross one of your reigons.
swbarnes2 is offline   Reply With Quote
Reply

Tags
bam files, samtools

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




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


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO