Skip to content
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: Improve handling of discordant expected replicates (issue #324) #327

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

jaamarks
Copy link
Collaborator

This PR creates a new function _retain_valid_discordant_replicates to the script sample_qc_table.py, which helps us retain additional subjects in specific cases. Previously, both samples in a discordant expected replicate pair were discarded. Now, if one sample has low call rate or is flagged as contaminated, and the other does not, the high-quality sample is retained. This helps preserve subject data when one sample is compromised.

Additionally, we updated the unit tests in test_sample_qc_table.py to cover the new functionality.

Fixes #324

@jaamarks jaamarks force-pushed the issue-324-retain-expected-rep branch from d330c9c to d90c50e Compare September 25, 2024 21:02
@jaamarks jaamarks requested a review from 1teaspoon September 25, 2024 23:01
- Previously, both samples in a discordant expected replicate pair were
  discarded. Now, if one sample has low call rate or is flagged as
  contaminated, and the other does not, the high-quality sample is
  retained. This helps preserve subject data when one sample is compromised.
- Updated unit tests to cover the new functionality.
- We need to adjust the other test parameters impacted by the changes in
  how we handle discordant expected replicates, as well as the addition
  of new entries in the `fake_sample_qc` DataFrame.
@jaamarks jaamarks force-pushed the issue-324-retain-expected-rep branch from d90c50e to 28352fb Compare September 27, 2024 16:28
@jaamarks jaamarks merged commit 29246b8 into default Sep 27, 2024
2 checks passed
@jaamarks jaamarks deleted the issue-324-retain-expected-rep branch October 2, 2024 12:03
@jaamarks jaamarks changed the title feat: Improve handling of discordant expected replicates (issue 324) feat: Improve handling of discordant expected replicates (issue #324) Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discordant expected dup removal - only apply to replicates pass call rate & contamination
1 participant