I have annotated a number of RNA reads with the originating gene, and keep them in a bam file.
Now I want to extract a simple alignment for each gene from this sam file. I don't care about genomic location, quality of read or any other data. Only the aligned sequences corresponding to that gene. One alignment file (something like .aln) for each gene.
Any ideas on how to do that?