[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EDZ2XJP0XDBC45M5DRCSNF":3,"skill-same:01M7EDZ2XJP0XDBC45M5DRCSNF":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},"01M7EDZ2XJP0XDBC45M5DRCSNF","bio-isoform-switching",null,"Analyzes differential transcript usage (DTU) and isoform switches with functional consequence prediction (NMD via 50nt rule, ORF disruption, protein domain loss\u002Fgain, signal peptide changes, IDR alterations, coding-potential shifts). Tools include IsoformSwitchAnalyzeR v2 (auto-selects satuRn for >5 reps else DEXSeq), the manual DRIMSeq -> DEXSeq\u002FsatuRn -> stageR DTU pipeline, and fishpond\u002Fswish for inferential-uncertainty-aware DTE. Distinguishes DTU from DGE and DTE; integrates external annotators (CPC2, Pfam, SignalP, IUPred2A or DeepTMHMM). Use when investigating how splicing differences alter protein function or trigger NMD-mediated degradation.","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-isoform-switching\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-isoform-switching\ndescription: Analyzes differential transcript usage (DTU) and isoform switches with functional consequence prediction (NMD via 50nt rule, ORF disruption, protein domain loss\u002Fgain, signal peptide changes, IDR alterations, coding-potential shifts). Tools include IsoformSwitchAnalyzeR v2 (auto-selects satuRn for >5 reps else DEXSeq), the manual DRIMSeq -> DEXSeq\u002FsatuRn -> stageR DTU pipeline, and fishpond\u002Fswish for inferential-uncertainty-aware DTE. Distinguishes DTU from DGE and DTE; integrates external annotators (CPC2, Pfam, SignalP, IUPred2A or DeepTMHMM). Use when investigating how splicing differences alter protein function or trigger NMD-mediated degradation.\ntool_type: r\nprimary_tool: IsoformSwitchAnalyzeR\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"alternative-splicing\u002Fisoform-switching\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: IsoformSwitchAnalyzeR 2.11+, DRIMSeq 1.34+, DEXSeq 1.52+, satuRn 1.14+, stageR 1.28+, fishpond 2.14+, tximport 1.34+, tximeta 1.24+, Salmon 1.10+\n\nBefore using code patterns, verify installed versions match. If versions differ:\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# Isoform Switching and Differential Transcript Usage\n\nIdentify shifts in *which* transcript a gene predominantly uses between conditions, and predict functional consequences. Statistically distinct from DGE and DTE; biologically distinct because the same gene-level expression can hide a complete isoform switch with major protein-level consequences.\n\n## DGE vs DTE vs DTU: Which Question Is Being Asked?\n\n| Question | Statistic | Tool | Example claim |\n|----------|-----------|------|----------------|\n| **DGE** Does the gene total change? | Sum of transcript counts | DESeq2, edgeR, limma-voom | \"Gene X is upregulated 2-fold\" |\n| **DTE** Does this transcript change in absolute abundance? | Per-transcript count | swish (fishpond), DESeq2 on transcripts, sleuth | \"Transcript X-201 is upregulated 2-fold\" |\n| **DTU** Do proportions of transcripts within the gene shift? | Vector of per-transcript proportions | DRIMSeq, DEXSeq, satuRn (+ stageR) | \"Gene X switches from isoform 201 (50% -> 10%) to 202 (50% -> 90%)\" |\n\nDTU is statistically harder than DGE because:\n1. The null is **compositional** (proportions sum to 1; one transcript up means another down).\n2. **Multi-stage testing** is required: gene-level \"any DTU\" + transcript-level \"which transcript\" -> stageR formalizes this.\n3. **Quantification uncertainty propagates** when transcripts are similar (Salmon EM ambiguity).\n\nDTU and event-level differential splicing answer related but distinct questions: rMATS' `IncLevelDifference` is essentially a 1-D projection of a DTU shift onto a single event coordinate. The pragmatic 2026 default: run both an event-level tool (rMATS or leafcutter) and a DTU pipeline; reconcile.\n\n## Tool Selection for DTU\n\n| Tool | Model | When to use | Fails when |\n|------|-------|-------------|------------|\n| IsoformSwitchAnalyzeR v2 | Wraps DEXSeq or satuRn + functional consequence annotation | Standard interpretation workflow with NMD\u002Fdomain output | Manual DTU control needed; very large cohorts (>200) |\n| DRIMSeq | Dirichlet-multinomial on transcript counts; gene-level DTU | Pre-filter step before DEXSeq\u002FsatuRn | Cannot annotate functional consequences alone |\n| DEXSeq | Negative-binomial GLM on exon-bin or transcript counts | Classic DTU; conservative; \u003C=5 replicates per condition | Slow at scale; uses bins not transcripts in default mode |\n| satuRn | Quasi-binomial GLM with empirical-Bayes shrinkage | DTU at scale (single-cell, large bulk cohorts) | Newer; less battle-tested than DEXSeq |\n| swish (fishpond) | Non-parametric SAMseq across Salmon Gibbs samples | DTE\u002FDGE incorporating quantification uncertainty | Requires Gibbs samples; not strictly DTU |\n| stageR | Two-stage testing framework | Required for proper OFDR control on top of DRIMSeq\u002FDEXSeq\u002FsatuRn | Standalone — wraps another tool's output |\n| sleuth | Bootstrap-based DTE on kallisto | When committed to kallisto pipeline | Less active development; superseded by fishpond+swish |\n\nThe IsoformSwitchAnalyzeR v2 default rule is: **satuRn if any condition has >5 replicates; else DEXSeq.** For exactly 5 replicates per condition (boundary), explicitly choose; results may differ.\n\n## Decision Tree by Research Question\n\n| Question | Recommended approach |\n|----------|----------------------|\n| Functional consequences of switches (domains, NMD, signal peptide) | IsoformSwitchAnalyzeR v2 with full external annotator pipeline |\n| Pure statistical DTU (gene-level + transcript-level OFDR) | DRIMSeq (filter) -> DEXSeq -> stageR; or -> satuRn -> stageR for n>5 |\n| DTU with proper quantification uncertainty | Salmon `--numGibbsSamples 20` -> tximeta -> swish for DTE; concurrent DTU |\n| Single-cell DTU | satuRn (DEXSeq doesn't scale to scRNA-seq) |\n| Long-read DTU (PacBio Iso-Seq, ONT) | IsoformSwitchAnalyzeR v2 long-read input mode (no Salmon EM uncertainty) |\n| Time-course DTU | DEXSeq with time as factor + interaction; or limma::lmFit on logit-prop matrix |\n| Cancer \u002F disease — switch hits -> mechanism | Standard pipeline + cross-reference with eCLIP, ClinVar, COSMIC |\n| Therapeutic ASO target identification | Standard pipeline + sashimi visualization + SpliceAI design |\n\n## IsoformSwitchAnalyzeR v2 Workflow\n\n**Goal:** Identify isoform switches with functional consequences in one integrated workflow.\n\n**Approach:** Import Salmon, pre-filter, run statistical test (satuRn auto-selected if any condition has >5 replicates, else DEXSeq), annotate switches with external tools (CPC2, Pfam, SignalP, IUPred2A or DeepTMHMM), then summarize consequences.\n\n```r\nlibrary(IsoformSwitchAnalyzeR)\n\nsalmonQuant \u003C- importIsoformExpression(\n    parentDir = 'salmon_quant\u002F',\n    addIsofomIdAsColumn = TRUE\n)\n\ndesign \u003C- data.frame(\n    sampleID = colnames(salmonQuant$counts)[-1],\n    condition = c('control', 'control', 'control', 'treatment', 'treatment', 'treatment')\n)\n\naSwitchList \u003C- importRdata(\n    isoformCountMatrix = salmonQuant$counts,\n    isoformRepExpression = salmonQuant$abundance,\n    designMatrix = design,\n    isoformExonAnnoation = 'annotation.gtf',\n    isoformNtFasta = 'transcripts.fa',\n    showProgress = TRUE\n)\n\naSwitchList \u003C- preFilter(\n    aSwitchList,\n    geneExpressionCutoff = 1,\n    isoformExpressionCutoff = 0,\n    IFcutoff = 0.01,\n    removeSingleIsoformGenes = TRUE,\n    keepIsoformInAllConditions = TRUE\n)\n\naSwitchList \u003C- isoformSwitchTestSatuRn(\n    aSwitchList,\n    reduceToSwitchingGenes = TRUE,\n    alpha = 0.05,\n    dIFcutoff = 0.1\n)\n```\n\n`preFilter` parameters:\n- `geneExpressionCutoff = 1` — minimum TPM for gene to be tested (raise for stricter)\n- `isoformExpressionCutoff = 0` — minimum TPM per isoform (set to 1 for stricter)\n- `IFcutoff = 0.01` — minimum isoform fraction; below = noise\n- `removeSingleIsoformGenes = TRUE` — drop genes with only one detectable isoform (cannot have DTU)\n- `keepIsoformInAllConditions = TRUE` — require expression across all conditions\n\nFor long-read input, use `importRdata` with long-read transcript counts directly — bypasses Salmon EM uncertainty entirely.\n\n## Functional Consequence Annotation\n\n**Goal:** Predict how each switch alters protein structure, function, and stability.\n\n**Approach:** Extract sequences, run external annotators outside R, then re-import results into the switchAnalyzeRlist.\n\n```r\naSwitchList \u003C- extractSequence(\n    aSwitchList,\n    pathToOutput = 'sequences\u002F',\n    writeToFile = TRUE\n)\n\n# Run external tools on sequences\u002FisoformSwitchAnalyzeR_isoform_*.fasta\n# Then import:\n\n# IMPORTANT: ORF analysis must run BEFORE analyzeSwitchConsequences for NMD_status,\n# ORF_seq_similarity, and coding_potential consequences to be computed.\naSwitchList \u003C- analyzeORF(aSwitchList, orfMethod = 'longest', genomeObject = NULL)\n\naSwitchList \u003C- analyzeCPC2(aSwitchList, pathToCPC2resultFile = 'cpc2_results.txt', removeNoncodinORFs = TRUE)\naSwitchList \u003C- analyzePFAM(aSwitchList, pathToPFAMresultFile = 'pfam_results.txt')\naSwitchList \u003C- analyzeSignalP(aSwitchList, pathToSignalPresultFile = 'signalp_results.txt')\naSwitchList \u003C- analyzeIUPred2A(aSwitchList, pathToIUPred2AresultFile = 'iupred2_results.txt')\naSwitchList \u003C- analyzeAlternativeSplicing(aSwitchList, onlySwitchingGenes = TRUE)\n\naSwitchList \u003C- analyzeSwitchConsequences(\n    aSwitchList,\n    consequencesToAnalyze = c(\n        'intron_retention',\n        'coding_potential',\n        'ORF_seq_similarity',\n        'NMD_status',\n        'domains_identified',\n        'IDR_identified',\n        'IDR_type',\n        'signal_peptide_identified'\n    ),\n    dIFcutoff = 0.1\n)\n```\n\n| External tool | Purpose | Required for |\n|----------------|---------|--------------|\n| CPC2 (Coding Potential Calculator 2) | Coding vs non-coding classification | `coding_potential` consequence |\n| Pfam (HMMER hmmscan against Pfam-A) | Protein domain identification | `domains_identified` |\n| SignalP 6.0+ | Signal peptide prediction | `signal_peptide_identified` |\n| IUPred2A or DeepTMHMM | Intrinsic disorder regions \u002F TM domains | `IDR_identified`, `IDR_type` |\n| NetSurfP-3 | Surface accessibility (optional) | Extended IDR analysis |\n\nThe external tools must be run *outside* R; IsoformSwitchAnalyzeR provides FASTA outputs and re-imports the parsed results. Plan for ~30-60 minutes of external compute on typical mammalian transcriptomes.\n\n## NMD Prediction (The 50-nt Rule)\n\nA transcript is predicted NMD-sensitive if its premature termination codon (PTC) lies **>50-55 nt upstream of the last exon-exon junction** (Maquat 2004 *Nat Rev Mol Cell Biol*; Lykke-Andersen & Jensen 2015 *Nat Rev Mol Cell Biol*).\n\n**Mechanism:** Spliceosome deposits the Exon Junction Complex (EJC) ~20-24 nt upstream of every exon-exon junction. During the pioneer round of translation, ribosome reading through removes EJCs upstream of the stop codon. If a stop codon precedes the last EJC by >50 nt, the EJC remains, recruits UPF1 -> SMG1 phosphorylation -> SMG6\u002FSMG7 -> mRNA decay.\n\n**Caveats and exceptions:**\n- **Last-exon PTCs escape NMD** — can be dominant-negative or gain-of-function (e.g. MYH7 truncating variants).\n- **3'UTR length matters**: very long 3' UTRs (>1 kb past stop) trigger NMD via UPF1 binding even without EJCs (faux-3'UTR rule).\n- **Tissue-specific NMD**: SMG6 vs SMG5\u002F7 ratios vary; UPF1 stress conditions modulate.\n- **PTC distance must be measured on the spliced transcript**, not the genomic distance.\n- **~10-20% of \"predicted NMD\" transcripts escape NMD per orthogonal RNA-seq** (Lindeboom 2016 *Nat Genet*; ~22% of canonical PTC-bearing transcripts escape in some tissues). Treat NMD prediction as probabilistic, not certain.\n\nIsoformSwitchAnalyzeR's `analyzeSwitchConsequences` with `'NMD_status'` evaluates this from the predicted ORF + transcript model.\n\n## AS-NMD as a Regulatory Layer\n\nA large class of conserved alternative splicing events is **deliberately PTC-introducing** to titrate functional protein levels:\n\n- **All major SR proteins** (SRSF1-12) autoregulate via poison exons (Lareau 2007 *Nature*; Ni 2007 *Genes Dev*)\n- **All major hnRNPs** likewise\n- **Ribosomal protein genes** use AS-NMD autoregulation (e.g. rpL3, rpL12; Cuccurese 2005 *NAR*)\n- **SCN1A** poison exon -> Stoke STK-001 ASO in Phase 1\u002F2 for Dravet syndrome (Han 2020 *Sci Transl Med*)\n\n**Functional implication:** an *increase* in PSI of a poison exon *decreases* functional protein. Sign-of-effect in DTU output is opposite from intuition for these genes. Always check whether the alternative form is PTC-bearing before interpreting direction.\n\n**Disease examples:**\n- TDP-43 cryptic exons (UNC13A, STMN2) introduce PTCs -> NMD on disease-relevant transcript (Brown 2022 *Nature*)\n- Last-exon truncating variants in TTN (and MYH7): escape NMD -> stable poison\u002Fdominant-negative protein\n\n## Manual DTU Pipeline (DRIMSeq + DEXSeq + stageR)\n\nThe canonical reference is the *F1000Research* \"Swimming downstream\" workflow (Love, Soneson, Patro 2018; Bioconductor `rnaseqDTU`).\n\n```r\nlibrary(tximeta); library(DRIMSeq); library(DEXSeq); library(stageR)\n\nse \u003C- tximeta(coldata)\ncounts \u003C- assays(se)$counts\n\nsamples \u003C- data.frame(\n    sample_id = colnames(counts),\n    condition = c('control', 'control', 'control', 'treatment', 'treatment', 'treatment')\n)\n\ntxdf \u003C- data.frame(\n    gene_id = rowData(se)$gene_id,\n    feature_id = rowData(se)$tx_id,\n    counts\n)\n\nd \u003C- dmDSdata(counts = txdf, samples = samples)\nd \u003C- dmFilter(d, min_samps_feature_expr = 3, min_feature_expr = 10,\n              min_samps_feature_prop = 3, min_feature_prop = 0.1,\n              min_samps_gene_expr = 6, min_gene_expr = 10)\n\ndesign_full \u003C- model.matrix(~ condition, data = samples(d))\n\ndxd \u003C- DEXSeqDataSet(\n    countData = round(as.matrix(counts(d)[, -c(1, 2)])),\n    sampleData = samples(d),\n    design = ~ sample + exon + condition:exon,\n    featureID = counts(d)$feature_id,\n    groupID = counts(d)$gene_id\n)\ndxd \u003C- estimateSizeFactors(dxd)\ndxd \u003C- estimateDispersions(dxd, quiet = TRUE)\ndxd \u003C- testForDEU(dxd, reducedModel = ~ sample + exon)\nqval \u003C- perGeneQValue(DEXSeqResults(dxd))\n\ndxr \u003C- DEXSeqResults(dxd, independentFiltering = FALSE)\npConfirmation \u003C- matrix(dxr$pvalue, ncol = 1)\nrownames(pConfirmation) \u003C- dxr$featureID\ntx2gene \u003C- as.data.frame(dxr[, c('featureID', 'groupID')])\n\nstageRObj \u003C- stageRTx(\n    pScreen = qval,\n    pConfirmation = pConfirmation,\n    pScreenAdjusted = TRUE,\n    tx2gene = tx2gene\n)\nstageRObj \u003C- stageWiseAdjustment(stageRObj, method = 'dtu', alpha = 0.05)\n\nresults \u003C- getAdjustedPValues(stageRObj, order = FALSE, onlySignificantGenes = FALSE)\n```\n\n**stageR semantics:**\n- **Stage 1 (screening)**: gene-level p-value (`perGeneQValue` from DEXSeq, or DRIMSeq's gene-level p) is filtered at the desired Overall FDR.\n- **Stage 2 (confirmation)**: only within significant genes, individual transcripts are tested at a within-gene FWER computed to maintain global OFDR.\n- **Net effect**: gene-level FDR is properly controlled, AND the transcript that drove the call is known.\n- Without stageR: naive transcript-level BH overcounts because the gene-level multiple-testing burden is ignored.\n\n## fishpond\u002Fswish for Inferential-Uncertainty-Aware Testing\n\n**Goal:** Test DTE while propagating quantification uncertainty from Salmon's Gibbs samples.\n\n**Approach:** Run Salmon with `--numGibbsSamples 20`, import with tximeta, then use swish to average a non-parametric SAMseq-style test across inferential replicates.\n\n```r\nlibrary(fishpond); library(tximeta)\n\nse \u003C- tximeta(coldata)\ny \u003C- scaleInfReps(se)\ny \u003C- labelKeep(y)\ny \u003C- y[mcols(y)$keep, ]\n\nset.seed(1)\ny \u003C- swish(y, x = 'condition')\n\ndte_results \u003C- as.data.frame(mcols(y))\nsig \u003C- subset(dte_results, qvalue \u003C 0.05)\n```\n\n**`infRV`** (inferential relative variance) is a per-feature uncertainty diagnostic; high-infRV transcripts are unreliable and can be filtered before testing. Critical for genes with many similar isoforms (TTN, MAPT, NEFM) where Salmon's EM is uncertain.\n\n## Per-Tool Failure Modes\n\n### DEXSeq: Slowness at Scale\n\n**Trigger:** Bulk cohort with >50 samples or single-cell DTU.\n\n**Mechanism:** DEXSeq fits a NB GLM per exon-bin per gene; computational cost scales linearly with samples × bins.\n\n**Symptom:** `estimateDispersions` takes hours; `testForDEU` exhausts memory.\n\n**Fix:** Switch to satuRn (designed for scale, including scRNA-seq); run with parallelization (`BPPARAM = MulticoreParam(8)`).\n\n### DRIMSeq: Filtering Sensitivity\n\n**Trigger:** Default `dmFilter` parameters too strict for low-expression cohort.\n\n**Mechanism:** `min_samps_feature_expr = 3, min_feature_expr = 10` drops transcripts seen in \u003C=2 samples or with \u003C10 counts.\n\n**Symptom:** Most candidate genes filtered out; few testable genes.\n\n**Fix:** Tune to dataset: lower thresholds for low-coverage data, raise for high-coverage. Document choice.\n\n### satuRn: Empirical-Bayes Shrinkage Limits\n\n**Trigger:** Very small cohort (n=2 vs n=2) or very heterogeneous.\n\n**Mechanism:** Empirical-Bayes shrinkage assumes shared dispersion across genes; collapses with too-few or too-heterogeneous samples.\n\n**Symptom:** Inflated p-values; few discoveries despite real effects.\n\n**Fix:** Aggregate replicates (pseudobulk), or switch to DEXSeq for small cohorts; use larger cohorts when possible.\n\n### swish: Salmon Gibbs Requirements\n\n**Trigger:** Running swish on Salmon output without Gibbs samples.\n\n**Mechanism:** swish averages over inferential replicates from Salmon's Gibbs sampler; requires `--numGibbsSamples 20` (or bootstrap with `--numBootstraps`) at Salmon time.\n\n**Symptom:** `scaleInfReps` errors about missing inferential replicates.\n\n**Fix:** Re-run Salmon with `--numGibbsSamples 20`; this triples Salmon runtime but enables uncertainty-aware testing.\n\n### IsoformSwitchAnalyzeR: External-Annotator Failure\n\n**Trigger:** Forgetting to run all 4 external annotators (CPC2, Pfam, SignalP, IUPred2A).\n\n**Mechanism:** `analyzeSwitchConsequences` silently drops consequence types for which annotation wasn't imported.\n\n**Symptom:** `extractConsequenceSummary` shows fewer types than requested; specific consequence reports missing.\n\n**Fix:** Verify all 4 result files exist before `analyzeSwitchConsequences`; check `aSwitchList$AlternativeSplicingAnalysis` slot for completeness.\n\n## Reconciliation: When DTU and Event-Level Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| Significant DTU, no rMATS hit | DTU shift across many transcripts; no single canonical event captures it | Examine isoform structure in switchPlot; report at gene level |\n| rMATS sig, no significant DTU | Single event in single isoform; not a gene-level DTU | Report as event-level result; DTU not the right framing |\n| Both sig, same gene, different \"main\" isoforms | Annotation differs (rMATS uses GENCODE basic; ISA uses comprehensive) | Standardize annotation; re-run |\n| DTU shows poison-exon switch, gene-level DGE shows decrease | NMD-coupled regulation: AS-NMD reducing protein on top of transcription | Mechanism: AS-NMD; report direction carefully |\n\nFor high-confidence reporting: concordant DTU + event-level + sashimi visualization.\n\n## Single-Cell DTU\n\nFor scRNA-seq, **satuRn** scales where DEXSeq does not. IsoformSwitchAnalyzeR v2 supports single-cell input via `importRdata` with single-cell count matrices, and the underlying satuRn test has explicit single-cell calibration (Gilis 2022 *F1000Research*).\n\n**Strong recommendation:** pseudobulk by cell type first; per-cell DTU is rarely powered with droplet 3' chemistry. See `single-cell-splicing` for chemistry-specific limitations.\n\n## Visualization\n\n```r\nextractTopSwitches(\n    aSwitchList,\n    filterForConsequences = TRUE,\n    n = 25,\n    sortByQvals = TRUE\n)\n\nswitchPlot(\n    aSwitchList,\n    gene = 'TARGET_GENE',\n    condition1 = 'control',\n    condition2 = 'treatment',\n    localTheme = theme_bw(base_size = 12)\n)\n\nextractConsequenceSummary(aSwitchList, consequencesToAnalyze = 'all', plotGenes = FALSE)\nextractConsequenceEnrichment(aSwitchList, consequencesToAnalyze = 'all')\nextractSplicingSummary(aSwitchList, asFractionTotal = FALSE)\n```\n\n## Significance Thresholds\n\n| Parameter | Default | Notes |\n|-----------|---------|-------|\n| isoform_switch_q_value | \u003C 0.05 | Switch significance |\n| dIF (delta isoform fraction) | > 0.1 | Minimum biological effect |\n| Consequence q-value | \u003C 0.05 | Significance per consequence type |\n| Gene-level OFDR (stageR) | \u003C 0.05 | Gene-level screening FDR |\n| satuRn alpha | 0.05 | Empirical-Bayes alpha |\n| swish qvalue | \u003C 0.05 | Local FDR from qvalue package |\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `Error in importRdata: ... transcript_ids do not match` | Salmon index built from different annotation than provided GTF | Rebuild Salmon index with matching transcripts.fa |\n| `analyzeSwitchConsequences: not enough switching genes` | preFilter too strict; few candidate switches | Lower `geneExpressionCutoff`, `dIFcutoff` in test step |\n| `dmFilter: empty result` | Filter parameters too strict | Reduce `min_feature_expr`, `min_samps_feature_expr` |\n| `satuRn: rank-deficient design matrix` | Confounder perfectly correlated with condition | Drop the confounder or stratify analysis |\n| `swish: no inferential replicates found` | Salmon run without `--numGibbsSamples` | Re-run Salmon with `--numGibbsSamples 20` |\n| `analyzeIUPred2A: file not found` | External annotator output missing or wrong path | Verify CPC2\u002FPfam\u002FSignalP\u002FIUPred2A all completed and paths match |\n\n## Common Pitfalls\n\n- **Skipping stageR** -> inflated transcript-level FDR; gene-level multiple-testing burden ignored.\n- **Forgetting NMD direction** -> sign-of-effect on protein opposite to sign-of-effect on transcript when alternative form is a PTC-bearer. Always check.\n- **Treating short-read-derived isoform calls as ground truth** -> Salmon EM is uncertain; use Gibbs samples + swish if quantification uncertainty matters.\n- **Comparing across annotations** -> GENCODE basic vs comprehensive, RefSeq, Ensembl all have different transcript catalogs; switches \"appear\" or \"disappear\" with annotation choice. Document version.\n- **Not running long-read where possible** -> Iso-Seq \u002F ONT removes ambiguity for genes with many similar isoforms (TTN, MAPT, NEFM, DSCAM).\n- **Choosing satuRn or DEXSeq blindly at the n=5 boundary** -> IsoformSwitchAnalyzeR v2 auto-selects based on >5 vs \u003C=5; results may differ. Document choice.\n- **Reporting a \"switch\" without a sashimi plot** -> reviewers will demand it; do it upfront.\n- **Forgetting stageR also corrects gene-level p when starting from DRIMSeq** -> DRIMSeq's `gene_p` should be passed as `pScreen`, not raw transcript p-values.\n\n## Related Skills\n\n- differential-splicing - Event-level (rMATS, leafcutter, MAJIQ) complementary to DTU\n- splicing-quantification - PSI is a 1D projection of DTU shifts\n- splicing-qc - Verify upstream library, depth, alignment before DTU\n- sashimi-plots - Required visualization for switch validation and reporting\n- splice-variant-prediction - Connects SpliceAI variant predictions to specific isoforms\n- long-read-splicing - Full-isoform DTU bypasses transcript-quant uncertainty; preferred for many-isoform genes\n- pathway-analysis\u002Fgo-enrichment - Pathway enrichment of switching genes\n- rna-quantification\u002Falignment-free-quant - Salmon with `--numGibbsSamples` is upstream\n\n## References\n\n- Han et al 2025 *bioRxiv* 10.64898\u002F2025.12.08.693027 - IsoformSwitchAnalyzeR v2\n- Vitting-Seerup & Sandelin 2019 *Bioinformatics* 35:4469-4471 - IsoformSwitchAnalyzeR original\n- Anders et al 2012 *Genome Res* - DEXSeq\n- Nowicka & Robinson 2016 *F1000Research* - DRIMSeq\n- Gilis et al 2022 *F1000Research* - satuRn\n- Zhu et al 2019 *NAR* - swish \u002F fishpond\n- Van den Berge et al 2017 *Genome Biol* - stageR\n- Love, Soneson, Patro 2018 *F1000Research* - Swimming downstream DTU workflow\n- Maquat 2004 *Nat Rev Mol Cell Biol* - NMD review\n- Lykke-Andersen & Jensen 2015 *Nat Rev Mol Cell Biol* - NMD update\n- Lindeboom et al 2016 *Nat Genet* - NMD escape rates from RNA-seq\n- Lareau et al 2007 *Nature* - SR protein AS-NMD autoregulation\n- Ni et al 2007 *Genes Dev* - ultraconserved-element AS-NMD in splicing regulators\n- Cuccurese et al 2005 *NAR* 33:5965-5977 - ribosomal protein AS-NMD autoregulation\n- Brown et al 2022 *Nature* - UNC13A cryptic exon (TDP-43)\n- Han et al 2020 *Sci Transl Med* - SCN1A poison exon ASO\n","## Version Compatibility\n\nReference examples tested with: IsoformSwitchAnalyzeR 2.11+, DRIMSeq 1.34+, DEXSeq 1.52+, satuRn 1.14+, stageR 1.28+, fishpond 2.14+, tximport 1.34+, tximeta 1.24+, Salmon 1.10+\n\nBefore using code patterns, verify installed versions match. If versions differ:\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# Isoform Switching and Differential Transcript Usage\n\nIdentify shifts in *which* transcript a gene predominantly uses between conditions, and predict functional consequences. Statistically distinct from DGE and DTE; biologically distinct because the same gene-level expression can hide a complete isoform switch with major protein-level consequences.\n\n## DGE vs DTE vs DTU: Which Question Is Being Asked?\n\n| Question | Statistic | Tool | Example claim |\n|----------|-----------|------|----------------|\n| **DGE** Does the gene total change? | Sum of transcript counts | DESeq2, edgeR, limma-voom | \"Gene X is upregulated 2-fold\" |\n| **DTE** Does this transcript change in absolute abundance? | Per-transcript count | swish (fishpond), DESeq2 on transcripts, sleuth | \"Transcript X-201 is upregulated 2-fold\" |\n| **DTU** Do proportions of transcripts within the gene shift? | Vector of per-transcript proportions | DRIMSeq, DEXSeq, satuRn (+ stageR) | \"Gene X switches from isoform 201 (50% -> 10%) to 202 (50% -> 90%)\" |\n\nDTU is statistically harder than DGE because:\n1. The null is **compositional** (proportions sum to 1; one transcript up means another down).\n2. **Multi-stage testing** is required: gene-level \"any DTU\" + transcript-level \"which transcript\" -> stageR formalizes this.\n3. **Quantification uncertainty propagates** when transcripts are similar (Salmon EM ambiguity).\n\nDTU and event-level differential splicing answer related but distinct questions: rMATS' `IncLevelDifference` is essentially a 1-D projection of a DTU shift onto a single event coordinate. The pragmatic 2026 default: run both an event-level tool (rMATS or leafcutter) and a DTU pipeline; reconcile.\n\n## Tool Selection for DTU\n\n| Tool | Model | When to use | Fails when |\n|------|-------|-------------|------------|\n| IsoformSwitchAnalyzeR v2 | Wraps DEXSeq or satuRn + functional consequence annotation | Standard interpretation workflow with NMD\u002Fdomain output | Manual DTU control needed; very large cohorts (>200) |\n| DRIMSeq | Dirichlet-multinomial on transcript counts; gene-level DTU | Pre-filter step before DEXSeq\u002FsatuRn | Cannot annotate functional consequences alone |\n| DEXSeq | Negative-binomial GLM on exon-bin or transcript counts | Classic DTU; conservative; \u003C=5 replicates per condition | Slow at scale; uses bins not transcripts in default mode |\n| satuRn | Quasi-binomial GLM with empirical-Bayes shrinkage | DTU at scale (single-cell, large bulk cohorts) | Newer; less battle-tested than DEXSeq |\n| swish (fishpond) | Non-parametric SAMseq across Salmon Gibbs samples | DTE\u002FDGE incorporating quantification uncertainty | Requires Gibbs samples; not strictly DTU |\n| stageR | Two-stage testing framework | Required for proper OFDR control on top of DRIMSeq\u002FDEXSeq\u002FsatuRn | Standalone — wraps another tool's output |\n| sleuth | Bootstrap-based DTE on kallisto | When committed to kallisto pipeline | Less active development; superseded by fishpond+swish |\n\nThe IsoformSwitchAnalyzeR v2 default rule is: **satuRn if any condition has >5 replicates; else DEXSeq.** For exactly 5 replicates per condition (boundary), explicitly choose; results may differ.\n\n## Decision Tree by Research Question\n\n| Question | Recommended approach |\n|----------|----------------------|\n| Functional consequences of switches (domains, NMD, signal peptide) | IsoformSwitchAnalyzeR v2 with full external annotator pipeline |\n| Pure statistical DTU (gene-level + transcript-level OFDR) | DRIMSeq (filter) -> DEXSeq -> stageR; or -> satuRn -> stageR for n>5 |\n| DTU with proper quantification uncertainty | Salmon `--numGibbsSamples 20` -> tximeta -> swish for DTE; concurrent DTU |\n| Single-cell DTU | satuRn (DEXSeq doesn't scale to scRNA-seq) |\n| Long-read DTU (PacBio Iso-Seq, ONT) | IsoformSwitchAnalyzeR v2 long-read input mode (no Salmon EM uncertainty) |\n| Time-course DTU | DEXSeq with time as factor + interaction; or limma::lmFit on logit-prop matrix |\n| Cancer \u002F disease — switch hits -> mechanism | Standard pipeline + cross-reference with eCLIP, ClinVar, COSMIC |\n| Therapeutic ASO target identification | Standard pipeline + sashimi visualization + SpliceAI design |\n\n## IsoformSwitchAnalyzeR v2 Workflow\n\n**Goal:** Identify isoform switches with functional consequences in one integrated workflow.\n\n**Approach:** Import Salmon, pre-filter, run statistical test (satuRn auto-selected if any condition has >5 replicates, else DEXSeq), annotate switches with external tools (CPC2, Pfam, SignalP, IUPred2A or DeepTMHMM), then summarize consequences.\n\n```r\nlibrary(IsoformSwitchAnalyzeR)\n\nsalmonQuant \u003C- importIsoformExpression(\n    parentDir = 'salmon_quant\u002F',\n    addIsofomIdAsColumn = TRUE\n)\n\ndesign \u003C- data.frame(\n    sampleID = colnames(salmonQuant$counts)[-1],\n    condition = c('control', 'control', 'control', 'treatment', 'treatment', 'treatment')\n)\n\naSwitchList \u003C- importRdata(\n    isoformCountMatrix = salmonQuant$counts,\n    isoformRepExpression = salmonQuant$abundance,\n    designMatrix = design,\n    isoformExonAnnoation = 'annotation.gtf',\n    isoformNtFasta = 'transcripts.fa',\n    showProgress = TRUE\n)\n\naSwitchList \u003C- preFilter(\n    aSwitchList,\n    geneExpressionCutoff = 1,\n    isoformExpressionCutoff = 0,\n    IFcutoff = 0.01,\n    removeSingleIsoformGenes = TRUE,\n    keepIsoformInAllConditions = TRUE\n)\n\naSwitchList \u003C- isoformSwitchTestSatuRn(\n    aSwitchList,\n    reduceToSwitchingGenes = TRUE,\n    alpha = 0.05,\n    dIFcutoff = 0.1\n)\n```\n\n`preFilter` parameters:\n- `geneExpressionCutoff = 1` — minimum TPM for gene to be tested (raise for stricter)\n- `isoformExpressionCutoff = 0` — minimum TPM per isoform (set to 1 for stricter)\n- `IFcutoff = 0.01` — minimum isoform fraction; below = noise\n- `removeSingleIsoformGenes = TRUE` — drop genes with only one detectable isoform (cannot have DTU)\n- `keepIsoformInAllConditions = TRUE` — require expression across all conditions\n\nFor long-read input, use `importRdata` with long-read transcript counts directly — bypasses Salmon EM uncertainty entirely.\n\n## Functional Consequence Annotation\n\n**Goal:** Predict how each switch alters protein structure, function, and stability.\n\n**Approach:** Extract sequences, run external annotators outside R, then re-import results into the switchAnalyzeRlist.\n\n```r\naSwitchList \u003C- extractSequence(\n    aSwitchList,\n    pathToOutput = 'sequences\u002F',\n    writeToFile = TRUE\n)\n\n# Run external tools on sequences\u002FisoformSwitchAnalyzeR_isoform_*.fasta\n# Then import:\n\n# IMPORTANT: ORF analysis must run BEFORE analyzeSwitchConsequences for NMD_status,\n# ORF_seq_similarity, and coding_potential consequences to be computed.\naSwitchList \u003C- analyzeORF(aSwitchList, orfMethod = 'longest', genomeObject = NULL)\n\naSwitchList \u003C- analyzeCPC2(aSwitchList, pathToCPC2resultFile = 'cpc2_results.txt', removeNoncodinORFs = TRUE)\naSwitchList \u003C- analyzePFAM(aSwitchList, pathToPFAMresultFile = 'pfam_results.txt')\naSwitchList \u003C- analyzeSignalP(aSwitchList, pathToSignalPresultFile = 'signalp_results.txt')\naSwitchList \u003C- analyzeIUPred2A(aSwitchList, pathToIUPred2AresultFile = 'iupred2_results.txt')\naSwitchList \u003C- analyzeAlternativeSplicing(aSwitchList, onlySwitchingGenes = TRUE)\n\naSwitchList \u003C- analyzeSwitchConsequences(\n    aSwitchList,\n    consequencesToAnalyze = c(\n        'intron_retention',\n        'coding_potential',\n        'ORF_seq_similarity',\n        'NMD_status',\n        'domains_identified',\n        'IDR_identified',\n        'IDR_type',\n        'signal_peptide_identified'\n    ),\n    dIFcutoff = 0.1\n)\n```\n\n| External tool | Purpose | Required for |\n|----------------|---------|--------------|\n| CPC2 (Coding Potential Calculator 2) | Coding vs non-coding classification | `coding_potential` consequence |\n| Pfam (HMMER hmmscan against Pfam-A) | Protein domain identification | `domains_identified` |\n| SignalP 6.0+ | Signal peptide prediction | `signal_peptide_identified` |\n| IUPred2A or DeepTMHMM | Intrinsic disorder regions \u002F TM domains | `IDR_identified`, `IDR_type` |\n| NetSurfP-3 | Surface accessibility (optional) | Extended IDR analysis |\n\nThe external tools must be run *outside* R; IsoformSwitchAnalyzeR provides FASTA outputs and re-imports the parsed results. Plan for ~30-60 minutes of external compute on typical mammalian transcriptomes.\n\n## NMD Prediction (The 50-nt Rule)\n\nA transcript is predicted NMD-sensitive if its premature termination codon (PTC) lies **>50-55 nt upstream of the last exon-exon junction** (Maquat 2004 *Nat Rev Mol Cell Biol*; Lykke-Andersen & Jensen 2015 *Nat Rev Mol Cell Biol*).\n\n**Mechanism:** Spliceosome deposits the Exon Junction Complex (EJC) ~20-24 nt upstream of every exon-exon junction. During the pioneer round of translation, ribosome reading through removes EJCs upstream of the stop codon. If a stop codon precedes the last EJC by >50 nt, the EJC remains, recruits UPF1 -> SMG1 phosphorylation -> SMG6\u002FSMG7 -> mRNA decay.\n\n**Caveats and exceptions:**\n- **Last-exon PTCs escape NMD** — can be dominant-negative or gain-of-function (e.g. MYH7 truncating variants).\n- **3'UTR length matters**: very long 3' UTRs (>1 kb past stop) trigger NMD via UPF1 binding even without EJCs (faux-3'UTR rule).\n- **Tissue-specific NMD**: SMG6 vs SMG5\u002F7 ratios vary; UPF1 stress conditions modulate.\n- **PTC distance must be measured on the spliced transcript**, not the genomic distance.\n- **~10-20% of \"predicted NMD\" transcripts escape NMD per orthogonal RNA-seq** (Lindeboom 2016 *Nat Genet*; ~22% of canonical PTC-bearing transcripts escape in some tissues). Treat NMD prediction as probabilistic, not certain.\n\nIsoformSwitchAnalyzeR's `analyzeSwitchConsequences` with `'NMD_status'` evaluates this from the predicted ORF + transcript model.\n\n## AS-NMD as a Regulatory Layer\n\nA large class of conserved alternative splicing events is **deliberately PTC-introducing** to titrate functional protein levels:\n\n- **All major SR proteins** (SRSF1-12) autoregulate via poison exons (Lareau 2007 *Nature*; Ni 2007 *Genes Dev*)\n- **All major hnRNPs** likewise\n- **Ribosomal protein genes** use AS-NMD autoregulation (e.g. rpL3, rpL12; Cuccurese 2005 *NAR*)\n- **SCN1A** poison exon -> Stoke STK-001 ASO in Phase 1\u002F2 for Dravet syndrome (Han 2020 *Sci Transl Med*)\n\n**Functional implication:** an *increase* in PSI of a poison exon *decreases* functional protein. Sign-of-effect in DTU output is opposite from intuition for these genes. Always check whether the alternative form is PTC-bearing before interpreting direction.\n\n**Disease examples:**\n- TDP-43 cryptic exons (UNC13A, STMN2) introduce PTCs -> NMD on disease-relevant transcript (Brown 2022 *Nature*)\n- Last-exon truncating variants in TTN (and MYH7): escape NMD -> stable poison\u002Fdominant-negative protein\n\n## Manual DTU Pipeline (DRIMSeq + DEXSeq + stageR)\n\nThe canonical reference is the *F1000Research* \"Swimming downstream\" workflow (Love, Soneson, Patro 2018; Bioconductor `rnaseqDTU`).\n\n```r\nlibrary(tximeta); library(DRIMSeq); library(DEXSeq); library(stageR)\n\nse \u003C- tximeta(coldata)\ncounts \u003C- assays(se)$counts\n\nsamples \u003C- data.frame(\n    sample_id = colnames(counts),\n    condition = c('control', 'control', 'control', 'treatment', 'treatment', 'treatment')\n)\n\ntxdf \u003C- data.frame(\n    gene_id = rowData(se)$gene_id,\n    feature_id = rowData(se)$tx_id,\n    counts\n)\n\nd \u003C- dmDSdata(counts = txdf, samples = samples)\nd \u003C- dmFilter(d, min_samps_feature_expr = 3, min_feature_expr = 10,\n              min_samps_feature_prop = 3, min_feature_prop = 0.1,\n              min_samps_gene_expr = 6, min_gene_expr = 10)\n\ndesign_full \u003C- model.matrix(~ condition, data = samples(d))\n\ndxd \u003C- DEXSeqDataSet(\n    countData = round(as.matrix(counts(d)[, -c(1, 2)])),\n    sampleData = samples(d),\n    design = ~ sample + exon + condition:exon,\n    featureID = counts(d)$feature_id,\n    groupID = counts(d)$gene_id\n)\ndxd \u003C- estimateSizeFactors(dxd)\ndxd \u003C- estimateDispersions(dxd, quiet = TRUE)\ndxd \u003C- testForDEU(dxd, reducedModel = ~ sample + exon)\nqval \u003C- perGeneQValue(DEXSeqResults(dxd))\n\ndxr \u003C- DEXSeqResults(dxd, independentFiltering = FALSE)\npConfirmation \u003C- matrix(dxr$pvalue, ncol = 1)\nrownames(pConfirmation) \u003C- dxr$featureID\ntx2gene \u003C- as.data.frame(dxr[, c('featureID', 'groupID')])\n\nstageRObj \u003C- stageRTx(\n    pScreen = qval,\n    pConfirmation = pConfirmation,\n    pScreenAdjusted = TRUE,\n    tx2gene = tx2gene\n)\nstageRObj \u003C- stageWiseAdjustment(stageRObj, method = 'dtu', alpha = 0.05)\n\nresults \u003C- getAdjustedPValues(stageRObj, order = FALSE, onlySignificantGenes = FALSE)\n```\n\n**stageR semantics:**\n- **Stage 1 (screening)**: gene-level p-value (`perGeneQValue` from DEXSeq, or DRIMSeq's gene-level p) is filtered at the desired Overall FDR.\n- **Stage 2 (confirmation)**: only within significant genes, individual transcripts are tested at a within-gene FWER computed to maintain global OFDR.\n- **Net effect**: gene-level FDR is properly controlled, AND the transcript that drove the call is known.\n- Without stageR: naive transcript-level BH overcounts because the gene-level multiple-testing burden is ignored.\n\n## fishpond\u002Fswish for Inferential-Uncertainty-Aware Testing\n\n**Goal:** Test DTE while propagating quantification uncertainty from Salmon's Gibbs samples.\n\n**Approach:** Run Salmon with `--numGibbsSamples 20`, import with tximeta, then use swish to average a non-parametric SAMseq-style test across inferential replicates.\n\n```r\nlibrary(fishpond); library(tximeta)\n\nse \u003C- tximeta(coldata)\ny \u003C- scaleInfReps(se)\ny \u003C- labelKeep(y)\ny \u003C- y[mcols(y)$keep, ]\n\nset.seed(1)\ny \u003C- swish(y, x = 'condition')\n\ndte_results \u003C- as.data.frame(mcols(y))\nsig \u003C- subset(dte_results, qvalue \u003C 0.05)\n```\n\n**`infRV`** (inferential relative variance) is a per-feature uncertainty diagnostic; high-infRV transcripts are unreliable and can be filtered before testing. Critical for genes with many similar isoforms (TTN, MAPT, NEFM) where Salmon's EM is uncertain.\n\n## Per-Tool Failure Modes\n\n### DEXSeq: Slowness at Scale\n\n**Trigger:** Bulk cohort with >50 samples or single-cell DTU.\n\n**Mechanism:** DEXSeq fits a NB GLM per exon-bin per gene; computational cost scales linearly with samples × bins.\n\n**Symptom:** `estimateDispersions` takes hours; `testForDEU` exhausts memory.\n\n**Fix:** Switch to satuRn (designed for scale, including scRNA-seq); run with parallelization (`BPPARAM = MulticoreParam(8)`).\n\n### DRIMSeq: Filtering Sensitivity\n\n**Trigger:** Default `dmFilter` parameters too strict for low-expression cohort.\n\n**Mechanism:** `min_samps_feature_expr = 3, min_feature_expr = 10` drops transcripts seen in \u003C=2 samples or with \u003C10 counts.\n\n**Symptom:** Most candidate genes filtered out; few testable genes.\n\n**Fix:** Tune to dataset: lower thresholds for low-coverage data, raise for high-coverage. Document choice.\n\n### satuRn: Empirical-Bayes Shrinkage Limits\n\n**Trigger:** Very small cohort (n=2 vs n=2) or very heterogeneous.\n\n**Mechanism:** Empirical-Bayes shrinkage assumes shared dispersion across genes; collapses with too-few or too-heterogeneous samples.\n\n**Symptom:** Inflated p-values; few discoveries despite real effects.\n\n**Fix:** Aggregate replicates (pseudobulk), or switch to DEXSeq for small cohorts; use larger cohorts when possible.\n\n### swish: Salmon Gibbs Requirements\n\n**Trigger:** Running swish on Salmon output without Gibbs samples.\n\n**Mechanism:** swish averages over inferential replicates from Salmon's Gibbs sampler; requires `--numGibbsSamples 20` (or bootstrap with `--numBootstraps`) at Salmon time.\n\n**Symptom:** `scaleInfReps` errors about missing inferential replicates.\n\n**Fix:** Re-run Salmon with `--numGibbsSamples 20`; this triples Salmon runtime but enables uncertainty-aware testing.\n\n### IsoformSwitchAnalyzeR: External-Annotator Failure\n\n**Trigger:** Forgetting to run all 4 external annotators (CPC2, Pfam, SignalP, IUPred2A).\n\n**Mechanism:** `analyzeSwitchConsequences` silently drops consequence types for which annotation wasn't imported.\n\n**Symptom:** `extractConsequenceSummary` shows fewer types than requested; specific consequence reports missing.\n\n**Fix:** Verify all 4 result files exist before `analyzeSwitchConsequences`; check `aSwitchList$AlternativeSplicingAnalysis` slot for completeness.\n\n## Reconciliation: When DTU and Event-Level Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| Significant DTU, no rMATS hit | DTU shift across many transcripts; no single canonical event captures it | Examine isoform structure in switchPlot; report at gene level |\n| rMATS sig, no significant DTU | Single event in single isoform; not a gene-level DTU | Report as event-level result; DTU not the right framing |\n| Both sig, same gene, different \"main\" isoforms | Annotation differs (rMATS uses GENCODE basic; ISA uses comprehensive) | Standardize annotation; re-run |\n| DTU shows poison-exon switch, gene-level DGE shows decrease | NMD-coupled regulation: AS-NMD reducing protein on top of transcription | Mechanism: AS-NMD; report direction carefully |\n\nFor high-confidence reporting: concordant DTU + event-level + sashimi visualization.\n\n## Single-Cell DTU\n\nFor scRNA-seq, **satuRn** scales where DEXSeq does not. IsoformSwitchAnalyzeR v2 supports single-cell input via `importRdata` with single-cell count matrices, and the underlying satuRn test has explicit single-cell calibration (Gilis 2022 *F1000Research*).\n\n**Strong recommendation:** pseudobulk by cell type first; per-cell DTU is rarely powered with droplet 3' chemistry. See `single-cell-splicing` for chemistry-specific limitations.\n\n## Visualization\n\n```r\nextractTopSwitches(\n    aSwitchList,\n    filterForConsequences = TRUE,\n    n = 25,\n    sortByQvals = TRUE\n)\n\nswitchPlot(\n    aSwitchList,\n    gene = 'TARGET_GENE',\n    condition1 = 'control',\n    condition2 = 'treatment',\n    localTheme = theme_bw(base_size = 12)\n)\n\nextractConsequenceSummary(aSwitchList, consequencesToAnalyze = 'all', plotGenes = FALSE)\nextractConsequenceEnrichment(aSwitchList, consequencesToAnalyze = 'all')\nextractSplicingSummary(aSwitchList, asFractionTotal = FALSE)\n```\n\n## Significance Thresholds\n\n| Parameter | Default | Notes |\n|-----------|---------|-------|\n| isoform_switch_q_value | \u003C 0.05 | Switch significance |\n| dIF (delta isoform fraction) | > 0.1 | Minimum biological effect |\n| Consequence q-value | \u003C 0.05 | Significance per consequence type |\n| Gene-level OFDR (stageR) | \u003C 0.05 | Gene-level screening FDR |\n| satuRn alpha | 0.05 | Empirical-Bayes alpha |\n| swish qvalue | \u003C 0.05 | Local FDR from qvalue package |\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `Error in importRdata: ... transcript_ids do not match` | Salmon index built from different annotation than provided GTF | Rebuild Salmon index with matching transcripts.fa |\n| `analyzeSwitchConsequences: not enough switching genes` | preFilter too strict; few candidate switches | Lower `geneExpressionCutoff`, `dIFcutoff` in test step |\n| `dmFilter: empty result` | Filter parameters too strict | Reduce `min_feature_expr`, `min_samps_feature_expr` |\n| `satuRn: rank-deficient design matrix` | Confounder perfectly correlated with condition | Drop the confounder or stratify analysis |\n| `swish: no inferential replicates found` | Salmon run without `--numGibbsSamples` | Re-run Salmon with `--numGibbsSamples 20` |\n| `analyzeIUPred2A: file not found` | External annotator output missing or wrong path | Verify CPC2\u002FPfam\u002FSignalP\u002FIUPred2A all completed and paths match |\n\n## Common Pitfalls\n\n- **Skipping stageR** -> inflated transcript-level FDR; gene-level multiple-testing burden ignored.\n- **Forgetting NMD direction** -> sign-of-effect on protein opposite to sign-of-effect on transcript when alternative form is a PTC-bearer. Always check.\n- **Treating short-read-derived isoform calls as ground truth** -> Salmon EM is uncertain; use Gibbs samples + swish if quantification uncertainty matters.\n- **Comparing across annotations** -> GENCODE basic vs comprehensive, RefSeq, Ensembl all have different transcript catalogs; switches \"appear\" or \"disappear\" with annotation choice. Document version.\n- **Not running long-read where possible** -> Iso-Seq \u002F ONT removes ambiguity for genes with many similar isoforms (TTN, MAPT, NEFM, DSCAM).\n- **Choosing satuRn or DEXSeq blindly at the n=5 boundary** -> IsoformSwitchAnalyzeR v2 auto-selects based on >5 vs \u003C=5; results may differ. Document choice.\n- **Reporting a \"switch\" without a sashimi plot** -> reviewers will demand it; do it upfront.\n- **Forgetting stageR also corrects gene-level p when starting from DRIMSeq** -> DRIMSeq's `gene_p` should be passed as `pScreen`, not raw transcript p-values.\n\n## Related Skills\n\n- differential-splicing - Event-level (rMATS, leafcutter, MAJIQ) complementary to DTU\n- splicing-quantification - PSI is a 1D projection of DTU shifts\n- splicing-qc - Verify upstream library, depth, alignment before DTU\n- sashimi-plots - Required visualization for switch validation and reporting\n- splice-variant-prediction - Connects SpliceAI variant predictions to specific isoforms\n- long-read-splicing - Full-isoform DTU bypasses transcript-quant uncertainty; preferred for many-isoform genes\n- pathway-analysis\u002Fgo-enrichment - Pathway enrichment of switching genes\n- rna-quantification\u002Falignment-free-quant - Salmon with `--numGibbsSamples` is upstream\n\n## References\n\n- Han et al 2025 *bioRxiv* 10.64898\u002F2025.12.08.693027 - IsoformSwitchAnalyzeR v2\n- Vitting-Seerup & Sandelin 2019 *Bioinformatics* 35:4469-4471 - IsoformSwitchAnalyzeR original\n- Anders et al 2012 *Genome Res* - DEXSeq\n- Nowicka & Robinson 2016 *F1000Research* - DRIMSeq\n- Gilis et al 2022 *F1000Research* - satuRn\n- Zhu et al 2019 *NAR* - swish \u002F fishpond\n- Van den Berge et al 2017 *Genome Biol* - stageR\n- Love, Soneson, Patro 2018 *F1000Research* - Swimming downstream DTU workflow\n- Maquat 2004 *Nat Rev Mol Cell Biol* - NMD review\n- Lykke-Andersen & Jensen 2015 *Nat Rev Mol Cell Biol* - NMD update\n- Lindeboom et al 2016 *Nat Genet* - NMD escape rates from RNA-seq\n- Lareau et al 2007 *Nature* - SR protein AS-NMD autoregulation\n- Ni et al 2007 *Genes Dev* - ultraconserved-element AS-NMD in splicing regulators\n- Cuccurese et al 2005 *NAR* 33:5965-5977 - ribosomal protein AS-NMD autoregulation\n- Brown et al 2022 *Nature* - UNC13A cryptic exon (TDP-43)\n- Han et al 2020 *Sci Transl Med* - SCN1A poison exon ASO\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","r","2026-09-20","alternative-splicing\u002Fisoform-switching\u002FSKILL.md","IsoformSwitchAnalyzeR","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-isoform-switching","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-isoform-switching",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-isoform-switching",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-isoform-switching","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-isoform-switching\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fisoform_switch_analysis.R","OTHER","其他",5269,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-isoform-switching\u002Fexamples\u002Fisoform_switch_analysis.R",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",4008,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-isoform-switching\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",[],[]]