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 unexpected replicates (issue #269) #322

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

jaamarks
Copy link
Collaborator

This PR introduces a new methodology for retaining uncontaminated samples in our dataset. Specifically, when we encounter unexpected replicates—where one sample is contaminated and the other is not—this approach allows us to retain the uncontaminated sample while discarding the contaminated one. This code will change the status of the is_unexpected_replicate field for the uncontaminated sample. Thus, it changes the reports in the QC_Report.xlsx and QC_Report.docx.

A new field has been added to the subject_qc.csv file. This field provides a more detailed classification of replicate relationships, including information about retention and contamination. Here's the breakdown of its values:

  • 0: Not an unexpected replicate
  • 1: Retained unexpected replicate (only the other sample is contaminated)
  • 2: Not retained unexpected replicate (this sample is contaminated)
  • 3: Not retained unexpected replicate (neither sample is contaminated)

Additionally, we have implemented unit tests to validate the new functionality introduced in the subject_qc_table.py script.


Fixes #269

- Introduces new logic for handling unexpected replicates when one is
  contaminated.
- A new column, unexpected_replicate_status, is added to subject_qc.csv
  to reflect the updated handling.
- Additionally, the description for the unexpected_replicate_status
  column has been updated in QC_Report_Data_Dictionary.xlsx
@jaamarks jaamarks merged commit 3c58710 into default Sep 23, 2024
2 checks passed
@jaamarks jaamarks deleted the issue-269-unexp-rep branch September 25, 2024 19:41
@jaamarks jaamarks changed the title feat: Improve handling of unexpected replicates (issue 269) feat: Improve handling of unexpected replicates (issue #269) 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.

Unexpected Replicate count/flag when one of the pair is contaminated
1 participant