This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to convert .bam from unpadded to padded representation?

I have an aligned .bam file and a reference .fasta file. I'd like to convert the .bam and .fasta from an unpadded representation to a padded one (with 'padded' and 'unpadded' as defined in the SAM spec). Are there tools that can do this either across the entire .bam and reference sequence, or alternatively just for reads that overlap a particular region?

Ps. I know samtools had a pad2unpad (aka. depad) tool at one point. Perhaps there is something similar for going the opposite direction?

alignment sam bam

I don't think I've ever actually seen a padded file. My guess is that the padding concept never caught on (it's convenient for visualizations, but things like samtools tview and tablet don't actually require the P operations).

visualization is actually why I need this. satmools tview must be doing it on the fly for each viewport. I looked at the source code but didn't seen an obvious place where that logic was localized. Hadn't heard of tablet before - thanks.

0 answers

No answers yet.

Log in to answer this question.