$npx -y skills add GPTomics/bioSkills --skill outlier-splicing-detectionDetects aberrant splicing in single rare-disease patients vs a control panel using FRASER 2.0 (Bioconductor; Beta-binomial autoencoder on Intron Jaccard Index, default delta cutoff 0.1, q hyperparameter), OUTRIDER (gene-level outlier expression via autoencoder denoising), Leafcut
| 1 | ## Version Compatibility |
| 2 | |
| 3 | Reference examples tested with: FRASER 2.0 (>=1.99.0), OUTRIDER 1.20+, LeafcutterMD via leafcutter 0.2.9+, DROP 1.4+, R 4.4+, BiocManager 1.30+ |
| 4 | |
| 5 | Before using code patterns, verify installed versions match. If versions differ: |
| 6 | - R: `packageVersion('<pkg>')` then `?function_name` to verify parameters |
| 7 | - CLI: `<tool> --version` then `<tool> --help` to confirm flags |
| 8 | |
| 9 | If code throws ImportError, AttributeError, or TypeError, introspect the installed |
| 10 | package and adapt the example to match the actual API rather than retrying. |
| 11 | |
| 12 | # Outlier Splicing Detection |
| 13 | |
| 14 | For clinical RNA-seq diagnostics in rare disease, the question is not "what differs between groups?" but "what is aberrant in this single patient relative to a panel of unaffected samples?". The statistical framework is **single-sample-vs-cohort outlier detection**, fundamentally different from two-group differential splicing. Tools in this space are designed for clinical Mendelian diagnostic settings. |
| 15 | |
| 16 | ## Tool Taxonomy |
| 17 | |
| 18 | | Tool | Statistic | Test target | Fails when | |
| 19 | |------|-----------|-------------|------------| |
| 20 | | FRASER 2.0 | Beta-binomial autoencoder on Intron Jaccard Index | Splicing outliers (per-sample, per-junction) | Cohort <20 samples; tissue mismatch | |
| 21 | | OUTRIDER | Autoencoder-denoised expression Z-score | Gene-level expression outliers (LoF, monoallelic) | Cohort <20 samples | |
| 22 | | LeafcutterMD | Dirichlet-multinomial outlier mode | Annotation-free intron usage | Beta-binomial fits poorly OR few controls | |
| 23 | | DROP | Snakemake pipeline | All of above + monoallelic expression | Pipeline complexity for small projects | |
| 24 | |
| 25 | Core reference: **FRASER 2.0** for splicing outliers, **OUTRIDER** for expression outliers, **DROP** to combine. Standard tool in EU rare-disease programs (Solve-RD) and NIH UDN. |
| 26 | |
| 27 | ## Decision Tree by Diagnostic Scenario |
| 28 | |
| 29 | | Scenario | Recommended approach | |
| 30 | |----------|----------------------| |
| 31 | | Single rare-disease patient + panel of n>=50 controls | FRASER 2.0 (Intron Jaccard Index) | |
| 32 | | Single patient + small panel (n=20-50) | FRASER 2.0 with auxiliary GTEx controls; tune q carefully | |
| 33 | | Patient + cohort <20 | Insufficient for outlier detection; consider differential or recruit more samples | |
| 34 | | Outlier expression suspected (loss of function, monoallelic) | OUTRIDER on same cohort | |
| 35 | | Annotation-free outlier (cryptic exon, novel junction) | LeafcutterMD | |
| 36 | | Integrated diagnostic pipeline (splicing + expression + MAE) | DROP | |
| 37 | | TDP-43 ALS post-mortem brain (cryptic exons) | FRASER 2.0; expect UNC13A, STMN2, ATG4B | |
| 38 | | SF3B1-mutant cancer sample | FRASER 2.0 with cohort-matched RNA-seq; expect cryptic 3'ss | |
| 39 | | Familial dysautonomia (ELP1) | FRASER 2.0 in fibroblast/iPSC; CNS tissue gives strongest signal | |
| 40 | | Stargardt deep-intronic ABCA4 | FRASER 2.0 in retina-relevant tissue | |
| 41 | | Solid tumor splicing biomarker | Differential splicing (n>=10 vs cohort) — see differential-splicing skill | |
| 42 | | RNA validation of SpliceAI hit | FRASER 2.0 + cross-reference with predicted variant location | |
| 43 | |
| 44 | ## When to Use Outlier vs Differential |
| 45 | |
| 46 | **Outlier regime** (this skill): |
| 47 | - Single patient or small case series vs control panel |
| 48 | - Question: "What is aberrant in this patient?" |
| 49 | - Statistical model: single-sample p-value vs cohort distribution |
| 50 | |
| 51 | **Differential regime** (differential-splicing skill): |
| 52 | - Two well-defined groups, n>=3 each |
| 53 | - Question: "What differs between groups?" |
| 54 | - Statistical model: two-group LRT or related |
| 55 | |
| 56 | If n>=10 patients with a shared phenotype are available, prefer **differential** (more power); if single patient or heterogeneous case series, use **outlier**. |
| 57 | |
| 58 | ## FRASER 2.0 Workflow |
| 59 | |
| 60 | **Goal:** Detect aberrant splicing in patient samples vs cohort using the Intron Jaccard Index. |
| 61 | |
| 62 | **Approach:** Count split reads per junction, compute Intron Jaccard Index per intron, fit a Beta-binomial autoencoder to estimate expected values, then flag outliers by p-value and delta. |
| 63 | |
| 64 | ```r |
| 65 | library(FRASER); library(BiocParallel) |
| 66 | |
| 67 | bam_files <- list.files('bams/', pattern='.bam$', full.names=TRUE) |
| 68 | sampl |