how to convert .bam from unpadded to padded representation?
0
1
Entering edit mode
9.4 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?

alignment SAM BAM • 3.1k views
ADD COMMENT
0
Entering edit mode

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).

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 1977 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6