Repository navigation
fix: APA re-analysis P0 fixes (Fixes #19 Fixes #20 Fixes #21 Fixes #22 Fixes #23 Fixes #24 Fixes #25 ) - #26
Conversation
…type-normal_bam consistency Read samples.tsv with dtype=str and verify_integrity=True, validate sample uniqueness and analysis_type-normal_bam consistency, and guard normal helpers on analysis_type == tumor_normal. Fixes #20 Co-Authored-By: Gemini 4 Argon <noreply@google.com>
…AG, and fix 1-based BED conversion Add scatter.target_bed with INTERSECTION interval rules across callers and GetPileupSummaries, wire scattered interval/BED files into mutect2_call and freebayes_call inputs, and convert interval_list to BED via gatk IntervalListToBed. Fixes #21 Co-Authored-By: Gemini 4 Argon <noreply@google.com>
…scaling, and pass HMM threads Use hpc-ag-scholl account and single mem_mb resource across SLURM profiles, remove static set-resources overrides so attempt-scaling lambdas apply within the 7-day limit, and pass --native-pair-hmm-threads to Mutect2. Fixes #22 Co-Authored-By: Gemini 4 Argon <noreply@google.com>
…ctCalls and add extra passthrough Add params.filter_mutect_calls.extra passthrough, pin bcftools and htslib in gatk.yaml, and normalize FilterMutectCalls output with bcftools norm -m-any without atomizing complex indels. Fixes #23 Co-Authored-By: Gemini 4 Argon <noreply@google.com>
Add cohort PoN construction (Mutect2 tumor-only -> GenomicsDBImport -> CreateSomaticPanelOfNormals) when panel_of_normals is empty, optional in_pon normal filtering, and bcftools hotspot masking via pon_mask_bed. Fixes #24 Co-Authored-By: Gemini 4 Argon <noreply@google.com>
…r sample Split semicolon-delimited tumor_bam entries across helpers and common.smk, pass multiple -I tumor arguments to Mutect2, compute contamination/segmentation per (sample, bam_basename), pass all tables to FilterMutectCalls, and skip multi-BAM samples in PureCN. Fixes #25 Co-Authored-By: Gemini 4 Argon <noreply@google.com>
Adversarial review round 1 (Claude Opus 5.5): output could not be parsed |
Adversarial review round 1 (Codex GPT-6 Astra, ponytail): request_changesRequest changes for ambiguous contamination paths, duplicate tumor SM handling, omitted standalone PoN normals, and ignored FreeBayes targets. All workflow files parsed; 134 read-only tests passed. No tracked files changed. Not checked: 32 temporary-file tests, full DAG execution, or GATK/SLURM execution under the read-only sandbox. Risks include failed analyses, merged region identities, and incomplete PoN construction.
#19: ok, #20: ok, #21: incomplete, #22: incomplete, #23: ok, #24: incomplete, #25: incomplete |
Separate calculate_contamination wildcards with slash, reject duplicate tumor SM tags across multi-region BAMs, include standalone germline in_pon normals in PoN/NormalDB, intersect FreeBayes chromosome scatter with target_bed, and add Snakemake dry-run and linter fixes. Co-Authored-By: Gemini 4 Argon <noreply@google.com>
Adversarial review round 2 (Codex GPT-6 Astra, ponytail): request_changesRequest changes: normalization loses allele-filter information, target restriction fails on empty chromosome intersections, and PoN construction misses an interval fallback. Selected tests: 49 passed; changed-file lint, formatting and diff checks passed. Tracked files remain unchanged. Full GATK/SLURM execution and file-writing integration tests were not run in this read-only environment; silent false-positive admission remains the principal risk.
#19: ok, #20: ok, #21: incomplete, #22: ok, #23: wrong, #24: incomplete, #25: ok |
Preserve GATK per-allele AS_FilterStatus and apply to biallelic FILTER across bcftools norm in filter_mutect_calls; restrict chromosome scatter units to chromosomes present in target_bed; fall back to reference-derived scattered.interval_list in pon_genomicsdb when no target_bed or chromosome scatter applies; mark TestSnakemakeDryRun with pytest.mark.dryrun. Co-Authored-By: Gemini 4 Argon <noreply@google.com>
Final adjudication of the Codex review (Gemini 4 Argon, ponytail): approveAll four review findings are already resolved in HEAD (5db8871): multiallelic normalization preserves GATK AS_FilterStatus and site-wide filters, chromosome scatter restricts to chromosomes present in target_bed, cohort PoN GenomicsDBImport falls back to reference N-scattered intervals when needed, and TestSnakemakeDryRun carries the dryrun marker.
Tests: 171 passed (170 unit, 1 dryrun); ruff check and ruff format --check passed |
Co-Authored-By: Gemini 4 Argon <noreply@google.com>
Implements the APA re-analysis P0 fixes (berntpopp/apa-sequencing#34).
Fixes #19 Fixes #20 Fixes #21 Fixes #22 Fixes #23 Fixes #24 Fixes #25
Commits
Implementer report
fig.v8+.yaml),
mutect2.smk,freebayes.smkf1e3e86—mutect2.smk,common.smk,gatk.yaml,config.schema.yaml,config.yaml790fcdf—mutect2.smk,common.smk,helpers.py,config.schema.yaml,samples.schema.yaml00b2b4d—helpers.py,common.smk,mutect2.smk,samples.schema.yamlTests & Linters
pytest(/home/bernt-popp/miniforge3/bin/pytest tests/ -v): 166 passed in 0.53s (including unit, schema, DAG input resolution, and shell execution tests intests/test_helpers.py).ruff check&ruff format --check(workflow/rules/helpers.py scripts/generate_config.py): passed.mypy(workflow/rules/helpers.py scripts/generate_config.py): passed (0 issues in 2 source files).snakemake,snakefmt, andshellcheck: binaries are not installed in this local environment; rule syntax/DAG wiring and shell blocks were verified via Pythonexec()andbash -euo pipefailsubprocess tests.Risks & Notes
#24): Whengatk_resources.panel_of_normalsis"",pon_genomicsdbrequires at least one PoN-eligible normal BAM fromget_normal_bams()(analysis_type == "tumor_normal", filtered byin_ponwhen that column is present); normal-only (pon_only) libraries not paired with a tumor should be included viatumor_normalrows or a pre-built cohort PoN if notumor_normalrow references them.@RG SMtags (#25):gatk Mutect2requires distinct@RG SMtags across multi-region tumor BAMs (T1;T2) if per-region genotypes are to remain separate in the output VCF; if two tumor BAMs share the sameSM, GATK pools their reads into a single tumor sample column.🤖 Implemented by Gemini 4 Argon via agy; adversarially reviewed by Claude Opus 5.5 before merge.