-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GroupReadsByUmi may fail when marking duplicates including secondary/supplementary reads #964
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #964 +/- ##
==========================================
+ Coverage 95.65% 95.67% +0.02%
==========================================
Files 126 126
Lines 7403 7447 +44
Branches 521 506 -15
==========================================
+ Hits 7081 7125 +44
Misses 322 322
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
cd1460b
to
1b5753c
Compare
@@ -208,21 +208,31 @@ case class Cigar(elems: IndexedSeq[CigarElem]) extends Iterable[CigarElem] { | |||
def trailingSoftClippedBases: Int = stats.trailingSoftClippedBases | |||
|
|||
/** Returns the number of bases that are hard-clipped at the start of the sequence. */ | |||
def leadingHardClippedBases = this.headOption.map { elem => | |||
def leadingHardClippedBases: Int = this.headOption.map { elem => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public defs should have return types here and below
36c78a6
to
bbfaeeb
Compare
…nd supplementary reads Secondary and supplementary reads must use the coordinates of the primary alignments within the template, otherwise they will not guaranteed to be next the primary alignments in the file. Therefore, we've added the "rp" and "mp" tags to store the SA-tag equivalent information for the primary alignment. This keeps information about the primary alignments with the secondary and supplementary alignments.
bbfaeeb
to
f9390ab
Compare
There's an open issue in hts-specs about how we want to handle getting the primary alignment information when looking at a secondary or supplementary read: samtools/hts-specs#755
This PR adds the read primary "rp" tag to store the primary alignment for end of the current secondary/supplementary alignment, in the same format as the "SA" tag. The mate's primary alignment is stored in the "mp" tag. Both are currently lowercase as they are not reserved tags.
I have tested that
ZipperBams
will now add these, thatSortBam
will correctly sort in template-coordinate, and finally thatGroupReadsByUmi
passes. I added tests forGroupReadsByUmi
andSamOrder
.Also, in my hands, secondary and supplementary records will never be output by
GroupReadsByUmi
as currently only primary alignments are output.