Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds reference genome download/indexing and final per-chromosome outputs to the DivRef workflow, tightens tool validation and tmp_dir checks, updates schema/config with new properties, and adds samtools/pyarrow dependencies and three Snakemake rules to fetch, index, and process the reference FASTA. Changes
Sequence Diagram(s)sequenceDiagram
participant SM as Snakemake
participant Fetch as DownloadReference
participant SAM as SamtoolsIndexer
participant Tool as CreateFastaAndIndex
participant Out as Outputs
SM->>Fetch: start (reference_genome_uri)
Fetch->>Fetch: gsutil cp + gunzip
Fetch-->>SM: reference.fasta
SM->>SAM: start (reference.fasta)
SAM->>SAM: samtools faidx -> reference.fai
SAM-->>SM: reference.fai
SM->>Tool: start (reference.fasta, reference.fai, haplotypes.ht, variants.ht, params)
Tool->>Tool: assert_path_is_readable(reference.fai)
Tool->>Tool: build per-chr FASTA + DuckDB index (use empirical_AC)
Tool-->>Out: per-chr FASTA + DuckDB indexes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…ASTA file and index
1f54eef to
51c3481
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@workflows/generate_divref.smk`:
- Line 21: The VERSION variable is incorrectly annotated as int; change its
annotation to str so it matches the config schema and values (replace "VERSION:
int = config[\"version\"]" with "VERSION: str = config[\"version\"]"), and if
any downstream code expects an int either convert where used or add an explicit
cast/validation (e.g., str(config["version"]) or typing.cast(str,
config["version"])) so static type checkers and runtime behavior remain
consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fe6a4230-7ba0-4201-a7d8-85073576691e
⛔ Files ignored due to path filters (1)
pixi.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
divref/divref/tools/create_fasta_and_index.pypixi.tomlworkflows/config/config.ymlworkflows/config/config_schema.ymlworkflows/generate_divref.smk
Summary by CodeRabbit
New Features
Configuration
Bug Fixes / Reliability