Skip to content

Add Torino module for annotation-free isoform quantification - #1438

Merged
danielnachun merged 3 commits into
StatFunGen:mainfrom
jaempawi:torino-module
Nov 11, 2026
Merged

danielnachun merged 3 commits into
StatFunGen:mainfrom
jaempawi:torino-module

Conversation

@jaempawi

Copy link
Copy Markdown
Contributor

Adds isoform_calling_torino.ipynb, which quantifies isoform usage with Torino (Buen Abad Najar et al., 2026, bioRxiv 10.64898/2026.10.21.760529). Torino factorizes each gene's read-depth matrix across samples by empirical Bayes Poisson matrix factorization into coverage components and their per-sample usage, without transcript annotations. It therefore captures intron retention and alternative polyadenylation, which junction-based LeafCutter2 does not quantify.

  • Workflows: torino (coverage, per-gene depth matrices, factorization, usage tables) and torino_preprocessing (the first two steps).
  • Wrappers: torino_coverage.sh, torino_count_matrix.R, torino_factorize.R and torino_usage.R in code/script/molecular_phenotypes/calling/, replacing the paper pipeline's Python and positional-argument scripts.
  • Outputs: a raw usage BED, a normalized BED (as in the paper's QQNorm_factors.py) and a phenotype-group file for TensorQTL grouped permutation.
  • Fixture: 24 simulated single-end BAMs over AP000547.3 (chr22), drawn from three Ensembl transcripts, with build_fixture.R.
  • Tests: 8 in tests/notebooks/molecular_phenotypes/calling/test_isoform_calling_torino.py.

All 8 tests passed on SCC. On the fixture, component usage correlated with the simulated fully spliced, alternative-last-exon and intron-retention transcripts at 0.98, 0.99 and 0.99. The end-to-end test is skipped where the torino R package is not installed; its GitHub-only dependencies (torino, fastTopics, smashrgen, ebpm, vebpm, and mr.ash at a8d0b23) are not yet in the dnachun channel.

jaempawi and others added 3 commits November 10, 2026 10:38
New isoform_calling_torino.ipynb with workflows torino (coverage, per-gene depth matrices, factorization, usage tables) and torino_preprocessing. R/bash wrappers in code/script/molecular_phenotypes/calling, a simulated 24-sample chr22 fixture with its build script, and tests.
@danielnachun
danielnachun merged commit b71e24f into StatFunGen:main Nov 11, 2026
3 checks passed
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.

2 participants