feat: add create_fasta_and_index tool#11
Open
ameynert wants to merge 2 commits intoam_09_compute_variation_ratiosfrom
Open
feat: add create_fasta_and_index tool#11ameynert wants to merge 2 commits intoam_09_compute_variation_ratiosfrom
ameynert wants to merge 2 commits intoam_09_compute_variation_ratiosfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
0fe6bba to
2e3ca4f
Compare
Port create_fasta_and_index.py from human-diversity-reference/scripts as a defopt-compatible toolkit tool. Generates DivRef FASTA sequences with flanking reference context and a DuckDB index for use by remap_divref. Reuses get_haplo_sequence and split_haplotypes from divref.haplotype. Renames the chr loop variable to chrom to avoid shadowing the built-in, fixes a loop-variable closure bug (B023), and replaces print/typer.echo with logging. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds tests/tools/__init__.py to create the package and test_create_fasta_and_index.py with happy-path tests for get_haplo_sequence and split_haplotypes. The Hail JVM test is marked skip; the remaining tests pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
19bf206 to
6f51106
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_fasta_and_index.pyfromhuman-diversity-reference/scriptsas a defopt-compatible toolkit toolremap_divrefget_haplo_sequenceandsplit_haplotypesfromdivref.haplotypechrloop variable tochromto avoid shadowing the built-in, and replacesprint/typer.echowith loggingtests/tools/test_create_fasta_and_index.pywith happy-path tests forget_haplo_sequenceandsplit_haplotypes(Hail JVM test marked skip)Test plan
uv run --directory divref poe check-allpassesuv run --directory divref pytest tests/tools/test_create_fasta_and_index.py— all non-skip tests pass🤖 Generated with Claude Code