Go Back   SEQanswers > Bioinformatics > Bioinformatics

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reverse engineering BAM files: BAM -> FASTQ gene coder Bioinformatics 3 01-03-2012 03:42 PM
NEw to Chip-seq and have .bam/.sam/.bam.bai files... then what? NGS newbie Bioinformatics 11 05-25-2011 08:48 AM
PubMed: Genomic SELEX: a discovery tool for genomic aptamers. Newsbot! Literature Watch 0 02-18-2011 12:00 PM
PubMed: Hybrid selection of discrete genomic intervals on custom-designed microarrays Newsbot! Literature Watch 0 05-30-2009 06:07 AM
PubMed: Targeted next-generation sequencing by specific capture of multiple genomic l Newsbot! Literature Watch 3 12-02-2008 07:11 PM

Thread Tools
Old 09-14-2011, 07:12 AM   #1
Alex Coventry
Junior Member
Location: Ithaca, NY

Join Date: Oct 2009
Posts: 5
Default Tool which splits bam files into specific genomic intervals?

I think I see how to use bamtools to split bam files into individual chromosomes. Is there a tool which will take a list of subchromosomal genomic intervals, and split the reads in a bam file by those intervals? I know how to do this with samtools, but having to resort and reindex each of the resulting bamfiles is slow...
Alex Coventry is offline   Reply With Quote
Old 09-14-2011, 09:23 AM   #2
Senior Member
Location: San Diego

Join Date: May 2008
Posts: 912

BEDTools can take a .bed file and a .bam file and return a .bam file consisting of reads that intersect the regions in the .bed file.

So you'd probably have to run BEDTools once for every region, but you don't have to index the .bam file.
swbarnes2 is offline   Reply With Quote
Old 09-15-2011, 03:23 AM   #3
Peter (Biopython etc)
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543

Has anyone done the reverse?

I am thinking of a SAM/BAM file for FASTA set of contigs, plus and a FASTA set of scaffolded supercontigs consisting of the contigs joined with runs of NNNNN (perhaps in some cases with a contig reverse complemented). I would like to be able to produce a new SAM/BAM file against the scaffolded supercontigs - where rather than remapping the reads, the existing mapping is reused by editing the reference names and offsets (with more care needed when a contig has been reverse complemented). Clearly it isn't quite as straightforward as that once you have paired end data, since when read pairs mapped to two different contigs are now placed on the same supercontig, you may want to update their FLAG to say they are now properly mapped.
maubp is offline   Reply With Quote

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 10:59 PM.

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