Can read count tables be converted to bam format files?
1
0
Entering edit mode
9.8 years ago
Sakti ▴ 530

Once again, I consult the Biostars masters knowledge

I was wondering if raw read count tables such as:

chr  start end   readcount
chrX 16635 83737 9999

can be converted to bam file formatting. I know that bam files can be used to obtain read counts per selected features, so I was curious whether the other conversion was possible to use with diverse bioinformatic analysis pipelines.

Thanks!!

alignment bam • 2.4k views
ADD COMMENT
1
Entering edit mode
9.8 years ago

Yes and no. Yes, you could hold that information in a BAM file. However, really no, since it wouldn't really be useful for anything beyond storing those exact counts (i.e., you couldn't reliably do anything else with the file). Going from alignments to counts is a lossy process, so going backward ends up creating files that only bear the vaguest of resemblances to the originals.

ADD COMMENT
0
Entering edit mode

Thanks again Devon. What it's not clear to me is how to even translate read count tables to bam format if you don't have the original fastq or fasta files to produce the alignments. Thanks!

ADD REPLY
0
Entering edit mode

The simplest way would be to make fake reads containing Ns. They would start at the start position (e.g., chrX:16635) and their length would be whatever the regions length was (so about 67kb, in your example). For the line you showed, you'd just make 9999 such fake alignments.

Like I said, you can do it, but it's really not worthwhile. If you need a BAM file later then you should really just keep the BAM file produced in the alignment step.

ADD REPLY
0
Entering edit mode

Again thanks a lot Devon, I now see what you mean, and it is really not worthwhile. Best!

ADD REPLY

Login before adding your answer.

Traffic: 1723 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6