[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EFV6DW38FFZQDCGQQGAYHA":3,"skill-same:01M7EFV6DW38FFZQDCGQQGAYHA":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EFV6DW38FFZQDCGQQGAYHA","bio-splicing-quantification",null,"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\u002FALE), 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.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-splicing-quantification\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-splicing-quantification\ndescription: 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\u002FALE), 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.\ntool_type: mixed\nprimary_tool: rMATS-turbo\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"alternative-splicing\u002Fsplicing-quantification\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference 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+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\n# Splicing Quantification\n\nQuantify alternative splicing events as PSI (percent spliced in) from RNA-seq. PSI = inclusion read evidence \u002F (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.\n\n## Algorithmic Taxonomy\n\n| Family | Unit | Reference tools | Fails when |\n|--------|------|-----------------|------------|\n| Event-based | Pre-defined SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI events from annotation | rMATS-turbo, SUPPA2, VAST-TOOLS | Event isn't in annotation; complex multi-junction events split arbitrarily; AFE\u002FALE confounded with splicing |\n| LSV-based | Local Splice Variations at single source\u002Ftarget nodes | MAJIQ V3 | Memory-constrained environments; cohorts smaller than ~3 reps; non-academic users (license) |\n| Junction-cluster | Annotation-free intron clusters by shared splice sites | leafcutter, leafcutter2 | Undersampled clusters lose power; topology biologically uninterpretable for novel events |\n| Splice-graph | Graph nodes (non-overlapping exonic regions) | Whippet, Shiba | Whippet maintenance status uncertain since ~2022; complex multi-exon graphs |\n| Coverage-aware (IR) | Intron body coverage + flanking junctions | IRFinder-S, S-IRFindeR, iREAD | Confounded by overlapping exons, repeats, low mappability regions |\n| Isoform-based | Transcript abundance via EM | Salmon\u002Fkallisto + tximport | Salmon EM uncertainty propagates; many similar isoforms (TTN, MAPT) become indistinguishable |\n\nThe 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.\n\n## Event Taxonomy (Beyond Standard SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI)\n\n| Class | Code | Biology | Detection caveat |\n|-------|------|---------|-------------------|\n| Skipped exon (cassette) | SE | Default cassette-exon AS | Most common; well-handled by all tools |\n| Alternative 5' splice site | A5SS | Alternative donor; intron 5' end varies | Sign convention tool-specific (see below) |\n| Alternative 3' splice site | A3SS | Alternative acceptor; intron 3' end varies | Sensitive to BPS cancer mutations (SF3B1) — cryptic 3'ss ~10-30nt upstream |\n| Mutually exclusive exons | MXE | Two exons paired, one included | Tool implementations vary; verify which \"form 1\" is yours |\n| Retained intron | RI | Whole intron retained in mature mRNA | Junction-only quant systematically underdetects; needs IRFinder-S |\n| **Microexon** | (sub-SE) | 3-27 nt; neural-enriched, SRRM4-regulated | Missed by default aligner anchor lengths (>=20-30 nt); needs VAST-TOOLS, MicroExonator, or long-read |\n| **Exitron** | n\u002Fa | Intronic region within an annotated CDS exon | Mis-classified as A5SS\u002FA3SS by most tools; use ExitronFinder, ScanExitron |\n| **Alternative first exon (AFE)** | AFE | Alternative TSS \u002F promoter use | Promoter-driven, NOT spliceosomal; confirm with FANTOM CAGE before reporting as splicing |\n| **Alternative last exon (ALE)** | ALE | Alternative cleavage\u002Fpolyadenylation | APA-driven, NOT spliceosomal; confirm with 3'-end-seq |\n| **Detained intron (DI)** | (RI subtype) | Nuclear-retained on mature mRNA, regulated by Clk kinases | Distinct from cytoplasmic NMD-targeted RI (Boutz 2015 *Genes Dev*); requires fractionation to confirm |\n| **Recursive splicing** | (intron subtype) | Long introns >50kb spliced via internal ratchet points | Sibley 2015 *Nature*; only detectable with long-read or nascent RNA-seq |\n\nTool-agnostic taxonomy reference: Wang 2008 *Nature*; Vaquero-Garcia 2016 *eLife* (LSV); Tapial 2017 *Genome Res* (VastDB).\n\n## Tool Selection Matrix\n\n| Tool | Best for | Input | Strengths | Fails when |\n|------|----------|-------|-----------|------------|\n| rMATS-turbo | Standard SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI in annotated organism, n>=3 | BAM + GTF | Fast, well-calibrated at n>=3, novel SS support | Junction read imbalance; novel multi-junction events; underdetects RI and microexons |\n| SUPPA2 | Quick PSI from existing TPM, pilot analysis | Salmon\u002Fkallisto TPM + GTF | No alignment; fastest | Annotation-bound; high FDR (15-30%) at n\u003C=2 vs n\u003C=2 |\n| MAJIQ V3 | Complex events, heterogeneous cohorts (HET) | BAM + GFF3 | Bayesian posterior PSI, complete LSV semantics | High memory (~50+ GB on cohorts); academic license; complex LSV interpretation needs care |\n| leafcutter | Novel junction discovery, sQTL, low-memory environments | BAM (regtools junctions) | Annotation-free; ~400 MB memory; SOTA for unannotated organisms | Sensitive to read depth; cluster topology arbitrary for complex multi-junction events |\n| Shiba (2025) | Low-coverage \u002F few-replicate designs; junction imbalance correction | BAM + GTF | Best calibration in own benchmark at n=2 vs n=2 | New (2025); limited community calibration |\n| VAST-TOOLS | Cross-species comparative AS, microexons | FASTQ | VastDB orthology, ExOrthist co-tool | Limited to species in VastDB |\n| Whippet | Laptop-scale exploratory | FASTQ | Fast splice-graph-based PSI | Reduced active development since ~2022; underperforms on complex topologies |\n| IRFinder-S | Intron retention specifically | FASTQ | Coverage + junction integration; CNN-based artifact filtering | IR-only; not for cassette events |\n| S-IRFindeR | Replicate-stable IR ratio | BAM | Stable IR ratio metric | IR-only; less integrated than IRFinder-S |\n\nMethodology evolves; verify benchmarks (Olofsson 2023 *Biochem Biophys Res Commun*; 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 \u002F heterogeneous cohorts; switch to Shiba for n=2 vs n=2.\n\n## PSI Definition and Effective Length Normalization\n\nFor 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:\n\n```\nPSI = (IJC \u002F IncFormLen) \u002F (IJC \u002F IncFormLen + SJC \u002F SkipFormLen)\n```\n\nwhere 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\u002Fkallisto already accounts for. leafcutter operates on intron usage proportions within a cluster (a different statistic).\n\nFor long-read data, every read carries full isoform identity — effective-length normalization becomes unnecessary because each read counts as one isoform.\n\n## Sign Conventions for Alternative Splice Sites\n\n| Tool | A5SS interpretation | A3SS interpretation | \"Inclusion\" direction |\n|------|----------------------|----------------------|------------------------|\n| rMATS | \"long\" form = donor downstream of alternative donor | \"long\" form = acceptor upstream of alternative acceptor | PSI > 0 = more long form |\n| SUPPA2 | Same as rMATS (long = inclusion of additional exon body) | Same | PSI > 0 = more long form |\n| VAST-TOOLS | Encoded in event ID (`_D1` vs `_D2`) | Encoded in event ID (`_A1` vs `_A2`) | Document the chosen reference |\n| MAJIQ | Per-junction within LSV; explicit donor\u002Facceptor naming in VOILA | Same | PSI per junction in the LSV |\n\nAlways record which alternative form ΔPSI > 0 corresponds to in publication-grade reporting. Confusion is the most common reviewer comment for AS papers.\n\n## rMATS-turbo Workflow\n\n**Goal:** Quantify SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI events from BAMs aligned with STAR 2-pass.\n\n**Approach:** Group BAMs by condition, run rMATS with `--statoff` for quantification only, then parse JC.txt files for per-replicate PSI.\n\n```bash\nrmats.py \\\n    --b1 condition1_bams.txt \\\n    --b2 condition2_bams.txt \\\n    --gtf annotation.gtf \\\n    -t paired \\\n    --readLength 150 \\\n    --variable-read-length \\\n    --libType fr-firststrand \\\n    --nthread 8 \\\n    --od rmats_output \\\n    --tmp rmats_tmp \\\n    --novelSS \\\n    --statoff\n```\n\nKey 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.\n\n```python\nimport pandas as pd\n\nse_jc = pd.read_csv('rmats_output\u002FSE.MATS.JC.txt', sep='\\t')\n\ninc_cols = [c for c in se_jc.columns if c.startswith('IncLevel')]\nse_jc['mean_PSI'] = se_jc[inc_cols].mean(axis=1)\n\nper_rep_inc = se_jc['IJC_SAMPLE_1'].str.split(',').apply(lambda x: list(map(int, x)))\nper_rep_skip = se_jc['SJC_SAMPLE_1'].str.split(',').apply(lambda x: list(map(int, x)))\nmin_inc = per_rep_inc.apply(min)\nmin_skip = per_rep_skip.apply(min)\n\nreliable = se_jc[(min_inc + min_skip) >= 20]\n```\n\n### JC vs JCEC files\n\n`SE.MATS.JC.txt` uses **only junction-spanning reads**. `SE.MATS.JCEC.txt` adds **reads contained within the alternative exon body** as inclusion evidence.\n\n- Prefer **JC** for clean cassette-exon analysis when reads spanning junctions are sufficient.\n- Use **JCEC** when alternative exons are short (\u003C50nt) and junction-spanning reads are scarce.\n- Avoid **JCEC** when intron retention overlaps the alternative exon body — exon-body reads may come from retained introns, not inclusion isoform.\n\n## SUPPA2 Workflow\n\n**Goal:** Compute event PSI from transcript TPM without alignment; useful when Salmon\u002Fkallisto TPMs already exist.\n\n**Approach:** Generate IOE event definitions from GTF, then aggregate TPMs of transcripts including\u002Fexcluding each event.\n\n```bash\nsuppa.py generateEvents -i annotation.gtf -o events -f ioe -e SE SS MX RI FL\n\n# -e takes {SE,SS,MX,RI,FL}; SS emits A5+A3 files, FL emits AF+AL files\nfor ev in SE A5 A3 MX RI AF AL; do\n    suppa.py psiPerEvent -i events_${ev}_strict.ioe -e transcript_tpm.tsv -o psi_${ev}\ndone\n```\n\nSUPPA2 is annotation-bound: events absent from the GTF cannot be quantified. Whether an event is detected depends entirely on which transcripts the upstream Salmon\u002Fkallisto index contains. Use GENCODE comprehensive over basic when SUPPA2 detection sensitivity matters.\n\n## MAJIQ V3 Workflow\n\n**Goal:** Quantify LSVs with Bayesian posterior PSI distributions; ideal for complex multi-junction events that don't fit canonical event types.\n\n**Approach:** Build a splice graph from BAMs + GFF3, compute per-junction coverage with bootstrap, then run `majiq psi` for posterior PSI per LSV.\n\n```bash\nmajiq build annotation.gff3 -c settings.ini -j 8 -o build_output\nmajiq psi build_output\u002Fsample1.majiq build_output\u002Fsample2.majiq -j 4 -o psi_output -n condition_psi\nvoila view -p 5000 -j 8 build_output\u002Fsplicegraph.zarr psi_output\u002Fcondition_psi.psi.voila -o voila_output\n```\n\nMAJIQ 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 substantially faster than V2 via a rewritten xarray\u002Fzarr implementation with parallelized coverage calculations. 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.\n\n## leafcutter Junction Quantification\n\n**Goal:** Detect junctions and intron clusters annotation-free for downstream cluster-level usage.\n\n**Approach:** Extract junctions per BAM with regtools, write filenames into a list, then cluster introns sharing splice sites.\n\n```bash\nfor bam in *.bam; do\n    regtools junctions extract -a 8 -m 50 -s XS \"$bam\" -o \"${bam%.bam}.junc\"\ndone\nls *.junc > juncfiles.txt\n\npython leafcutter_cluster_regtools.py \\\n    -j juncfiles.txt \\\n    -o leafcutter \\\n    -m 50 \\\n    -l 500000\n```\n\n`-a 8` = 8nt anchor minimum (raise to 12 for stricter; lower to 6 for microexon-friendly). `-m 50` = minimum junction reads per cluster. `-l 500000` = max intron length (relevant for long brain-gene introns; raise for genes like DSCAM, ROBO2, ANK3).\n\n## Per-Tool Failure Modes\n\n### rMATS-turbo: Junction Read Imbalance\n\n**Trigger:** A cassette exon's flanking exons have unequal read mapping opportunity (very short upstream exon, repeat-overlapping flanks, or low-mappability regions).\n\n**Mechanism:** rMATS' binomial model treats inclusion vs skipping junctions as having equal mappability. When mappability differs between the two junction types, the PSI estimate is biased.\n\n**Symptom:** \"Significant\" rMATS calls with no concordant change in leafcutter or MAJIQ at the same locus; ΔPSI direction inconsistent with sashimi-plot intuition.\n\n**Fix:** Run Shiba (Kubota 2025 *NAR*) which corrects junction-imbalance, or filter rMATS hits requiring concordant detection in leafcutter.\n\n### SUPPA2: Sparse Empirical Null at Low Replicate Count\n\n**Trigger:** n=2 vs n=2 (or n=3 vs n=2) design with `--method empirical`.\n\n**Mechanism:** SUPPA2's empirical null is constructed from between-replicate ΔPSI distributions binned by transcript expression. With few replicates, the binned null is sparse and conservative-looking but actually under-calibrated.\n\n**Symptom:** Inflated FDR (15-30% in benchmarks); many \"significant\" hits don't replicate or validate.\n\n**Fix:** Switch to leafcutter or Shiba for n\u003C=3 designs; or use `--method classical` (Wilcoxon) for very low replicate count; reconcile against orthogonal tool.\n\n### MAJIQ V3: Complex LSV Interpretation\n\n**Trigger:** A gene with 4+ alternative splice sites at one node (e.g. one source, multiple acceptors).\n\n**Mechanism:** A complete LSV at a single node lists all observed junctions; PSI is per-junction within the LSV, not \"PSI of one event.\"\n\n**Symptom:** Reporting \"PSI of the gene\" doesn't make sense; per-junction PSIs sum to 1 across the LSV but no single number represents the gene.\n\n**Fix:** Use VOILA to visualize the LSV graph and identify which junction(s) shifted; for cassette-style reporting, derive equivalent PSI from sum of inclusion-junctions \u002F total junctions in the LSV.\n\n### leafcutter: Cluster Topology Arbitrariness\n\n**Trigger:** A cluster has 4+ introns sharing splice sites with non-canonical topology (e.g. mixed cassette + alternative donor + IR).\n\n**Mechanism:** leafcutter clusters introns by shared splice sites; complex topologies don't map onto SE\u002FA5SS\u002FA3SS taxonomy and cluster-level \"ΔPSI\" hides which intron drove the change.\n\n**Symptom:** Significant cluster-level p-value but multiple introns showing different effect-size directions.\n\n**Fix:** Inspect the cluster in leafviz; report per-intron effect sizes (`effect_sizes.txt`); for canonical event reporting, map to SE\u002FA5SS\u002FA3SS via flanking exon coordinates manually.\n\n## Reconciliation: When rMATS and leafcutter Disagree\n\nThe two most common short-read tools answer slightly different questions: rMATS classifies on annotated event templates; leafcutter classifies on observed cluster usage. Disagreement is informative.\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| rMATS sig, leafcutter not sig | rMATS junction read imbalance OR rMATS event hits an annotation that leafcutter clustered differently | Inspect locus in IGV; check Shiba |\n| leafcutter sig, rMATS not sig | Novel junction not in rMATS annotation; rMATS `--novelSS` may have missed it | Check `--novelSS` was on; rerun if not |\n| Both sig, opposite ΔPSI direction | Event class mismatch (e.g. rMATS calls SE positive but leafcutter sees A5SS shift in same cluster) | Manually map cluster topology to event class |\n| Both sig, same direction | High-confidence call | Report; cross-validate with sashimi-plot |\n\n**Operational rule:** for high-confidence reporting, require concordant detection in two tools from different algorithmic families (event-based + cluster-based, or LSV + isoform-based).\n\n## Intron Retention: Canonical vs Detained vs Co-Transcriptional Unspliced\n\nThree biologically distinct states all called \"IR\" by generic tools:\n\n1. **Canonical RI (cytoplasmic, NMD-substrate often)**: mature polyadenylated mRNA carries the intron; usually PTC-bearing and NMD-targeted, sometimes encoding an alternative protein.\n2. **Detained intron (DI)** (Boutz 2015 *Genes Dev*): nuclear-localized, mature transcripts retaining a specific intron; a regulated reservoir released into translation upon signaling.\n3. **Co-transcriptional unspliced**: nascent pre-mRNA captured before splicing complete; not a regulated state.\n\n**Library prep determines which state(s) are visible:**\n- Poly(A) selection: enriches (1), depletes (2)\u002F(3)\n- rRNA depletion (cytoplasmic): captures (1)\n- rRNA depletion (whole cell or nuclear): captures all three\n\n**To distinguish DI from canonical RI:** subcellular fractionation (nuclear vs cytoplasmic RNA-seq), or NMD inhibitor (cycloheximide, NMDi-14) treatment — canonical RI mRNA increases under NMD inhibition; DI does not.\n\n```bash\nIRFinder FastQ -r REF\u002F -d ir_output sample.fastq\n```\n\nIRFinder-S (Lorenzi 2021 *Genome Biol*) uses CNN-based filtering of true IR vs noise; current SOTA for IR analysis. iREAD and S-IRFindeR (Broseus & Ritchie 2020 *bioRxiv*) are alternatives.\n\n## Microexon Detection\n\nMicroexons (3-27 nt, neural-enriched, SRRM4-regulated; Irimia 2014 *Cell*) are missed by default short-read aligners requiring 20-30 nt anchors. Options:\n\n| Approach | Tool | Notes |\n|----------|------|-------|\n| Curated database lookup | VAST-TOOLS + VastDB | Cross-species, microexon-aware (Tapial 2017 *Genome Res*) |\n| De novo discovery | MicroExonator (Parada 2021 *Genome Biol*) | Snakemake pipeline |\n| Tune the upstream aligner | `STAR --alignSJoverhangMin 6 --alignSJDBoverhangMin 1 --outFilterMismatchNoverReadLmax 0.04` | rMATS itself cannot recover microexons that STAR didn't pass through; lower DB-junction overhang to 1 (trusts annotated microexon coords) and combine with strict mismatch filter. Typical AS pipelines use STAR 8\u002F3 which is too strict for microexons |\n| Long-read sequencing | PacBio Iso-Seq, ONT | Solves the problem entirely; reads span microexons fully |\n\nFor brain \u002F neural tissue or autism-spectrum studies, **microexon analysis must be explicit** — default short-read pipelines underdetect them by ~70%.\n\n## Quality Thresholds\n\n| Metric | Threshold | Source \u002F Rationale |\n|--------|-----------|---------------------|\n| Junction reads per replicate | >=10-20 (per-replicate minimum) | Empirical PSI variance becomes \u003C0.05 above this; below, PSI becomes a coin flip |\n| PSI dynamic range | mean PSI 0.05-0.95 | Outside is near-constitutive; rMATS, SUPPA2 default filters drop these |\n| Missing values | \u003C50% of samples | Higher missingness indicates low expression — re-test with subset |\n| Read length | >=75nt PE preferred; >=100nt for microexons | Shorter single-end reads bias junction detection toward shorter exons (convention) |\n| Library | rRNA depletion for IR analysis; poly(A) acceptable for cassette | poly(A) selection loses pre-mRNA\u002Fintronic signal (convention) |\n| STAR 2-pass | Cohort-style preferred over per-sample basic | Veeneman 2016 *Bioinformatics*: >=94% novel junction recovery |\n| MAJIQ minreads \u002F minpos | --minreads 10 --minpos 3 | Default; lower for low-coverage |\n| leafcutter -m | 50 reads per cluster | Higher for rare events; lower for sQTL discovery |\n| Anchor length | >=8 nt for short-read | Below this, false-positive junctions dominate (CIGAR-N noise) |\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended tool(s) | Why |\n|----------|----------------------|-----|\n| Standard cassette analysis, n>=3, GENCODE-annotated | rMATS-turbo + leafcutter (concordance) | Default workflow; complementary algorithmic families |\n| Non-model organism, no GENCODE-grade annotation | leafcutter + de novo discovery | Annotation-free |\n| Heterogeneous cohort, n>=10 vs n>=10 (clinical, GTEx-style) | MAJIQ V3 with HET module | HET designed for between-sample variability dominance |\n| Low coverage \u002F few replicates (n=2 vs n=2) | Shiba | Junction-imbalance correction; SOTA at low coverage in 2025 benchmarks |\n| Cross-species comparative (vertebrate panel) | VAST-TOOLS + VastDB | Orthology-aware events; ExOrthist co-tool |\n| TPM-only available (no BAMs) | SUPPA2 | Annotation-bound but fast |\n| Microexon focus (neural \u002F ASD) | VAST-TOOLS or MicroExonator | Default tools systematically miss microexons |\n| Intron retention focus | IRFinder-S (rRNA-depleted library) | Coverage-aware; CNN artifact filter |\n| Detained introns specifically | IRFinder-S + nuclear\u002Fcytoplasmic fractionation | Required to separate DI from cytoplasmic RI |\n| Long reads available | rMATS-long, FLAIR, IsoQuant | Full-isoform resolution; see long-read-splicing |\n| Single-cell (full-length plate) | MARVEL, BRIE2 | See single-cell-splicing |\n| Single-cell (10X 3') | Likely don't attempt; consider Sierra for APA | 10X 3' chemistry insufficient for AS |\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `error: GTF gene_id parsing` (rMATS) | rMATS expects GENCODE-style gene_id; some Ensembl GTFs use different attribute order | `gffread input.gff3 -T -o standardized.gtf` |\n| `KeyError: 'IJC_SAMPLE_1'` (rMATS parsing) | Output column missing; sometimes occurs when --statoff combined with novel events on older versions | Update rMATS-turbo to >=4.3.x; re-run |\n| `MAJIQ: too few reads at junction` | Default `--minreads 10 --minpos 3` filters out the locus | Lower thresholds for low-coverage data; document filtering |\n| `leafcutter: dispersion estimation failed` | Cluster has all-zero counts in one group | Pre-filter with leafcutter_ds.R `--min_samples_per_group 3 --min_samples_per_intron 5` |\n| `SUPPA2: empirical p computed on N=4 nulls` | Insufficient replicates for empirical mode | Switch `--method classical` (Wilcoxon) for very low replicate count |\n| `regtools: invalid CIGAR` | Non-BAM-spec read in input | Filter with `samtools view -h -F 0x100 -F 0x800` (drop secondary\u002Fsupplementary) |\n| `STAR: too many SJs` (in pass 2) | Cohort SJ.out.tab too large | Filter to junctions seen in >=3 samples or with >=3 unique reads before merging |\n\n## Output Interpretation\n\nPSI ranges 0 to 1: 1 = always included, 0 = always skipped, 0.5 = balanced. Sign of `IncLevelDifference` matches `--b1 minus --b2` group order — always document which is which in publications.\n\n**NMD direction matters:** an increase in PSI of a poison exon (PTC-introducing) **decreases** functional protein due to NMD. Always check whether the alternative form is PTC-bearing using ORF-aware annotation (IsoformSwitchAnalyzeR consequences, or manual stop-codon distance check vs last exon-exon junction).\n\n**Disease signatures:**\n- **SF3B1** mutations (MDS, CLL, uveal melanoma): cryptic 3'ss ~10-30 nt upstream of canonical (Darman 2015 *Cell Rep*). Look for clustered A3SS hits.\n- **U2AF1** mutations (lung adeno, MDS): altered preferences at 3'ss -3 position; cassette-exon shifts.\n- **TDP-43 loss** (ALS\u002FFTD): de novo cryptic exons in UNC13A, STMN2, ATG4B (Brown 2022 *Nature*; Klim 2019 *Nat Neurosci*) — annotation-free tools required (leafcutter denovo).\n\n## Common Pitfalls\n\n- Treating AFE\u002FALE as splicing — these are typically promoter-driven (AFE) or APA-driven (ALE), not spliceosomal. Confirm with FANTOM CAGE or 3'-end-seq.\n- Confusing detained introns with NMD-targeted RI — both call as \"IR\" but have opposite biological fates.\n- Using poly(A) libraries for IR analysis — biases toward mature transcripts, depletes pre-mRNA.\n- Single-end short reads — junction-spanning reads need >=8nt overhang on both sides; biases toward shorter exons.\n- Quoting \"PSI of the gene\" from MAJIQ LSV output — only per-junction PSI within an LSV is meaningful.\n- Skipping STAR 2-pass — loses ~14% of novel junctions; matters for any non-canonical organism or condition.\n- Trusting rMATS calls without `--novelSS` when STAR 2-pass found new junctions — rMATS will only quantify pre-annotated events.\n\n## Related Skills\n\n- differential-splicing - Compare PSI between conditions; use the same upstream alignment but switch to with-stat tools\n- splicing-qc - Run BEFORE quantification to verify library, depth, strandedness, alignment quality\n- isoform-switching - DTU framework with NMD\u002FORF\u002Fdomain consequences; complementary to event-level PSI\n- sashimi-plots - Visualize specific events for QC and reporting; concordance check across tools\n- splice-variant-prediction - SpliceAI\u002FPangolin for variant impact predictions to test against PSI changes\n- long-read-splicing - Full-isoform PSI without anchor-length limits; preferred for microexons and complex isoforms\n- read-alignment\u002Fstar-alignment - STAR 2-pass cohort-style alignment is required upstream\n- rna-quantification\u002Falignment-free-quant - Salmon\u002Fkallisto TPM is required for SUPPA2\n\n## References\n\n- Wang et al 2008 *Nature* - AS event taxonomy\n- Vaquero-Garcia et al 2016 *eLife* - MAJIQ LSV framework\n- Trincado et al 2018 *Genome Biol* - SUPPA2\n- Li et al 2018 *Nat Genet* - leafcutter\n- Tapial et al 2017 *Genome Res* - VAST-TOOLS \u002F VastDB\n- Wang et al 2024 *Nat Protoc* - rMATS-turbo\n- Aicher, Slaff, Jewell, Barash 2024 *bioRxiv* - MAJIQ V3\n- Kubota et al 2025 *NAR* - Shiba\n- Lorenzi et al 2021 *Genome Biol* - IRFinder-S\n- Boutz et al 2015 *Genes Dev* - detained introns\n- Irimia et al 2014 *Cell* - SRRM4 microexons\n- Darman et al 2015 *Cell Rep* - SF3B1 cryptic 3'ss\n- Olofsson et al 2023 *Biochem Biophys Res Commun* 653:31-37 - benchmark\n- Tran et al 2025 *WIREs RNA* - methodology review\n- Brown et al 2022 *Nature* - UNC13A cryptic exon (TDP-43)\n- Klim et al 2019 *Nat Neurosci* - STMN2 cryptic splicing\n- Veeneman et al 2016 *Bioinformatics* - STAR 2-pass benchmark\n","## Version Compatibility\n\nReference 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+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\n# Splicing Quantification\n\nQuantify alternative splicing events as PSI (percent spliced in) from RNA-seq. PSI = inclusion read evidence \u002F (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.\n\n## Algorithmic Taxonomy\n\n| Family | Unit | Reference tools | Fails when |\n|--------|------|-----------------|------------|\n| Event-based | Pre-defined SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI events from annotation | rMATS-turbo, SUPPA2, VAST-TOOLS | Event isn't in annotation; complex multi-junction events split arbitrarily; AFE\u002FALE confounded with splicing |\n| LSV-based | Local Splice Variations at single source\u002Ftarget nodes | MAJIQ V3 | Memory-constrained environments; cohorts smaller than ~3 reps; non-academic users (license) |\n| Junction-cluster | Annotation-free intron clusters by shared splice sites | leafcutter, leafcutter2 | Undersampled clusters lose power; topology biologically uninterpretable for novel events |\n| Splice-graph | Graph nodes (non-overlapping exonic regions) | Whippet, Shiba | Whippet maintenance status uncertain since ~2022; complex multi-exon graphs |\n| Coverage-aware (IR) | Intron body coverage + flanking junctions | IRFinder-S, S-IRFindeR, iREAD | Confounded by overlapping exons, repeats, low mappability regions |\n| Isoform-based | Transcript abundance via EM | Salmon\u002Fkallisto + tximport | Salmon EM uncertainty propagates; many similar isoforms (TTN, MAPT) become indistinguishable |\n\nThe 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.\n\n## Event Taxonomy (Beyond Standard SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI)\n\n| Class | Code | Biology | Detection caveat |\n|-------|------|---------|-------------------|\n| Skipped exon (cassette) | SE | Default cassette-exon AS | Most common; well-handled by all tools |\n| Alternative 5' splice site | A5SS | Alternative donor; intron 5' end varies | Sign convention tool-specific (see below) |\n| Alternative 3' splice site | A3SS | Alternative acceptor; intron 3' end varies | Sensitive to BPS cancer mutations (SF3B1) — cryptic 3'ss ~10-30nt upstream |\n| Mutually exclusive exons | MXE | Two exons paired, one included | Tool implementations vary; verify which \"form 1\" is yours |\n| Retained intron | RI | Whole intron retained in mature mRNA | Junction-only quant systematically underdetects; needs IRFinder-S |\n| **Microexon** | (sub-SE) | 3-27 nt; neural-enriched, SRRM4-regulated | Missed by default aligner anchor lengths (>=20-30 nt); needs VAST-TOOLS, MicroExonator, or long-read |\n| **Exitron** | n\u002Fa | Intronic region within an annotated CDS exon | Mis-classified as A5SS\u002FA3SS by most tools; use ExitronFinder, ScanExitron |\n| **Alternative first exon (AFE)** | AFE | Alternative TSS \u002F promoter use | Promoter-driven, NOT spliceosomal; confirm with FANTOM CAGE before reporting as splicing |\n| **Alternative last exon (ALE)** | ALE | Alternative cleavage\u002Fpolyadenylation | APA-driven, NOT spliceosomal; confirm with 3'-end-seq |\n| **Detained intron (DI)** | (RI subtype) | Nuclear-retained on mature mRNA, regulated by Clk kinases | Distinct from cytoplasmic NMD-targeted RI (Boutz 2015 *Genes Dev*); requires fractionation to confirm |\n| **Recursive splicing** | (intron subtype) | Long introns >50kb spliced via internal ratchet points | Sibley 2015 *Nature*; only detectable with long-read or nascent RNA-seq |\n\nTool-agnostic taxonomy reference: Wang 2008 *Nature*; Vaquero-Garcia 2016 *eLife* (LSV); Tapial 2017 *Genome Res* (VastDB).\n\n## Tool Selection Matrix\n\n| Tool | Best for | Input | Strengths | Fails when |\n|------|----------|-------|-----------|------------|\n| rMATS-turbo | Standard SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI in annotated organism, n>=3 | BAM + GTF | Fast, well-calibrated at n>=3, novel SS support | Junction read imbalance; novel multi-junction events; underdetects RI and microexons |\n| SUPPA2 | Quick PSI from existing TPM, pilot analysis | Salmon\u002Fkallisto TPM + GTF | No alignment; fastest | Annotation-bound; high FDR (15-30%) at n\u003C=2 vs n\u003C=2 |\n| MAJIQ V3 | Complex events, heterogeneous cohorts (HET) | BAM + GFF3 | Bayesian posterior PSI, complete LSV semantics | High memory (~50+ GB on cohorts); academic license; complex LSV interpretation needs care |\n| leafcutter | Novel junction discovery, sQTL, low-memory environments | BAM (regtools junctions) | Annotation-free; ~400 MB memory; SOTA for unannotated organisms | Sensitive to read depth; cluster topology arbitrary for complex multi-junction events |\n| Shiba (2025) | Low-coverage \u002F few-replicate designs; junction imbalance correction | BAM + GTF | Best calibration in own benchmark at n=2 vs n=2 | New (2025); limited community calibration |\n| VAST-TOOLS | Cross-species comparative AS, microexons | FASTQ | VastDB orthology, ExOrthist co-tool | Limited to species in VastDB |\n| Whippet | Laptop-scale exploratory | FASTQ | Fast splice-graph-based PSI | Reduced active development since ~2022; underperforms on complex topologies |\n| IRFinder-S | Intron retention specifically | FASTQ | Coverage + junction integration; CNN-based artifact filtering | IR-only; not for cassette events |\n| S-IRFindeR | Replicate-stable IR ratio | BAM | Stable IR ratio metric | IR-only; less integrated than IRFinder-S |\n\nMethodology evolves; verify benchmarks (Olofsson 2023 *Biochem Biophys Res Commun*; 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 \u002F heterogeneous cohorts; switch to Shiba for n=2 vs n=2.\n\n## PSI Definition and Effective Length Normalization\n\nFor 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:\n\n```\nPSI = (IJC \u002F IncFormLen) \u002F (IJC \u002F IncFormLen + SJC \u002F SkipFormLen)\n```\n\nwhere 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\u002Fkallisto already accounts for. leafcutter operates on intron usage proportions within a cluster (a different statistic).\n\nFor long-read data, every read carries full isoform identity — effective-length normalization becomes unnecessary because each read counts as one isoform.\n\n## Sign Conventions for Alternative Splice Sites\n\n| Tool | A5SS interpretation | A3SS interpretation | \"Inclusion\" direction |\n|------|----------------------|----------------------|------------------------|\n| rMATS | \"long\" form = donor downstream of alternative donor | \"long\" form = acceptor upstream of alternative acceptor | PSI > 0 = more long form |\n| SUPPA2 | Same as rMATS (long = inclusion of additional exon body) | Same | PSI > 0 = more long form |\n| VAST-TOOLS | Encoded in event ID (`_D1` vs `_D2`) | Encoded in event ID (`_A1` vs `_A2`) | Document the chosen reference |\n| MAJIQ | Per-junction within LSV; explicit donor\u002Facceptor naming in VOILA | Same | PSI per junction in the LSV |\n\nAlways record which alternative form ΔPSI > 0 corresponds to in publication-grade reporting. Confusion is the most common reviewer comment for AS papers.\n\n## rMATS-turbo Workflow\n\n**Goal:** Quantify SE\u002FA5SS\u002FA3SS\u002FMXE\u002FRI events from BAMs aligned with STAR 2-pass.\n\n**Approach:** Group BAMs by condition, run rMATS with `--statoff` for quantification only, then parse JC.txt files for per-replicate PSI.\n\n```bash\nrmats.py \\\n    --b1 condition1_bams.txt \\\n    --b2 condition2_bams.txt \\\n    --gtf annotation.gtf \\\n    -t paired \\\n    --readLength 150 \\\n    --variable-read-length \\\n    --libType fr-firststrand \\\n    --nthread 8 \\\n    --od rmats_output \\\n    --tmp rmats_tmp \\\n    --novelSS \\\n    --statoff\n```\n\nKey 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.\n\n```python\nimport pandas as pd\n\nse_jc = pd.read_csv('rmats_output\u002FSE.MATS.JC.txt', sep='\\t')\n\ninc_cols = [c for c in se_jc.columns if c.startswith('IncLevel')]\nse_jc['mean_PSI'] = se_jc[inc_cols].mean(axis=1)\n\nper_rep_inc = se_jc['IJC_SAMPLE_1'].str.split(',').apply(lambda x: list(map(int, x)))\nper_rep_skip = se_jc['SJC_SAMPLE_1'].str.split(',').apply(lambda x: list(map(int, x)))\nmin_inc = per_rep_inc.apply(min)\nmin_skip = per_rep_skip.apply(min)\n\nreliable = se_jc[(min_inc + min_skip) >= 20]\n```\n\n### JC vs JCEC files\n\n`SE.MATS.JC.txt` uses **only junction-spanning reads**. `SE.MATS.JCEC.txt` adds **reads contained within the alternative exon body** as inclusion evidence.\n\n- Prefer **JC** for clean cassette-exon analysis when reads spanning junctions are sufficient.\n- Use **JCEC** when alternative exons are short (\u003C50nt) and junction-spanning reads are scarce.\n- Avoid **JCEC** when intron retention overlaps the alternative exon body — exon-body reads may come from retained introns, not inclusion isoform.\n\n## SUPPA2 Workflow\n\n**Goal:** Compute event PSI from transcript TPM without alignment; useful when Salmon\u002Fkallisto TPMs already exist.\n\n**Approach:** Generate IOE event definitions from GTF, then aggregate TPMs of transcripts including\u002Fexcluding each event.\n\n```bash\nsuppa.py generateEvents -i annotation.gtf -o events -f ioe -e SE SS MX RI FL\n\n# -e takes {SE,SS,MX,RI,FL}; SS emits A5+A3 files, FL emits AF+AL files\nfor ev in SE A5 A3 MX RI AF AL; do\n    suppa.py psiPerEvent -i events_${ev}_strict.ioe -e transcript_tpm.tsv -o psi_${ev}\ndone\n```\n\nSUPPA2 is annotation-bound: events absent from the GTF cannot be quantified. Whether an event is detected depends entirely on which transcripts the upstream Salmon\u002Fkallisto index contains. Use GENCODE comprehensive over basic when SUPPA2 detection sensitivity matters.\n\n## MAJIQ V3 Workflow\n\n**Goal:** Quantify LSVs with Bayesian posterior PSI distributions; ideal for complex multi-junction events that don't fit canonical event types.\n\n**Approach:** Build a splice graph from BAMs + GFF3, compute per-junction coverage with bootstrap, then run `majiq psi` for posterior PSI per LSV.\n\n```bash\nmajiq build annotation.gff3 -c settings.ini -j 8 -o build_output\nmajiq psi build_output\u002Fsample1.majiq build_output\u002Fsample2.majiq -j 4 -o psi_output -n condition_psi\nvoila view -p 5000 -j 8 build_output\u002Fsplicegraph.zarr psi_output\u002Fcondition_psi.psi.voila -o voila_output\n```\n\nMAJIQ 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 substantially faster than V2 via a rewritten xarray\u002Fzarr implementation with parallelized coverage calculations. 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.\n\n## leafcutter Junction Quantification\n\n**Goal:** Detect junctions and intron clusters annotation-free for downstream cluster-level usage.\n\n**Approach:** Extract junctions per BAM with regtools, write filenames into a list, then cluster introns sharing splice sites.\n\n```bash\nfor bam in *.bam; do\n    regtools junctions extract -a 8 -m 50 -s XS \"$bam\" -o \"${bam%.bam}.junc\"\ndone\nls *.junc > juncfiles.txt\n\npython leafcutter_cluster_regtools.py \\\n    -j juncfiles.txt \\\n    -o leafcutter \\\n    -m 50 \\\n    -l 500000\n```\n\n`-a 8` = 8nt anchor minimum (raise to 12 for stricter; lower to 6 for microexon-friendly). `-m 50` = minimum junction reads per cluster. `-l 500000` = max intron length (relevant for long brain-gene introns; raise for genes like DSCAM, ROBO2, ANK3).\n\n## Per-Tool Failure Modes\n\n### rMATS-turbo: Junction Read Imbalance\n\n**Trigger:** A cassette exon's flanking exons have unequal read mapping opportunity (very short upstream exon, repeat-overlapping flanks, or low-mappability regions).\n\n**Mechanism:** rMATS' binomial model treats inclusion vs skipping junctions as having equal mappability. When mappability differs between the two junction types, the PSI estimate is biased.\n\n**Symptom:** \"Significant\" rMATS calls with no concordant change in leafcutter or MAJIQ at the same locus; ΔPSI direction inconsistent with sashimi-plot intuition.\n\n**Fix:** Run Shiba (Kubota 2025 *NAR*) which corrects junction-imbalance, or filter rMATS hits requiring concordant detection in leafcutter.\n\n### SUPPA2: Sparse Empirical Null at Low Replicate Count\n\n**Trigger:** n=2 vs n=2 (or n=3 vs n=2) design with `--method empirical`.\n\n**Mechanism:** SUPPA2's empirical null is constructed from between-replicate ΔPSI distributions binned by transcript expression. With few replicates, the binned null is sparse and conservative-looking but actually under-calibrated.\n\n**Symptom:** Inflated FDR (15-30% in benchmarks); many \"significant\" hits don't replicate or validate.\n\n**Fix:** Switch to leafcutter or Shiba for n\u003C=3 designs; or use `--method classical` (Wilcoxon) for very low replicate count; reconcile against orthogonal tool.\n\n### MAJIQ V3: Complex LSV Interpretation\n\n**Trigger:** A gene with 4+ alternative splice sites at one node (e.g. one source, multiple acceptors).\n\n**Mechanism:** A complete LSV at a single node lists all observed junctions; PSI is per-junction within the LSV, not \"PSI of one event.\"\n\n**Symptom:** Reporting \"PSI of the gene\" doesn't make sense; per-junction PSIs sum to 1 across the LSV but no single number represents the gene.\n\n**Fix:** Use VOILA to visualize the LSV graph and identify which junction(s) shifted; for cassette-style reporting, derive equivalent PSI from sum of inclusion-junctions \u002F total junctions in the LSV.\n\n### leafcutter: Cluster Topology Arbitrariness\n\n**Trigger:** A cluster has 4+ introns sharing splice sites with non-canonical topology (e.g. mixed cassette + alternative donor + IR).\n\n**Mechanism:** leafcutter clusters introns by shared splice sites; complex topologies don't map onto SE\u002FA5SS\u002FA3SS taxonomy and cluster-level \"ΔPSI\" hides which intron drove the change.\n\n**Symptom:** Significant cluster-level p-value but multiple introns showing different effect-size directions.\n\n**Fix:** Inspect the cluster in leafviz; report per-intron effect sizes (`effect_sizes.txt`); for canonical event reporting, map to SE\u002FA5SS\u002FA3SS via flanking exon coordinates manually.\n\n## Reconciliation: When rMATS and leafcutter Disagree\n\nThe two most common short-read tools answer slightly different questions: rMATS classifies on annotated event templates; leafcutter classifies on observed cluster usage. Disagreement is informative.\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| rMATS sig, leafcutter not sig | rMATS junction read imbalance OR rMATS event hits an annotation that leafcutter clustered differently | Inspect locus in IGV; check Shiba |\n| leafcutter sig, rMATS not sig | Novel junction not in rMATS annotation; rMATS `--novelSS` may have missed it | Check `--novelSS` was on; rerun if not |\n| Both sig, opposite ΔPSI direction | Event class mismatch (e.g. rMATS calls SE positive but leafcutter sees A5SS shift in same cluster) | Manually map cluster topology to event class |\n| Both sig, same direction | High-confidence call | Report; cross-validate with sashimi-plot |\n\n**Operational rule:** for high-confidence reporting, require concordant detection in two tools from different algorithmic families (event-based + cluster-based, or LSV + isoform-based).\n\n## Intron Retention: Canonical vs Detained vs Co-Transcriptional Unspliced\n\nThree biologically distinct states all called \"IR\" by generic tools:\n\n1. **Canonical RI (cytoplasmic, NMD-substrate often)**: mature polyadenylated mRNA carries the intron; usually PTC-bearing and NMD-targeted, sometimes encoding an alternative protein.\n2. **Detained intron (DI)** (Boutz 2015 *Genes Dev*): nuclear-localized, mature transcripts retaining a specific intron; a regulated reservoir released into translation upon signaling.\n3. **Co-transcriptional unspliced**: nascent pre-mRNA captured before splicing complete; not a regulated state.\n\n**Library prep determines which state(s) are visible:**\n- Poly(A) selection: enriches (1), depletes (2)\u002F(3)\n- rRNA depletion (cytoplasmic): captures (1)\n- rRNA depletion (whole cell or nuclear): captures all three\n\n**To distinguish DI from canonical RI:** subcellular fractionation (nuclear vs cytoplasmic RNA-seq), or NMD inhibitor (cycloheximide, NMDi-14) treatment — canonical RI mRNA increases under NMD inhibition; DI does not.\n\n```bash\nIRFinder FastQ -r REF\u002F -d ir_output sample.fastq\n```\n\nIRFinder-S (Lorenzi 2021 *Genome Biol*) uses CNN-based filtering of true IR vs noise; current SOTA for IR analysis. iREAD and S-IRFindeR (Broseus & Ritchie 2020 *bioRxiv*) are alternatives.\n\n## Microexon Detection\n\nMicroexons (3-27 nt, neural-enriched, SRRM4-regulated; Irimia 2014 *Cell*) are missed by default short-read aligners requiring 20-30 nt anchors. Options:\n\n| Approach | Tool | Notes |\n|----------|------|-------|\n| Curated database lookup | VAST-TOOLS + VastDB | Cross-species, microexon-aware (Tapial 2017 *Genome Res*) |\n| De novo discovery | MicroExonator (Parada 2021 *Genome Biol*) | Snakemake pipeline |\n| Tune the upstream aligner | `STAR --alignSJoverhangMin 6 --alignSJDBoverhangMin 1 --outFilterMismatchNoverReadLmax 0.04` | rMATS itself cannot recover microexons that STAR didn't pass through; lower DB-junction overhang to 1 (trusts annotated microexon coords) and combine with strict mismatch filter. Typical AS pipelines use STAR 8\u002F3 which is too strict for microexons |\n| Long-read sequencing | PacBio Iso-Seq, ONT | Solves the problem entirely; reads span microexons fully |\n\nFor brain \u002F neural tissue or autism-spectrum studies, **microexon analysis must be explicit** — default short-read pipelines underdetect them by ~70%.\n\n## Quality Thresholds\n\n| Metric | Threshold | Source \u002F Rationale |\n|--------|-----------|---------------------|\n| Junction reads per replicate | >=10-20 (per-replicate minimum) | Empirical PSI variance becomes \u003C0.05 above this; below, PSI becomes a coin flip |\n| PSI dynamic range | mean PSI 0.05-0.95 | Outside is near-constitutive; rMATS, SUPPA2 default filters drop these |\n| Missing values | \u003C50% of samples | Higher missingness indicates low expression — re-test with subset |\n| Read length | >=75nt PE preferred; >=100nt for microexons | Shorter single-end reads bias junction detection toward shorter exons (convention) |\n| Library | rRNA depletion for IR analysis; poly(A) acceptable for cassette | poly(A) selection loses pre-mRNA\u002Fintronic signal (convention) |\n| STAR 2-pass | Cohort-style preferred over per-sample basic | Veeneman 2016 *Bioinformatics*: >=94% novel junction recovery |\n| MAJIQ minreads \u002F minpos | --minreads 10 --minpos 3 | Default; lower for low-coverage |\n| leafcutter -m | 50 reads per cluster | Higher for rare events; lower for sQTL discovery |\n| Anchor length | >=8 nt for short-read | Below this, false-positive junctions dominate (CIGAR-N noise) |\n\n## Decision Tree by Scenario\n\n| Scenario | Recommended tool(s) | Why |\n|----------|----------------------|-----|\n| Standard cassette analysis, n>=3, GENCODE-annotated | rMATS-turbo + leafcutter (concordance) | Default workflow; complementary algorithmic families |\n| Non-model organism, no GENCODE-grade annotation | leafcutter + de novo discovery | Annotation-free |\n| Heterogeneous cohort, n>=10 vs n>=10 (clinical, GTEx-style) | MAJIQ V3 with HET module | HET designed for between-sample variability dominance |\n| Low coverage \u002F few replicates (n=2 vs n=2) | Shiba | Junction-imbalance correction; SOTA at low coverage in 2025 benchmarks |\n| Cross-species comparative (vertebrate panel) | VAST-TOOLS + VastDB | Orthology-aware events; ExOrthist co-tool |\n| TPM-only available (no BAMs) | SUPPA2 | Annotation-bound but fast |\n| Microexon focus (neural \u002F ASD) | VAST-TOOLS or MicroExonator | Default tools systematically miss microexons |\n| Intron retention focus | IRFinder-S (rRNA-depleted library) | Coverage-aware; CNN artifact filter |\n| Detained introns specifically | IRFinder-S + nuclear\u002Fcytoplasmic fractionation | Required to separate DI from cytoplasmic RI |\n| Long reads available | rMATS-long, FLAIR, IsoQuant | Full-isoform resolution; see long-read-splicing |\n| Single-cell (full-length plate) | MARVEL, BRIE2 | See single-cell-splicing |\n| Single-cell (10X 3') | Likely don't attempt; consider Sierra for APA | 10X 3' chemistry insufficient for AS |\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `error: GTF gene_id parsing` (rMATS) | rMATS expects GENCODE-style gene_id; some Ensembl GTFs use different attribute order | `gffread input.gff3 -T -o standardized.gtf` |\n| `KeyError: 'IJC_SAMPLE_1'` (rMATS parsing) | Output column missing; sometimes occurs when --statoff combined with novel events on older versions | Update rMATS-turbo to >=4.3.x; re-run |\n| `MAJIQ: too few reads at junction` | Default `--minreads 10 --minpos 3` filters out the locus | Lower thresholds for low-coverage data; document filtering |\n| `leafcutter: dispersion estimation failed` | Cluster has all-zero counts in one group | Pre-filter with leafcutter_ds.R `--min_samples_per_group 3 --min_samples_per_intron 5` |\n| `SUPPA2: empirical p computed on N=4 nulls` | Insufficient replicates for empirical mode | Switch `--method classical` (Wilcoxon) for very low replicate count |\n| `regtools: invalid CIGAR` | Non-BAM-spec read in input | Filter with `samtools view -h -F 0x100 -F 0x800` (drop secondary\u002Fsupplementary) |\n| `STAR: too many SJs` (in pass 2) | Cohort SJ.out.tab too large | Filter to junctions seen in >=3 samples or with >=3 unique reads before merging |\n\n## Output Interpretation\n\nPSI ranges 0 to 1: 1 = always included, 0 = always skipped, 0.5 = balanced. Sign of `IncLevelDifference` matches `--b1 minus --b2` group order — always document which is which in publications.\n\n**NMD direction matters:** an increase in PSI of a poison exon (PTC-introducing) **decreases** functional protein due to NMD. Always check whether the alternative form is PTC-bearing using ORF-aware annotation (IsoformSwitchAnalyzeR consequences, or manual stop-codon distance check vs last exon-exon junction).\n\n**Disease signatures:**\n- **SF3B1** mutations (MDS, CLL, uveal melanoma): cryptic 3'ss ~10-30 nt upstream of canonical (Darman 2015 *Cell Rep*). Look for clustered A3SS hits.\n- **U2AF1** mutations (lung adeno, MDS): altered preferences at 3'ss -3 position; cassette-exon shifts.\n- **TDP-43 loss** (ALS\u002FFTD): de novo cryptic exons in UNC13A, STMN2, ATG4B (Brown 2022 *Nature*; Klim 2019 *Nat Neurosci*) — annotation-free tools required (leafcutter denovo).\n\n## Common Pitfalls\n\n- Treating AFE\u002FALE as splicing — these are typically promoter-driven (AFE) or APA-driven (ALE), not spliceosomal. Confirm with FANTOM CAGE or 3'-end-seq.\n- Confusing detained introns with NMD-targeted RI — both call as \"IR\" but have opposite biological fates.\n- Using poly(A) libraries for IR analysis — biases toward mature transcripts, depletes pre-mRNA.\n- Single-end short reads — junction-spanning reads need >=8nt overhang on both sides; biases toward shorter exons.\n- Quoting \"PSI of the gene\" from MAJIQ LSV output — only per-junction PSI within an LSV is meaningful.\n- Skipping STAR 2-pass — loses ~14% of novel junctions; matters for any non-canonical organism or condition.\n- Trusting rMATS calls without `--novelSS` when STAR 2-pass found new junctions — rMATS will only quantify pre-annotated events.\n\n## Related Skills\n\n- differential-splicing - Compare PSI between conditions; use the same upstream alignment but switch to with-stat tools\n- splicing-qc - Run BEFORE quantification to verify library, depth, strandedness, alignment quality\n- isoform-switching - DTU framework with NMD\u002FORF\u002Fdomain consequences; complementary to event-level PSI\n- sashimi-plots - Visualize specific events for QC and reporting; concordance check across tools\n- splice-variant-prediction - SpliceAI\u002FPangolin for variant impact predictions to test against PSI changes\n- long-read-splicing - Full-isoform PSI without anchor-length limits; preferred for microexons and complex isoforms\n- read-alignment\u002Fstar-alignment - STAR 2-pass cohort-style alignment is required upstream\n- rna-quantification\u002Falignment-free-quant - Salmon\u002Fkallisto TPM is required for SUPPA2\n\n## References\n\n- Wang et al 2008 *Nature* - AS event taxonomy\n- Vaquero-Garcia et al 2016 *eLife* - MAJIQ LSV framework\n- Trincado et al 2018 *Genome Biol* - SUPPA2\n- Li et al 2018 *Nat Genet* - leafcutter\n- Tapial et al 2017 *Genome Res* - VAST-TOOLS \u002F VastDB\n- Wang et al 2024 *Nat Protoc* - rMATS-turbo\n- Aicher, Slaff, Jewell, Barash 2024 *bioRxiv* - MAJIQ V3\n- Kubota et al 2025 *NAR* - Shiba\n- Lorenzi et al 2021 *Genome Biol* - IRFinder-S\n- Boutz et al 2015 *Genes Dev* - detained introns\n- Irimia et al 2014 *Cell* - SRRM4 microexons\n- Darman et al 2015 *Cell Rep* - SF3B1 cryptic 3'ss\n- Olofsson et al 2023 *Biochem Biophys Res Commun* 653:31-37 - benchmark\n- Tran et al 2025 *WIREs RNA* - methodology review\n- Brown et al 2022 *Nature* - UNC13A cryptic exon (TDP-43)\n- Klim et al 2019 *Nat Neurosci* - STMN2 cryptic splicing\n- Veeneman et al 2016 *Bioinformatics* - STAR 2-pass benchmark\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","mixed","2026-09-20","alternative-splicing\u002Fsplicing-quantification\u002FSKILL.md","rMATS-turbo","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-splicing-quantification","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-splicing-quantification",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-splicing-quantification",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-splicing-quantification","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-splicing-quantification\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fquantify_splicing.py","SCRIPT","脚本",4968,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-splicing-quantification\u002Fexamples\u002Fquantify_splicing.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",3814,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-splicing-quantification\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]