Note: clarifying my question.
How can I get the hard clipped 3' end of the read position where there is soft clip at either end of the read? The getUnclippedEnd() in htsjdk gives you the position of the 3' end of the read including the soft-clipped bases. Is there a function like this to get the 3' read end positions excluding soft clipped bases? I believe I can look a the CIGAR string and do the math, just asking if there is any function available.
----------------------------SSS>
Any htsjdk function can find the position at the start of the Softlips in the above example?
Thanks.
1 answer
Is there a function like this to get the 3' read end positions excluding soft clipped bases?
record.getAlignmentEnd()
How can I get the hard clipped 3' end of the read position where there is soft clip at either end of the read?
I ended up writing a SAMRecordUtil class for SAMRecord operations I used frequently.
record.getAlignmentEnd() + SAMRecordUtil.getEndClipLength(record)
Log in to answer this question.