Skip to main content

Config-driven isoform-usage quantification and discrimination from bulk RNA-seq

Project description

isoform-dominance

CI Python License: MIT DOI

Isoform-usage quantification and discrimination from bulk RNA-seq — one config away for any gene.

Most isoform analyses stumble on two things: deciding which transcripts form a functional group, and knowing whether short reads can even tell the groups apart. isoform-dominance handles both, then quantifies and tests the comparison end-to-end:

annotate  gene symbol      → proposed isoform groups        (Ensembl, by 3' terminal exon)
identify  config           → are the groups distinguishable by short reads? (k-mer uniqueness)
extract   Salmon quant.sf  → per-donor isoform-group TPM
stats     per-donor TPM    → paired Wilcoxon, per cohort + combined, + figure
qc        marker TPM       → contamination control (is the signal a cell-type artifact?)

example output

Bundled self-test: short LEPR isoform (LepRa) predominates over the long isoform (LepRb) in control human choroid plexus across two independent cohorts; combined n = 11, P = 1×10⁻³.


Install

pip install -e ".[dev]"        # from a clone
isoform-dominance --version

Verify it works (no downloads, seconds)

isoform-dominance selftest
# or: pytest -q

reproduces the published LEPR result (5/5, 6/6, combined n=11 P=9.8e-4) on a clean machine.

What makes it more than a quantifier

1. Auto isoform grouping (annotate). Give a gene symbol; it pulls the gene's protein-coding transcripts from Ensembl, clusters them by their 3' terminal-exon splice acceptor (the alternative last exon that defines functional isoform classes), and proposes a comparison you review and rename.

isoform-dominance annotate --gene LEPR --out config.json
#   iso_896aa : 7 transcripts   (short / LepRa)
#   iso_1165aa: 2 transcripts   (long / LepRb, canonical)

2. Identifiability guardrail (identify). Short reads can only quantify an isoform group that has unique sequence. This checks per-group unique k-mers and refuses to pretend a group is measurable when it isn't.

isoform-dominance identifiability --config config.json
#   [OK] iso_896aa : 3399 unique k-mers
#   [OK] iso_1165aa: 5369 unique k-mers
#   primary_comparison distinguishable by short reads: True

Full workflow (real data)

# 0) build a decoy-aware index once (Salmon + GENCODE) — see scripts/01_salmon_quant.sbatch
# 1) quantify on an HPC cluster:
sbatch scripts/01_salmon_quant.sbatch                    # -> quant/<donor>/quant.sf
# 2) extract per cohort:
isoform-dominance extract --config config.json --quantdir quant \
    --samplemap example/sample_map_GSE228458.csv --cohort GSE228458 --out perdonor_GSE228458.csv
# 3) stats + figure:
isoform-dominance stats --config config.json --condition control \
    --perdonor GSE228458=perdonor_GSE228458.csv --perdonor GSE137619=perdonor_GSE137619.csv \
    --out results/dominance
# 4) optional contamination control:
isoform-dominance qc --config config.json \
    --markers GSE228458=markers_228.csv --target GSE228458=perdonor_GSE228458.csv --out results/qc

Statistical notes

  • Donor-level two-sided exact Wilcoxon signed-rank (scipy.stats.wilcoxon), per cohort + combined.
  • Small-n floor: n = 5 cannot reach P < 0.05 in the exact two-sided test (floor 0.0625); report exact P + direction (e.g. 5/5) and combine concordant cohorts for the summary statistic.
  • Effect size = median fold-change, reported alongside significance.

Layout

src/isoform_dominance/   annotate · identifiability · extract · stats · contamination · cli · _selftest
tests/                   pytest (offline; reproduces the published result + unit tests)
scripts/01_salmon_quant.sbatch
example/                 config + sample maps
.github/workflows/ci.yml docs/  pyproject.toml  CITATION.cff  LICENSE

Citation

Cite this repository (see CITATION.cff, DOI 10.5281/zenodo.20672052) and Salmon: Patro, R. et al. Nat. Methods 14, 417–419 (2017). https://doi.org/10.1038/nmeth.4197

License

MIT (see LICENSE).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isoform_dominance-2.0.0.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isoform_dominance-2.0.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file isoform_dominance-2.0.0.tar.gz.

File metadata

  • Download URL: isoform_dominance-2.0.0.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for isoform_dominance-2.0.0.tar.gz
Algorithm Hash digest
SHA256 e8c4c9866f26ed89e60afe23906d9accb069920ff34a60af44c6038607315c46
MD5 55c38bc9325fd8ddd80a5ab2333e141d
BLAKE2b-256 fb534b941630b47ac84d2d7c52ce608978c36890b0f7028e6518b59eeaace73a

See more details on using hashes here.

Provenance

The following attestation bundles were made for isoform_dominance-2.0.0.tar.gz:

Publisher: publish.yml on charliekim97/isoform-dominance-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file isoform_dominance-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for isoform_dominance-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c419abd4ff2ffcf9e3ac3995c349adf0d300d261ab5291d1250e574b126f1a1d
MD5 576412af01c2ed9abca57a0b30f6d6ba
BLAKE2b-256 e3b1adacd3d01eb2fc5a0131a93c4fc8f1c5aea92f179e3c838f895a776d5409

See more details on using hashes here.

Provenance

The following attestation bundles were made for isoform_dominance-2.0.0-py3-none-any.whl:

Publisher: publish.yml on charliekim97/isoform-dominance-pipeline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page