Entering edit mode
10.1 years ago
bw.
▴
260
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?
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.