-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add SupplementaryAlignment constructor from read #85
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 93.29% 93.33% +0.03%
==========================================
Files 32 32
Lines 3343 3363 +20
Branches 618 619 +1
==========================================
+ Hits 3119 3139 +20
Misses 149 149
Partials 75 75 ☔ View full report in Codecov by Sentry. |
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.
LGTM, thank-you!
db14344
to
f172954
Compare
""" | ||
Construct a list of SupplementaryAlignments from the SA tag in a pysam.AlignedSegment. | ||
|
||
Args: | ||
read: An alignment. The presence of the "SA" tag is not required. | ||
|
||
Returns: | ||
A list of all SupplementaryAlignments present in the SA tag. | ||
If the SA tag is not present, or it is empty, an empty list will be returned. | ||
""" |
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.
@nh13 to follow up on our slack convo, I added some detail to the docstring to clarify the behavior when the SA tag is absent.
lmk if you have any suggested edits to the docs before I merge
I thought it'd be helpful to abstract away the logic for validating the presence of an SA tag and type-checking, since that's going to be necessary most of the time
parse_sa_tag
is used in practice