Convert BAM files to GENOMEDATA files
0
0
Entering edit mode
3.6 years ago
Armand • 0

How can I convert BAM data directly to GENOMEDATA ? I guess I could convert BAM data to FASTA data and then FASTA data to GENOMEDATA but I'm afraid that it would greatly increase the conversion time or number of potential bugs.

[Edit : context

I'm trying to use SEGWAY (https://segway.hoffmanlab.org/ , https://www.nature.com/articles/nmeth.1937), an algorithm that requires GENOMEDATA (https://hoffmanlab.org/proj/genomedata/) files as its input. The files I'm trying to process are BAM (https://samtools.github.io/hts-specs/SAMv1.pdf) ones so I need to convert them before I can use SEGWAY.]

Thanks,

Armand

file format • 691 views
2
Entering edit mode

It would be helpful if you added some context and a couple of links to show us what exactly you're trying to do. I have no idea what GENOMEDATA format is, and given that people that volunteer here have limited time, they shouldn't have to figure out for themselves what you mean - it would just mean fewer responses on your post.

Are you speaking of this perhaps?: https://hoffmanlab.org/proj/genomedata/

How is the R tag relevant here?

2
Entering edit mode

Like Ram, I do not have experience with genomedata, but from glimpsing at its documentation, I'm not sure whether a direct conversion will be possible as they say:

Genomedata is a format for efficient storage of multiple tracks of numeric data anchored to a genome.

In the publication, the authors claim that genomedata is a superior storage format to begGraph and wiggle, which fit the description (basically tables where rows correspond to individual genome bins with a given score, usually a coverage score). That coverage score can be calculated many different ways (e.g., you could be normalizing for sequencing depth and it depends on the size of the bins), hence my assumption that going from BAM to genomedata will involve some sorts of calculations. Based on this post in the genomedata mailing list it seems you might be able to use bedtools bamtobed to turn your BAM file into a BED file that you can use together with a FASTA file. (That's a long-winded way of me recommending to ask your question on that mailing list, too.)