Skip to content

DNA-only CLI without --bam, compact dna_effect_selection/annotated_effect, and OncoRef cohort proxy expression (v3.67.0) - #909

Merged
iskandr merged 4 commits into
mainfrom
feat/dna-only-and-oncoref-proxy-expression
Nov 22, 2026
Merged

iskandr merged 4 commits into
mainfrom
feat/dna-only-and-oncoref-proxy-expression

Conversation

@iskandr

@iskandr iskandr commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  1. Fix DNA-only fallback serializes full per-base genomic coordinate lists from varcode RealizedTranscriptProduct (extreme memory/serialization bloat) #908 (compact dna_effect_selection): _compact_candidate_provenance() replaces raw per-base genomic_positions coordinate arrays (which added 2.4 MB per TTN variant / 25.66 MB across 198 COLO829 coding variants) with genomic_positions_count + genomic_positions_sha256 while preserving exon_runs, cdna_sequence, protein_sequence, splice_plan, and exact deterministic predicted_effect() matching. Filed upstream issue varcode_candidate_provenance() serializes huge per-base genomic_positions arrays (multi-MB per long gene) topiary#624.
  2. Fix DNA-only mode (--allow-dna-only-fallback): default combined_score evaluates to 0.0 and CLI still requires --bam #907 (DNA-only CLI without --bam + non-zero default scoring):
    • Makes --bam optional in argparse when --allow-dna-only-fallback or --proxy-expression-cancer-type is passed, while preserving a clear fast-fail error when --bam is omitted without DNA-only opt-in.
    • Skips run_isovar BAM access when --bam is omitted and builds native empty-ReadEvidence IsovarResult shells.
    • Defaults combined_score_expr to target_epitope_score for pure DNA-only runs (no --bam, no proxy) and to sqrt(proxy_expression_tpm) * target_epitope_score when --proxy-expression-cancer-type is supplied, unless explicitly overridden via YAML/--set.
  3. OncoRef whole-gene cancer-type cohort proxy expression (--proxy-expression-cancer-type):
    • New module vaxrank/proxy_expression.py resolves OncoRef cancer codes and common names (e.g. SKCM / melanoma, BRCA, SARC_OS) via oncoref.resolve_cancer_type() + oncoref.cancer_reference_expression() (median clean TPM, Q1/Q3 IQR, sample counts), with human-host validation (rejecting non-human taxa) and rejecting combination with --bam.
    • Complex / structural variants: resolve_proxy_expression_gene() uses the 5' gene upstream of the breakpoint (five_prime_transcript or first segment in MutantTranscript.reference_segments), since the 5' promoter drives transcription of chimeric/fusion products.
    • Strict provenance: never fabricates n_alt_reads (remains 0, rna_evidence_method == ''), exposes proxy_expression_tpm in combined_score_dsl, and renders explicit cohort-proxy labels (Proxy SKCM: ... TPM (OncoRef)) in reports and run_summary.txt.
  4. Version bump: 3.65.1 → 3.66.0.

Closes #907
Closes #908

Verification

  • ruff check vaxrank tests: clean
  • Regression suite: 193 passed including 9 new tests in tests/test_dna_only_proxy_expression.py
  • End-to-end COLO829 Melanoma (SKCM proxy expression, 225 PASS coding variants, no --bam, NetMHCpan 4.2c) verification running in parallel.

@iskandr iskandr changed the title DNA-only CLI without --bam, compact dna_effect_selection, and OncoRef cohort proxy expression (v3.66.0) DNA-only CLI without --bam, compact dna_effect_selection/annotated_effect, and OncoRef cohort proxy expression (v3.67.0) Nov 22, 2026
@iskandr
iskandr merged commit 955a83a into main Nov 22, 2026
11 checks passed
@iskandr
iskandr deleted the feat/dna-only-and-oncoref-proxy-expression branch November 22, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant