-
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
Deprecate set_pair_info and _set_mate_info for set_mate_info #202
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #202 +/- ##
==========================================
- Coverage 91.31% 90.96% -0.36%
==========================================
Files 18 18
Lines 2281 2257 -24
Branches 334 329 -5
==========================================
- Hits 2083 2053 -30
- Misses 126 133 +7
+ Partials 72 71 -1 ☔ View full report in Codecov by Sentry. |
c755f6b
to
56d9692
Compare
001e346
to
56722b0
Compare
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.
I'm supportive!
WalkthroughThe pull request introduces significant modifications to the SAM/BAM file handling in the Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🪛 GitHub Check: codecov/patchfgpyo/sam/__init__.py[warning] 892-892: fgpyo/sam/init.py#L892 🔇 Additional comments (3)fgpyo/sam/__init__.py (3)
Implementation matches samtools fixmate behavior.
Correctly sets all mate-related tags and flags, including proper handling of unmapped reads.
Line 892 needs test coverage for the lambda function passed to Want me to generate test cases for this scenario? 🧰 Tools🪛 GitHub Check: codecov/patch[warning] 892-892: fgpyo/sam/init.py#L892 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I notice we have two implementations for setting mate info on a pair of alignments.
I've refactored for the following reasons:
set_pair_info()
:assert
instead ofraise
, which can be turned off at runtimeMQ
)ms
)True
(it's easy to forget to change this)_set_mate_info()
:MC
)MQ
)ms
)Now we have:
set_pair_info()
: annotated as deprecated to avoid an API breakset_mate_info()
: a more useful function for setting mate info on alignmentsset_as_pairs()
: this behavior was inset_pair_info()
so it is now a sole functionQuestions?
Is it worth keepingset_as_pairs()
? What was the motivation for this functionality?set_pair_info()
without deprecating first?Along the way I found a bug in
SamBuilder.add_pair()
and fixed that too.If initial code review is favorable, I can go and add more unit tests.