feat: add remap_divref tool#12
Open
ameynert wants to merge 3 commits intoam_10_create_fasta_and_indexfrom
Open
feat: add remap_divref tool#12ameynert wants to merge 3 commits intoam_10_create_fasta_and_indexfrom
ameynert wants to merge 3 commits intoam_10_create_fasta_and_indexfrom
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 |
19bf206 to
6f51106
Compare
Port remap_divref.py (calitas subcommand) from human-diversity-reference/scripts as a defopt-compatible toolkit tool. Remaps DivRef haplotype-space coordinates to reference genome positions for CALITAS output files, using the DivRef DuckDB index. Adds full type annotations, Pydantic field aliases for DB column names, and replaces typer error handling with RuntimeError/ValueError. Also adds pandas to the mypy ignore_missing_imports override. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Updates remap_divref.py to match upstream v1.1: sign-dependent coordinate check in _translate_coordinate_to_ref and gap-stripping in padded_len_adj. Updates test expectations to reflect that population_frequencies contains all variant frequencies (not sliced to in-range variants). Adds test_remap_divref.py with six tests covering coordinate translation, gap handling, and haplotype remapping; all pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
d451962 to
d506ac6
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
remap_divref.py(calitassubcommand) fromhuman-diversity-reference/scriptsas a defopt-compatible toolkit toolcreate_fasta_and_indexfrozen=Truemodels (Variant,ReferenceMapping,Haplotype) with field aliases for DB column names, and replacestypererror handling withRuntimeError/ValueErrorpandasto themypyignore_missing_importsoverride_translate_coordinate_to_refand gap-stripping inpadded_len_adjtests/tools/test_remap_divref.pywith six tests covering coordinate translation, gap handling, and haplotype remapping; all passTest plan
uv run --directory divref poe check-allpassesuv run --directory divref pytest tests/tools/test_remap_divref.py— all six tests pass🤖 Generated with Claude Code