Skip to content

test: add tests for rewrite_fasta#17

Open
ameynert wants to merge 1 commit intoam_15_test_remap_divref_modelsfrom
am_16_test_rewrite_fasta
Open

test: add tests for rewrite_fasta#17
ameynert wants to merge 1 commit intoam_15_test_remap_divref_modelsfrom
am_16_test_rewrite_fasta

Conversation

@ameynert
Copy link
Copy Markdown
Collaborator

Summary

Adds tests/tools/test_rewrite_fasta.py covering rewrite_fasta() using pytest's tmp_path fixture. No Hail or external data required — all tests use in-memory FASTA strings written to temp files.

Cases covered:

  • Canonical autosomes chr1chr22 are kept
  • Sex chromosomes chrX, chrY, and chrMT are kept
  • Alt contigs (chr1_alt), unplaced contigs (chrUn_gl000220), and virus sequences (chrEBV) are filtered out
  • Mixed input with canonical and non-canonical contigs interleaved
  • Empty input produces empty output
  • Multi-line sequences under a canonical header are written in full

Test plan

  • uv run --directory divref poe check-all passes
  • All 6 tests pass

🤖 Generated with Claude Code

Adds tests/tools/test_rewrite_fasta.py covering rewrite_fasta() using
pytest's tmp_path fixture:
- Canonical autosomes (chr1, chr22) are kept
- Sex chromosomes (chrX, chrY) and chrMT are kept
- Alt contigs (chr1_alt) and decoys (chrUn_gl000220, chrEBV) are filtered
- Mixed input with canonical and non-canonical contigs interleaved
- Empty input produces empty output
- Multi-line sequences are written in full

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 13, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b2d25123-7b2a-4845-9306-cb12f32afa5b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch am_16_test_rewrite_fasta

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant