Skip to content

feat: Warn if samples are missing in FASTA#17

Merged
gp201 merged 5 commits intomainfrom
refactor/missing_samples_warning
Mar 10, 2026
Merged

feat: Warn if samples are missing in FASTA#17
gp201 merged 5 commits intomainfrom
refactor/missing_samples_warning

Conversation

@gp201
Copy link
Collaborator

@gp201 gp201 commented Mar 10, 2026

Only print per-sample missing warnings when debug=True. By default print a summary warning.

Only print per-sample missing warnings when debug=True. By default print
a summary warning.
@gp201 gp201 changed the title Warn if many samples missing in FASTA feat: Warn if samples are missing in FASTA Mar 10, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies the warning behavior for missing samples in process_and_reroot_lineages. Previously, a per-sample warning was always printed for each sample not found in the FASTA file. Now, per-sample warnings are only shown when debug=True, and a summary warning (showing count and percentage) is always displayed when any samples are missing.

Changes:

  • Gate per-sample "not found in FASTA" warnings behind the debug flag, and add a summary warning showing the count/percentage of missing samples
  • Update the existing test to verify the new summary warning and confirm per-sample warnings are suppressed when debug=False
  • Add two new tests: one verifying per-sample warnings appear with debug=True, and one confirming the summary warning fires for any number of missing samples

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
barcodeforge/ref_muts.py Track missing_count, gate per-sample warnings behind debug, add summary warning with count and percentage
tests/test_ref_muts.py Update existing test assertions for summary warning; add test_..._debug_shows_per_sample_warning and test_..._summary_warning_any_missing tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gp201 gp201 enabled auto-merge (squash) March 10, 2026 18:48
@gp201 gp201 disabled auto-merge March 10, 2026 18:50
@gp201 gp201 merged commit b03dbad into main Mar 10, 2026
6 checks passed
@gp201 gp201 deleted the refactor/missing_samples_warning branch March 10, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants