swaruplab/operon/alternative-splicing-splicing-quantification

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Quantifies alternative splicing as PSI (percent spliced in) from RNA-seq using rMATS-turbo (BAM-based event), SUPPA2 (TPM-based event), MAJIQ V3 (LSV-based Bayesian), leafcutter (annotation-free intron clusters), VAST-TOOLS (cross-species with microexon support), Shiba (junction-imbalance-corrected, 2025 SOTA at low coverage), or IRFinder-S (intron retention coverage-aware). Distinguishes the five canonical event classes (SE, A5SS, A3SS, MXE, RI), special classes (microexons, exitrons, AFE/ALE), intron retention subtypes (canonical RI vs detained introns), and applies effective-length normalization. Use when measuring splice-site usage or isoform inclusion ratios from short-read RNA-seq.

Install

npx vskill@latest install swaruplab/operon/alternative-splicing-splicing-quantification

SKILL.md

Version Compatibility

Reference examples tested with: rMATS-turbo 4.3+, SUPPA2 2.4+, leafcutter 0.2.9+, MAJIQ 3.0+, IRFinder-S 2.0+, kallisto 0.50+, Salmon 1.10+, pandas 2.2+, STAR 2.7.11+

Before using code patterns, verify installed versions match. If versions differ:

  • Python: pip show <package> then help(module.function) to check signatures
  • R: packageVersion('<pkg>') then ?function_name to verify parameters
  • CLI: <tool> --version then <tool> --help to confirm flags

If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.

Splicing Quantification

Quantify alternative splicing events as PSI (percent spliced in) from RNA-seq. PSI = inclusion read evidence / (inclusion + skipping read evidence), normalized for differential mapping opportunity between isoforms. The choice of quantification unit (event, intron cluster, LSV, transcript) determines which biological questions can be answered and which failure modes apply.

Algorithmic Taxonomy

FamilyUnitReference toolsFails when
Event-basedPre-defined SE/A5SS/A3SS/MXE/RI events from annotationrMATS-turbo, SUPPA2, VAST-TOOLSEvent isn't in annotation; complex multi-junction events split arbitrarily; AFE/ALE confounded with splicing
LSV-basedLocal Splice Variations at single source/target nodesMAJIQ V3Memory-constrained environments; cohorts smaller than ~3 reps; non-academic users (license)
Junction-clusterAnnotation-free intron clusters by shared splice sitesleafcutter, leafcutter2Undersampled clusters lose power; topology biologically uninterpretable for novel events
Splice-graphGraph nodes (non-overlapping exonic regions)Whippet, ShibaWhippet maintenance status uncertain since ~2022; complex multi-exon graphs
Coverage-aware (IR)Intron body coverage + flanking junctionsIRFinder-S, S-IRFindeR, iREADConfounded by overlapping exons, repeats, low mappability regions
Isoform-basedTranscript abundance via EMSalmon/kallisto + tximportSalmon EM uncertainty propagates; many similar isoforms (TTN, MAPT) become indistinguishable

The agent's first decision is which family the question requires, not which tool. Switching family is the response to a tool failing within a family — switching tool within a family rarely fixes systematic blind spots.

Event Taxonomy (Beyond Standard SE/A5SS/A3SS/MXE/RI)

ClassCodeBiologyDetection caveat
Skipped exon (cassette)SEDefault cassette-exon ASMost common; well-handled by all tools
Alternative 5' splice siteA5SSAlternative donor; intron 5' end variesSign convention tool-specific (see below)
Alternative 3' splice siteA3SSAlternative acceptor; intron 3' end variesSensitive to BPS cancer mutations (SF3B1) — cryptic 3'ss ~10-30nt upstream
Mutually exclusive exonsMXETwo exons paired, one includedTool implementations vary; verify which "form 1" is yours
Retained intronRIWhole intron retained in mature mRNAJunction-only quant systematically underdetects; needs IRFinder-S
Microexon(sub-SE)3-27 nt; neural-enriched, SRRM4-regulatedMissed by default aligner anchor lengths (>=20-30 nt); needs VAST-TOOLS, MicroExonator, or long-read
Exitronn/aIntronic region within an annotated CDS exonMis-classified as A5SS/A3SS by most tools; use ExitronFinder, ScanExitron
Alternative first exon (AFE)AFEAlternative TSS / promoter usePromoter-driven, NOT spliceosomal; confirm with FANTOM CAGE before reporting as splicing
Alternative last exon (ALE)ALEAlternative cleavage/polyadenylationAPA-driven, NOT spliceosomal; confirm with 3'-end-seq
Detained intron (DI)(RI subtype)Nuclear-retained on mature mRNA, regulated by Clk kinasesDistinct from cytoplasmic NMD-targeted RI (Boutz 2015 Genes Dev); requires fractionation to confirm
Recursive splicing(intron subtype)Long introns >50kb spliced via internal ratchet pointsSibley 2015 Nature; only detectable with long-read or nascent RNA-seq

Tool-agnostic taxonomy reference: Wang 2008 Nature; Vaquero-Garcia 2016 eLife (LSV); Tapial 2017 Genome Res (VastDB).

Tool Selection Matrix

ToolBest forInputStrengthsFails when
rMATS-turboStandard SE/A5SS/A3SS/MXE/RI in annotated organism, n>=3BAM + GTFFast, well-calibrated at n>=3, novel SS supportJunction read imbalance; novel multi-junction events; underdetects RI and microexons
SUPPA2Quick PSI from existing TPM, pilot analysisSalmon/kallisto TPM + GTFNo alignment; fastestAnnotation-bound; high FDR (15-30%) at n<=2 vs n<=2
MAJIQ V3Complex events, heterogeneous cohorts (HET)BAM + GFF3Bayesian posterior PSI, complete LSV semanticsHigh memory (~50+ GB on cohorts); academic license; complex LSV interpretation needs care
leafcutterNovel junction discovery, sQTL, low-memory environmentsBAM (regtools junctions)Annotation-free; ~400 MB memory; SOTA for unannotated organismsSensitive to read depth; cluster topology arbitrary for complex multi-junction events
Shiba (2025)Low-coverage / few-replicate designs; junction imbalance correctionBAM + GTFBest calibration in own benchmark at n=2 vs n=2New (2025); limited community calibration
VAST-TOOLSCross-species comparative AS, microexonsFASTQVastDB orthology, ExOrthist co-toolLimited to species in VastDB
WhippetLaptop-scale exploratoryFASTQFast splice-graph-based PSIReduced active development since ~2022; underperforms on complex topologies
IRFinder-SIntron retention specificallyFASTQCoverage + junction integration; CNN-based artifact filteringIR-only; not for cassette events
S-IRFindeRReplicate-stable IR ratioBAMStable IR ratio metricIR-only; less integrated than IRFinder-S

Methodology evolves; verify benchmarks (Olofsson 2023 Brief Bioinform; Kubota 2025 NAR; Tran 2025 WIREs RNA) and tool docs before committing. Default 2026 recommendation: run rMATS-turbo + leafcutter and reconcile; add MAJIQ V3 for complex events / heterogeneous cohorts; switch to Shiba for n=2 vs n=2.

PSI Definition and Effective Length Normalization

For a cassette exon, naive PSI ignores that the inclusion isoform contains more positions where a junction read can map than the skipping isoform. rMATS reports IncFormLen (= 2*(read_length - anchor) for the two flanking junctions, plus exon body bases) and SkipFormLen (= read_length - anchor) and computes:

PSI = (IJC / IncFormLen) / (IJC / IncFormLen + SJC / SkipFormLen)

where IJC = inclusion junction counts, SJC = skipping junction counts. Skipping this normalization biases PSI by ~10-30% depending on read length and exon size. SUPPA2 derives PSI from transcript TPMs, which the upstream Salmon/kallisto already accounts for. leafcutter operates on intron usage proportions within a cluster (a different statistic).

For long-read data, every read carries full isoform identity — effective-length normalization becomes unnecessary because each read counts as one isoform.

Sign Conventions for Alternative Splice Sites

ToolA5SS interpretationA3SS interpretation"Inclusion" direction
rMATS"long" form = donor downstream of alternative donor"long" form = acceptor upstream of alternative acceptorPSI > 0 = more long form
SUPPA2Same as rMATS (long = inclusion of additional exon body)SamePSI > 0 = more long form
VAST-TOOLSEncoded in event ID (_D1 vs _D2)Encoded in event ID (_A1 vs _A2)Document the chosen reference
MAJIQPer-junction within LSV; explicit donor/acceptor naming in VOILASamePSI per junction in the LSV

Always record which alternative form ΔPSI > 0 corresponds to in publication-grade reporting. Confusion is the most common reviewer comment for AS papers.

rMATS-turbo Workflow

Goal: Quantify SE/A5SS/A3SS/MXE/RI events from BAMs aligned with STAR 2-pass.

Approach: Group BAMs by condition, run rMATS with --statoff for quantification only, then parse JC.txt files for per-replicate PSI.

bash
rmats.py \
--b1 condition1_bams.txt \
--b2 condition2_bams.txt \
--gtf annotation.gtf \
-t paired \
--readLength 150 \
--variable-read-length \
--libType fr-firststrand \
--nthread 8 \
--od rmats_output \
--tmp rmats_tmp \
--novelSS \
--statoff

Key flags: --novelSS discovers junctions absent from the GTF (recommended with STAR 2-pass output). --variable-read-length allows mixed read lengths in the cohort. --libType fr-firststrand matches Illumina TruSeq stranded; verify with RSeQC infer_experiment.py. --statoff is for quantification-only runs; omit for differential testing.

python
import pandas as pd
se_jc = pd.read_csv('rmats_output/SE.MATS.JC.txt', sep='\t')
inc_cols = [c for c in se_jc.columns if c.startswith('IncLevel')]
se_jc['mean_PSI'] = se_jc[inc_cols].mean(axis=1)
per_rep_inc = se_jc['IJC_SAMPLE_1'].str.split(',').apply(lambda x: list(map(int, x)))
per_rep_skip = se_jc['SJC_SAMPLE_1'].str.split(',').apply(lambda x: list(map(int, x)))
min_inc = per_rep_inc.apply(min)
min_skip = per_rep_skip.apply(min)
reliable = se_jc[(min_inc + min_skip) >= 20]
JC vs JCEC files

SE.MATS.JC.txt uses only junction-spanning reads. SE.MATS.JCEC.txt adds reads contained within the alternative exon body as inclusion evidence.

  • Prefer JC for clean cassette-exon analysis when reads spanning junctions are sufficient.
  • Use JCEC when alternative exons are short (<50nt) and junction-spanning reads are scarce.
  • Avoid JCEC when intron retention overlaps the alternative exon body — exon-body reads may come from retained introns, not inclusion isoform.

SUPPA2 Workflow

Goal: Compute event PSI from transcript TPM without alignment; useful when Salmon/kallisto TPMs already exist.

Approach: Generate IOE event definitions from GTF, then aggregate TPMs of transcripts including/excluding each event.

bash
suppa.py generateEvents -i annotation.gtf -o events -f ioe -e SE SS MX RI AF AL
for ev in SE A5 A3 MX RI; do
suppa.py psiPerEvent -i events_${ev}_strict.ioe -e transcript_tpm.tsv -o psi_${ev}
done

SUPPA2 is annotation-bound: events absent from the GTF cannot be quantified. Whether an event is detected depends entirely on which transcripts the upstream Salmon/kallisto index contains. Use GENCODE comprehensive over basic when SUPPA2 detection sensitivity matters.

MAJIQ V3 Workflow

Goal: Quantify LSVs with Bayesian posterior PSI distributions; ideal for complex multi-junction events that don't fit canonical event types.

Approach: Build a splice graph from BAMs + GFF3, compute per-junction coverage with bootstrap, then run majiq psi for posterior PSI per LSV.

bash
majiq build annotation.gff3 -c settings.ini -j 8 -o build_output
majiq psi build_output/sample1.majiq build_output/sample2.majiq -j 4 -o psi_output -n condition_psi
voila view -p 5000 -j 8 build_output/splicegraph.zarr psi_output/condition_psi.psi.voila -o voila_output

MAJIQ V3 (Aicher, Slaff, Jewell, Barash bioRxiv 2024; public release 2025) replaced V2's SQLite splicegraph (splicegraph.sql) with Zarr storage (splicegraph.zarr); the .sql is deprecated. V3 is ~3.2x faster than V2 via xarray/zarr/Dask parallelization. LSV output includes posterior mean PSI plus the full posterior distribution; this enables threshold-based testing (e.g. P(|ΔPSI| > 0.2)) rather than frequentist p-values.

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
99
Repository forks
11
7-day trend score
28

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/swaruplab/operon/alternative-splicing-splicing-quantification/badge)](https://verified-skill.com/skills/swaruplab/operon/alternative-splicing-splicing-quantification)

Something wrong with this skill or its page? Tell us.