include sequence in bedToBam conversion

56 views
Skip to first unread message

sean

unread,
Feb 23, 2012, 2:50:48 AM2/23/12
to bedtools-discuss
Hi Aaron,

The bedToBam converter is great. Any chance you are planing a version
that can grab user defined sequence for the interval and include it in
the BAM (in the spirit of fastaFromBed, for example)? It would be
really useful.

Cheers,

Sean

Aaron Quinlan

unread,
Feb 23, 2012, 7:55:36 AM2/23/12
to bedtools...@googlegroups.com
Hi Sean,

Do you mean extracting sequence from a FASTA file based on BED coordinates and then using that sequence as the SEQ in the resulting BAM entry? Or do you mean that the BED file would have an extra column that would be used as the sequence?

Best,
Aaron

Ivan Gregoretti

unread,
Feb 23, 2012, 10:02:26 AM2/23/12
to bedtools...@googlegroups.com
I think that extracting sequences from a FASTA based on BED would have
much frequent application. Let's wait and see what Sean had in mind.

Ivan

Ivan Gregoretti, PhD

Aaron Quinlan

unread,
Mar 5, 2012, 9:42:37 AM3/5/12
to bedtools...@googlegroups.com
Hi Sean,

Do you have any further insight on what you were envisioning here?

Best,
Aaron

On Feb 23, 2012, at 2:50 AM, sean wrote:

sean

unread,
Mar 12, 2012, 3:00:16 PM3/12/12
to bedtools-discuss
Hi Aaron,

Sorry about the delay.

Your first guess was right.

I mean extracting sequence from a FASTA file based on BED coordinates
and then using that sequence as the SEQ in the resulting BAM.

The bedToBam converter is great but the problem is that some programs
have trouble dealing with the blank seq field. For example, samtools
tview is great for quickly going over a bam file and bedToBam can
allow you to input gene annotations into it which it otherwise has no
support for (and merge the annotations to your data BAM as a separate
read group). But the program gets confused by the blank seq field and
it looks horrible (although I think the alignments are right).

For some uses putting in the seq info might defeat the purpose of
keeping the file more compact than a GFF (I'm not sure).

Have you tried the BAM annotations with Gbrowse?

In general, I think their needs to be an alternative to the GFF format
for holding annotations. A modified BAM format might do the trick?
Maybe it would need some additional fields though?

Best Regards,

Sean

Aaron Quinlan

unread,
Mar 27, 2012, 1:12:04 PM3/27/12
to bedtools...@googlegroups.com
Hi Sean,

I will try to add this for the next release.

Best,
Aaron

Reply all
Reply to author
Forward
0 new messages