Skip to content

Add reproducible cohort RNA analysis and sequence-rich PDF reports - #594

Merged
iskandr merged 3 commits into
masterfrom
feature/cohort-reanalysis-reports
Oct 27, 2026
Merged

iskandr merged 3 commits into
masterfrom
feature/cohort-reanalysis-reports

Conversation

@iskandr

@iskandr iskandr commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

The COLO829, HCC1395 and Sid analyses previously required separate report scripts, and context-contributing RNA fragments could be mistaken for reads spanning an entire protein window. This adds isovar cohort / isovar-cohort: a source-separated manifest workflow over the existing small-variant, ncORF, SV, supplied-fusion, viral and isoform APIs, with landscape and sequence-comparison PDFs.

  • Pin inputs, references, parameters and scientific code; checkpoint every nominated allele; retain failures, unavailable sources, alternatives, original witnesses, FASTA and TSV exports. Render reports independently from verified analysis outputs.
  • Export exact coding-interval depth, full allele-observation spans and single-original-read spans separately from contributors. Reuse this calculation for ncORFs, including merged-mate and negative-strand handling.
  • Compare observed protein against annotation and a focal-allele counterfactual on the observed RNA background. Highlight focal residues, deletion boundaries and justified background origins; show parental fusion sequences and SV path coverage.
  • Use Varcode's contig conversion while preserving original BAM names; record conversion diagnostics and reject explicitly conflicting assemblies. Regression coverage includes mitochondrial aliases, versioned/unplaced contigs and unknown names.
  • Include report dependencies in the base installation, require pandas 3+, and bump Isovar to 1.62.0.

Validation: ./lint.sh passed; the local ./test.sh run passed 6,452 tests; 95 focused cohort/CLI/report checks include the added unavailable-source cases. pip check passed in the isolated release environment. All three real-data PDFs were rendered and visually reviewed; pending inputs are excluded from measured funnels. GitHub CI must pass on the final revision before merge and release.

Scope: whole-library viral discovery/alignment remains an input-preparation step. The dense full-library SV inventory performance problem is tracked separately in #593; missing or incomplete analyses remain explicit, never negative evidence. Patient-background peptide pairs (#100) and downstream per-placement SV support (#589) remain follow-ups. Public contig-resolution API consolidation is tracked in openvax/varcode#645.

Closes #592. Advances #590 and #591.

@iskandr
iskandr marked this pull request as ready for review October 27, 2026 20:57
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 90.802% (-4.1%) from 94.897% — feature/cohort-reanalysis-reports into master

@iskandr iskandr left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the shipped #594 changes at merge commit 749d92a (Isovar 1.62.0). Found three reproducible issues:

  1. [P1] Bind render-only results to their recorded identity — cohort.py:370-376. Reusing a source/pass directory after changing sample, library or analysis settings silently renders old evidence under the new manifest. A one-variant COLO829 fixture produced HCC1395_RNA_evidence.pdf after changing only manifest identity/settings; the embedded receipt still identified COLO829 and its old window size. Tracked with reproduction and acceptance criteria in #596.

  2. [P2] Allow a valid translated fusion without a coding acceptor comparator — cohort_pdf.py:359. reconstruct_fusion legitimately returns translated MAAKGPFE with donor-only references and acceptor_frames=[], but the renderer raises IndexError and aborts report generation. Tracked in #597.

  3. [P2] Correct partial-fusion and insertion offsets in parental reference rows — cohort_pdf.py:363-370. Donor indexing omits translation_start; acceptor indexing uses the start rather than the end of an inserted junction interval. Existing synthetic fixtures reproduce an AAK donor segment displayed against MAA and an acceptor GPFE row shifted one residue left after a GCT insertion. This misclassifies unchanged parental residues as non-reference. Tracked in #598.

Validation: 247 focused existing tests passed (cohort, PDF alignment helpers, coding interval support, protein hypotheses, contig aliases, variant RNA ORFs and fusion). The new isolated reproductions demonstrate coverage gaps despite those passing tests. No production code was changed during this review.

These are follow-up fixes to the released change; this review does not assert that the unchanged COLO829/HCC1395/Sid manifests exhibited the stale-manifest case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cohort input normalization must retain mitochondrial source aliases and use Varcode conversion

2 participants