View Single Post
Old 03-28-2011, 12:36 AM   #5
jkbonfield
Senior Member
 
Location: Cambridge, UK

Join Date: Jul 2008
Posts: 146
Default

Quote:
Originally Posted by query View Post
Are there any tools out there that would convert a SAM/BAM file to a gapped multiple sequence alignment of the reads and the reference? I am looking for a text formatted output (like fasta) of this rather than a vizualization tool.
I had some code that performed a column wise "samtools pileup", so insertions would get their own rows in the output rather than shoehorning them into the same line via +seq. It needs some tidying up as it's no longer so standalone (it's part of my BAM reading code in Gap5), but could be made so again if it's useful.

As others have pointed out this is only half the problem though. It's not going to get your data aligned better and put P CIGAR operators in. I'm not aware of tools to automatically do this, but I'm sure some must exist.
jkbonfield is offline   Reply With Quote