Is it possible to trim a BAM alignment with the BamTools API?

2 views
Skip to first unread message

Charles Plessy

unread,
Oct 5, 2022, 3:54:57 AM10/5/22
to bamtools-user
Hello,

I am using BamTools in the pairedBamToBed12 program (https://github.com/Population-Transcriptomics/pairedBamToBed12).

In case Read1 and Read2 are overlapping, the CIGAR information for their alignments have some redundancy, or in the worst case some discrepancies. So I would like to trim the Read2 alignment to the extent where Read1's alignment ends. Merging the reads before alignment is not possible (only a small fraction overlaps).

I tried to reduce the length of a BamAlignment object, but this did not magically adjust the alignment coordinates and CIGAR information. Is this possible with other functions?

Have a nice day,

Charles Plessy
Reply all
Reply to author
Forward
0 new messages