This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Genomic Bam To Transcriptome Bam

Hi,

I was looking for a tool to convert a bam file in genomic coordinates to transcriptomic coordinates (using a GTF reference). Is there a fast way to do this for large bam files? Such tool would filter out reads that do not map to any transcript.

Let me know if you have any suggestions,

Thanks,
Daniel F.

bam samtools

You'll probably get the best answer by simply mapping your reads to the transcripts directly if having transcript-based BAM files is really your goal. If, instead, you want read counts for your genomic BAM files, that can be done with several tools. If the latter is what you want, then perhaps you can clarify your question.

Hi Sean, thanks. The problem is that if I map directly to the transcripts I loose the ability to build new transcripts, find splice junctions, etc. Also in many cases I am dealing with totalRNA experiments so mapping only to transcripts I loose many reads. Let us say I already mapped all my data and just want to transform coordinates, there is no way to do this? Maybe you are right and it does not make much sense that's why it does not exist...

3 answers

For others finding this thread, mudskipper is designed to do exactly what you are asking. It takes genomic BAM, gtf, and outputs transcriptomic BAM with all the alignments translated into transcriptomic coordinates. It will output multi-alignments in case genomic mapping overlaps multiple transcripts.

I believe that you may use bedtools intersect:

http://bedtools.readthedocs.org/en/latest/content/tools/intersect.html

I believe you want this tool sam-xlate from UBU: https://github.com/mozack/ubu/wiki

It doesn't take a GTF, but rather a BED file in refFlat (I believe) format.

Log in to answer this question.