[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EE2CDFTJVCX2ATZXHMYCSH":3,"skill-same:01M7EE2CDFTJVCX2ATZXHMYCSH":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},"01M7EE2CDFTJVCX2ATZXHMYCSH","bio-long-read-splicing",null,"Analyzes alternative splicing from PacBio Iso-Seq (HiFi, Kinnex\u002FMAS-Iso-seq) and Oxford Nanopore (direct cDNA, direct RNA, R10.4.1+) long-read RNA-seq with full-isoform resolution. Tools include FLAIR (correct\u002Fcollapse\u002Fquantify\u002FdiffSplice for PacBio + ONT), IsoQuant (de-novo or annotation-guided isoform discovery 2024 SOTA), Bambu (annotation-aware Bayesian discovery + quantification with Novel Discovery Rate), SQANTI3 (isoform classification: FSM\u002FISM\u002FNIC\u002FNNC + artifact flags), rMATS-long (event calling on long-read isoforms), and minimap2 (-ax splice:hq for HiFi; -ax splice -k14 for ONT cDNA; add -uf only for direct RNA or stranded cDNA preps). Solves microexon detection, recursive splicing, complex multi-exon isoforms, and DTU without transcript-quantification uncertainty. Use when short-read AS limitations (anchor length, complex isoforms, microexons, recursive splicing, transcript ambiguity) demand full-isoform resolution.","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-long-read-splicing\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-long-read-splicing\ndescription: >-\n  Analyzes alternative splicing from PacBio Iso-Seq (HiFi, Kinnex\u002FMAS-Iso-seq) and Oxford Nanopore (direct cDNA, direct RNA, R10.4.1+) long-read RNA-seq with full-isoform resolution. Tools include FLAIR (correct\u002Fcollapse\u002Fquantify\u002FdiffSplice for PacBio + ONT), IsoQuant (de-novo or annotation-guided isoform discovery 2024 SOTA), Bambu (annotation-aware Bayesian discovery + quantification with Novel Discovery Rate), SQANTI3 (isoform classification: FSM\u002FISM\u002FNIC\u002FNNC + artifact flags), rMATS-long (event calling on long-read isoforms), and minimap2 (-ax splice:hq for HiFi; -ax splice -k14 for ONT cDNA; add -uf only for direct RNA or stranded cDNA preps). Solves microexon detection, recursive splicing, complex multi-exon isoforms, and DTU without transcript-quantification uncertainty. Use when short-read AS limitations (anchor length, complex isoforms, microexons, recursive splicing, transcript ambiguity) demand full-isoform resolution.\ntool_type: mixed\nprimary_tool: FLAIR\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"alternative-splicing\u002Flong-read-splicing\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n## Version Compatibility\n\nReference examples tested with: FLAIR 2.0+, IsoQuant 3.5+, Bambu 3.4+, SQANTI3 5.4+, minimap2 2.26+, samtools 1.19+, rMATS-long 0.2+, IsoSeq3 4.0+\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# Long-Read Splicing Analysis\n\nFull-length long-read sequencing solves problems that short-read AS cannot: anchor-length-limited microexon detection, complex multi-exon isoform deconvolution, recursive splicing in long introns, and transcript-quantification uncertainty in DTU. The 2024-2026 transition: long-read is becoming the splicing default for high-resolution analysis.\n\n## When Long-Read Wins\n\n| Question | Why long-read wins |\n|----------|---------------------|\n| Microexon detection (3-27 nt) | Reads span the microexon entirely; no aligner anchor problem |\n| Long-intron recursive splicing | Can detect ratchet point usage (Sibley 2015 *Nature*) |\n| Complex isoform deconvolution (TTN, MAPT, NEFM) | Single read per isoform avoids EM ambiguity |\n| DTU without quantification uncertainty | Transcript identity is read-level, not inferred |\n| Novel transcript discovery | No annotation dependence |\n| Phasing splicing with SNVs | Allele-resolved isoforms |\n| Single-cell full-length isoforms | MAS-Iso-seq + 10X 5' is the practical SOTA |\n| Cryptic splicing in TDP-43 ALS | Full-length reads confirm cryptic exon inclusion in target transcripts |\n\n## Platform Selection Matrix\n\n| Platform | Throughput | Accuracy (modal) | Best for | Fails when |\n|----------|------------|------------------|----------|------------|\n| PacBio Revio HiFi (Iso-Seq) | ~25M reads \u002F SMRT cell | Q30+ (CCS) | Bulk transcript discovery; gold standard | Cost prohibitive for very large cohorts |\n| PacBio Kinnex \u002F MAS-Iso-seq | ~16x Iso-Seq via concatemer | Q30+ | High-throughput single-cell long-read | Kinnex de-array (skera) is an extra step |\n| ONT direct cDNA (R10.4.1, PCS-114) | Millions \u002F flowcell | ~98% simplex, ~99% duplex | Cost-effective; throughput | Minor higher error than HiFi |\n| ONT direct RNA (RNA004, 2024+) | ~30M reads | ~96-98% | Native modifications (m6A, pseudo-U); no RT bias | Lower throughput; higher input |\n| ONT pre-R10 (R9.4.1) | Same as R10 | ~85-90% | Legacy data | Pre-R10 not recommended for splicing analysis (false novel junctions) |\n\n**Read length:** PacBio HiFi cdna typically 1-10 kb; ONT cdna 0.5-50+ kb (long-tailed). Both span typical mammalian transcripts. Direct RNA on ONT preserves true 5'\u002F3' termini and modifications.\n\n## Decision Tree by Use Case\n\n| Use case | Recommended tools |\n|----------|--------------------|\n| Bulk Iso-Seq transcript discovery in well-annotated organism | minimap2 -ax splice:hq -> IsoQuant or Bambu -> SQANTI3 |\n| Bulk ONT cDNA in well-annotated organism | minimap2 -ax splice -uf -k14 -> IsoQuant or FLAIR -> SQANTI3 |\n| End-to-end pipeline for differential analysis | FLAIR (correct -> collapse -> quantify -> diffSplice) |\n| Joint discovery + quantification with calibrated novel rate | Bambu in R |\n| De novo discovery for non-model organism | IsoQuant with --genedb omitted |\n| Event-level differential splicing on long reads | rMATS-long |\n| DTU on long-read transcript counts | DRIMSeq -> DEXSeq\u002FsatuRn -> stageR (no Salmon Gibbs needed) |\n| Hybrid short+long for cohort | StringTie2 hybrid + FLAIR \u002F IsoQuant |\n| Single-cell full-length isoforms | MAS-Iso-seq + 10X 5' -> FLAMES or scNanoGPS |\n| Cryptic exon validation in ALS | minimap2 -> FLAIR collapse -> manual inspection of UNC13A, STMN2 |\n| ASO design with full-isoform context | minimap2 -> IsoQuant -> SQANTI3 -> ASO design (see splice-variant-prediction) |\n\n## Splice-Aware Alignment\n\n```bash\n# PacBio HiFi (Iso-Seq) -> minimap2 splice:hq preset\nminimap2 -ax splice:hq -uf --secondary=no \\\n    -t 16 \\\n    reference.fa \\\n    isoseq.fastq.gz | \\\n    samtools sort -@ 8 -o isoseq_aligned.bam\nsamtools index isoseq_aligned.bam\n\n# ONT direct cDNA (PCS-114, PCB-114): unstranded by default; omit -uf\nminimap2 -ax splice -k14 \\\n    -t 16 \\\n    reference.fa \\\n    ont_cdna.fastq.gz | \\\n    samtools sort -@ 8 -o ont_cdna_aligned.bam\nsamtools index ont_cdna_aligned.bam\n\n# ONT direct RNA (RNA004): truly stranded (RNA molecule preserves direction); -uf is correct\nminimap2 -ax splice -uf -k14 \\\n    -t 16 \\\n    reference.fa \\\n    ont_rna.fastq.gz | \\\n    samtools sort -@ 8 -o ont_rna_aligned.bam\nsamtools index ont_rna_aligned.bam\n```\n\n`-uf` forces all reads to the forward transcript strand — correct for direct RNA (single-stranded) and stranded cDNA library preps; **omit for unstranded cDNA** (default ONT PCS\u002FPCB kits) or ~half the reads are lost. `--secondary=no` discards secondary alignments. For genomes with poorly-annotated splice sites, supplement with `--junc-bed gencode_junctions.bed`. uLTRA (Sahlin & Mäkinen 2021 *Bioinformatics*) and deSALT (Liu 2019 *Genome Biol*) are alternatives with higher precision on small\u002Fcryptic exons.\n\n**Critical:** `splice:hq` is the preset for HiFi (Q30+ reads); plain `splice` is for ONT regardless of cDNA vs direct RNA. Using `splice` on HiFi data underuses the high quality; using `splice:hq` on ONT misses true junctions due to error-tolerance mismatch.\n\n## FLAIR Workflow (correct -> collapse -> quantify -> diffSplice)\n\n**Goal:** Identify, quantify, and test full-length isoforms from long-read RNA-seq across conditions.\n\n**Approach:** Correct splice junctions against short-read or annotation evidence, collapse isoforms, quantify per-sample expression, run diffSplice for differential isoform usage.\n\n```bash\nflair correct \\\n    --query aligned.bed \\\n    --genome reference.fa \\\n    --gtf gencode.v45.annotation.gtf \\\n    --shortread short_read_junctions.bed \\\n    --output flair_corrected \\\n    --threads 16\n\nflair collapse \\\n    --query flair_corrected_all_corrected.bed \\\n    --reads sample.fastq.gz \\\n    --genome reference.fa \\\n    --gtf gencode.v45.annotation.gtf \\\n    --output flair_collapsed \\\n    --threads 16\n\nflair quantify \\\n    --reads_manifest reads_manifest.tsv \\\n    --isoforms flair_collapsed.isoforms.fa \\\n    --output flair_quantified \\\n    --threads 16\n\nflair diffSplice \\\n    --isoforms flair_collapsed.isoforms.bed \\\n    --counts_matrix flair_quantified.counts.tsv \\\n    --out_dir flair_diffsplice \\\n    --test \\\n    --threads 16\n```\n\nFLAIR (Tang 2020 *Nat Commun*) handles ONT and PacBio with the same workflow. Output includes per-event PSI, FDR, and visual sashimi-like plots. The `--shortread` flag for `flair correct` is **strongly recommended** when short-read RNA-seq is available — it dramatically improves splice junction precision.\n\n## IsoQuant for Discovery + Quantification\n\n**Goal:** De novo or annotation-guided isoform discovery and quantification with high precision.\n\n**Approach:** Run `isoquant.py` with reference + reads + data type; output is GTF + counts.\n\n```bash\nisoquant.py \\\n    --reference reference.fa \\\n    --genedb gencode.v45.annotation.gtf \\\n    --fastq sample1.fastq.gz sample2.fastq.gz \\\n    --data_type pacbio_ccs \\\n    --output isoquant_output \\\n    --threads 16 \\\n    --model_construction_strategy default_pacbio\n```\n\n`--data_type` accepts `pacbio_ccs` (HiFi), `nanopore` (ONT), or `assembly`. As of v3.0+, `--genedb` is optional for de novo discovery. IsoQuant (Prjibelski 2023 *Nat Biotech*) is current SOTA for novel transcript reconstruction; pairs well with SQANTI3 for downstream classification.\n\nMemory requirement: >=64 GB for atlas-scale runs.\n\n## Bambu for Annotation-Aware Discovery + Quantification\n\n**Goal:** Joint discovery and quantification with statistical filtering of novel isoforms.\n\n**Approach:** R Bioconductor package; takes BAM + reference annotation + genome; outputs ranged SE objects of known + novel transcripts.\n\n```r\nlibrary(bambu)\n\nbam_files \u003C- c('sample1.bam', 'sample2.bam', 'sample3.bam')\ngenome \u003C- 'reference.fa'\ngtf \u003C- 'gencode.v45.annotation.gtf'\n\nbambuAnnotations \u003C- prepareAnnotations(gtf)\n\nse \u003C- bambu(\n    reads = bam_files,\n    annotations = bambuAnnotations,\n    genome = genome,\n    NDR = 0.1,\n    ncore = 8\n)\n\nwriteBambuOutput(se, path = 'bambu_output\u002F')\n\ntx_counts \u003C- as.data.frame(assays(se)$counts)\ngene_counts \u003C- transcriptToGeneExpression(se)\n```\n\nBambu (Chen 2023 *Nat Methods* 20:1187-1195) uses **NDR** (Novel Discovery Rate) as a single, calibrated parameter replacing per-sample heuristics:\n\n| NDR | Interpretation |\n|-----|----------------|\n| 0.05 | Stringent; few novel transcripts; highest precision |\n| 0.1 | Balanced (default) |\n| 0.2-0.3 | Permissive; more novel discoveries; recall over precision |\n\nExcellent for combined discovery + quantification when statistical filtering matters.\n\n## SQANTI3 Classification\n\n**Goal:** Classify discovered isoforms relative to reference; flag artifacts (intra-priming, RT-switching).\n\n**Approach:** Run `sqanti3_qc.py` on the isoform GTF; review classification (FSM\u002FISM\u002FNIC\u002FNNC\u002Fantisense\u002Fgenic\u002Fintergenic\u002Ffusion) and quality flags.\n\n```bash\nsqanti3_qc.py \\\n    --isoforms isoforms.gtf \\\n    --refGTF gencode.v45.annotation.gtf \\\n    --refFasta reference.fa \\\n    --output sqanti3_qc \\\n    --aligner_choice minimap2 \\\n    --CAGE_peak refTSS_v3.3_human_coordinate.hg38.bed \\\n    --polyA_motif_list mouse_and_human.polyA_motif.txt \\\n    --cpus 8\n\nsqanti3_filter.py rules \\\n    --sqanti_class sqanti3_qc_classification.txt \\\n    --filter_isoforms isoforms.fa \\\n    --filter_gtf isoforms.gtf \\\n    --output sqanti3_filtered\n```\n\n| SQANTI category | Meaning |\n|-----------------|---------|\n| FSM (Full Splice Match) | All junctions match reference |\n| ISM (Incomplete Splice Match) | Subset of reference junctions |\n| NIC (Novel In Catalog) | Novel combination of known junctions |\n| NNC (Novel Not in Catalog) | Contains novel junction |\n| Antisense | Overlaps gene on opposite strand |\n| Genic | Within gene but no junction match |\n| Intergenic | Between genes |\n| Fusion | Spans multiple genes |\n\nSQANTI3 (Pardo-Palacios 2024 *Nat Methods* 21:793-797) is the long-read isoform-curation\u002FQC tool, with structural categories and QC tailored to ONT\u002FPacBio error patterns. **Filter intra-priming and RT-switching** flags before reporting.\n\n## rMATS-long for Differential Isoform Analysis on Long-Read Data\n\n**Goal:** Apply differential isoform analysis to long-read transcript abundance with classification and visualization.\n\n**Approach:** rMATS-long is a multi-script Python pipeline distributed via bioconda; entry point is `rmats-long` followed by the script name. It supports two modes: **abundance-based** (using ESPRESSO-style abundance estimates) and **ASM-based** (Alternative Splicing Modules — sets of isoforms sharing exon-junction structure). Run preprocessing scripts in order before `rmats_long.py`.\n\n```bash\nconda install -c conda-forge -c bioconda rmats-long\n\n# Preprocessing pipeline (ASM mode); per-script flag names verified vs Xinglab\u002Frmats-long\nrmats-long organize_gene_info_by_chr.py --gtf annotation.gtf --out-dir gene_info_by_chr\u002F\n\n# simplify_alignment_info processes one BAM at a time -> one TSV\nfor bam in *.bam; do\n    rmats-long simplify_alignment_info.py --in-file \"$bam\" --out-tsv \"alignment_info\u002F${bam%.bam}.tsv\"\ndone\n\n# organize_alignment_info_by_gene_and_chr requires a samples-tsv (sample_id\u003CTAB>tsv_path)\nrmats-long organize_alignment_info_by_gene_and_chr.py \\\n    --gtf-dir gene_info_by_chr\u002F \\\n    --out-dir organized\u002F \\\n    --samples-tsv samples.tsv\n\nrmats-long detect_splicing_events.py --align-dir organized\u002F --gtf-dir gene_info_by_chr\u002F --out-dir events\u002F\nrmats-long create_gtf_from_asm_definitions.py --event-dir events\u002F --out-gtf asm.gtf\nrmats-long count_reads_for_asms.py --align-dir organized\u002F --event-dir events\u002F --gtf-dir gene_info_by_chr\u002F --out-dir asm_counts\u002F\n\n# Main differential analysis (ASM mode)\n# --group-1 \u002F --group-2 each take the PATH to a file whose single line is a\n# comma-separated list of sample IDs (matching the BAM basenames in --align-dir).\necho 'ctrl1,ctrl2,ctrl3' > group1.txt\necho 'trt1,trt2,trt3' > group2.txt\nrmats-long rmats_long.py \\\n    --group-1 group1.txt \\\n    --group-2 group2.txt \\\n    --event-dir events\u002F \\\n    --asm-counts-dir asm_counts\u002F \\\n    --align-dir organized\u002F \\\n    --gtf-dir gene_info_by_chr\u002F \\\n    --out-dir rmats_long_output\u002F \\\n    --adj-pvalue 0.05 \\\n    --delta-proportion 0.05 \\\n    --average-reads-per-group 10\n\n# Alternative: abundance-based mode (when you already have ESPRESSO-style estimates)\nrmats-long rmats_long.py \\\n    --abundance abundance.esp \\\n    --updated-gtf updated.gtf \\\n    --group-1 group1.txt \\\n    --group-2 group2.txt \\\n    --out-dir rmats_long_output\u002F \\\n    --no-splice-graph-plot\n```\n\nKey flags: `--adj-pvalue` (default 0.05), `--delta-proportion` (default 0.05), `--average-reads-per-group` (default 10), `--no-splice-graph-plot` (skip expensive splice-graph rendering).\n\nrMATS-long is a separate tool from short-read rMATS-turbo. The predecessor `lr2rmats` used long reads only to *augment* the short-read rMATS GTF. The ASM framework treats AS as a set-of-isoforms problem, more natural for long-read data than rMATS-turbo's pre-defined event categories.\n\n## DTU on Long-Read Counts\n\n**Goal:** Apply DRIMSeq + DEXSeq + stageR DTU pipeline to long-read transcript counts (no quantification uncertainty).\n\n**Approach:** Use FLAIR or Bambu transcript counts as input; long-read counts are read-level identities, so no Salmon Gibbs samples needed.\n\n```r\nlibrary(DRIMSeq); library(DEXSeq); library(stageR)\n\ncounts \u003C- read.table('flair_quantified_counts.tsv', header=TRUE, sep='\\t')\n\nsamples \u003C- data.frame(\n    sample_id = c('s1', 's2', 's3', 's4', 's5', 's6'),\n    condition = c('ctrl', 'ctrl', 'ctrl', 'trt', 'trt', 'trt')\n)\n\nd \u003C- dmDSdata(counts = counts, samples = samples)\nd \u003C- dmFilter(\n    d,\n    min_samps_feature_expr = 3, min_feature_expr = 5,\n    min_samps_feature_prop = 3, min_feature_prop = 0.1,\n    min_samps_gene_expr = 6, min_gene_expr = 10\n)\n```\n\nThen proceed with the standard DEXSeq + stageR DTU pipeline (see `isoform-switching` skill). IsoformSwitchAnalyzeR v2 has explicit long-read input support.\n\n## Single-Cell Long-Read for Splicing\n\n**Goal:** Combine cell typing (10X 5' short read) with full-length isoform structure (Kinnex \u002F MAS-Iso-seq).\n\n**Approach:** Split 10X library; sequence half short-read for cell typing, half PacBio Kinnex for isoforms; recover cell barcodes from long reads via FLAMES or skera (Kinnex de-array).\n\n```bash\n# Demultiplex MAS-Iso-seq reads\nskera split \\\n    raw_kinnex.bam \\\n    mas12_primers.fasta \\\n    demuxed.bam\n\n# Then proceed with lima -> isoseq3 refine -> isoseq3 cluster pipeline\n# For barcode rescue from FLAMES:\nmatch_cell_barcode \\\n    --bam demuxed.bam \\\n    --barcodes 10x_barcodes.tsv \\\n    --output flames_demuxed.bam\n```\n\nJoglekar et al 2024 (*Nat Neurosci* 27:1051-1063) used this approach to map single-cell isoforms across developing and adult mouse and human brain. See `single-cell-splicing` for tools that work on the demultiplexed data.\n\n## Per-Tool Failure Modes\n\n### minimap2: Wrong Preset\n\n**Trigger:** Using `-ax splice` for PacBio HiFi (instead of `-ax splice:hq`) or `-ax splice:hq` for ONT.\n\n**Mechanism:** Presets configure k-mer size, error tolerance, and indel scoring; mismatched preset is sub-optimal.\n\n**Symptom:** Lower alignment rate; missed junctions on HiFi, false novel junctions on ONT.\n\n**Fix:** `splice:hq` for HiFi; `splice -k14` for ONT cDNA (unstranded); add `-uf` only for ONT direct RNA or stranded cDNA preps.\n\n### IsoQuant: Memory Pressure\n\n**Trigger:** Atlas-scale cohort or low-RAM environment.\n\n**Mechanism:** IsoQuant builds graph structures across all reads simultaneously.\n\n**Symptom:** OOM kill; very slow runtime.\n\n**Fix:** Increase RAM to >=64 GB; or batch by chromosome.\n\n### Bambu: NDR Mistuning\n\n**Trigger:** NDR=0.5+ or NDR=0.01.\n\n**Mechanism:** NDR controls the precision-recall tradeoff for novel transcripts.\n\n**Symptom:** Too many spurious novel transcripts (high NDR) or missing real novel transcripts (low NDR).\n\n**Fix:** Default NDR=0.1 is balanced; adjust based on validation expectations.\n\n### SQANTI3: RT-Switching Flags\n\n**Trigger:** PacBio\u002FONT cDNA libraries with template switching artifacts.\n\n**Mechanism:** RT-switching produces chimeric reads spanning two unrelated transcripts; SQANTI3 flags these.\n\n**Symptom:** Many \"fusion\" transcripts in non-cancer samples; biologically implausible.\n\n**Fix:** Filter out RT-switching flags via `sqanti3_filter.py`; investigate library prep if rate >5%.\n\n### FLAIR: Short-Read Augmentation Missing\n\n**Trigger:** Running `flair correct` without `--shortread`.\n\n**Mechanism:** FLAIR uses short-read junctions to correct long-read junction calls; without them, long-read errors persist as junction calls.\n\n**Symptom:** Many false novel junctions; junction precision low.\n\n**Fix:** Always include `--shortread short_read_junctions.bed` when short-read RNA-seq is available; generate with regtools junctions.\n\n### rMATS-long: GTF-Only Input\n\n**Trigger:** Trying to give rMATS-long raw long-read BAMs.\n\n**Mechanism:** rMATS-long expects per-sample isoform GTFs (from FLAIR\u002FIsoQuant collapse), not raw alignments.\n\n**Symptom:** Confusing parsing errors.\n\n**Fix:** Run FLAIR\u002FIsoQuant per sample first; pass the resulting GTFs.\n\n## Reconciliation: When Long-Read Tools Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| FLAIR has more isoforms than IsoQuant | FLAIR collapse less stringent; or IsoQuant filtered more aggressively | Both tools have valid pipelines; report based on use case |\n| Bambu calls fewer novel than IsoQuant | Bambu NDR=0.1 is more conservative | Adjust NDR or trust Bambu's calibration |\n| SQANTI3 classifies as NNC, FLAIR thinks FSM | GENCODE version mismatch | Verify both tools use same annotation |\n| Long-read isoform calls don't match short-read events | Short-read EM ambiguity; or long-read coverage gap | Trust long-read for unambiguous; trust short-read for high-coverage events |\n\n## Quality Control for Long-Read Splicing\n\n| Metric | PacBio HiFi | ONT cDNA R10.4.1 |\n|--------|-------------|-------------------|\n| Read accuracy (modal) | Q30+ (>=99.9%) | ~98% simplex \u002F ~99% duplex |\n| Splice junction concordance to short-read truth | ~98% | 95-98% |\n| Median read length (transcripts) | 1-4 kb | 0.5-3 kb |\n| Throughput per run | ~25M HiFi reads | Tens of millions |\n| Library input | 100-500 ng total RNA | 100-500 ng |\n| Read direction | TSO + dT primed | TSO or random hexamer |\n\nPre-R10 ONT (R9.4.1) had ~85-90% junction concordance and is no longer recommended for splicing.\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `minimap2: too many anchors` | Repeat-rich genome region | Use `-N 50` to limit secondary alignments |\n| `IsoQuant: ssw-py not found` | Missing dependency | `pip install ssw-py` |\n| `Bambu: prepareAnnotations failed` | GTF malformed | Validate GTF with `gffread -E` |\n| `SQANTI3: kallisto not found` | sqanti3 expects kallisto for short-read overlap | `conda install -c bioconda kallisto` |\n| `FLAIR: flair correct slow` | Genome FASTA not indexed | `samtools faidx reference.fa` |\n| `skera: too many mismatches in adapter` | MAS primer mismatch | Verify primer fasta matches kit version |\n\n## Quality Thresholds\n\n| Metric | Recommendation | Source |\n|--------|----------------|--------|\n| Full-length non-chimeric (FLNC) % | >=80% (PacBio Iso-Seq) | PacBio convention |\n| FSM% | >=50% in well-annotated genome (field-convention rule of thumb; not specified in the SQANTI paper) | SQANTI3 documentation; Tardaguila 2018 *Genome Res* 28:396 |\n| NNC% | \u003C=30% (>30% suggests artifacts unless biologically interesting) | SQANTI3 convention |\n| Junction support | >=2 reads (or >=3 with strict filtering) | Conservative |\n| Bambu NDR | 0.1 default; 0.05 stringent | Chen 2023 *Nat Methods* 20:1187 |\n| SQANTI3 RT-switching flag | filter out unless validated | SQANTI3 convention |\n| SQANTI3 intra-priming flag | filter out | SQANTI3 convention |\n| ONT R-version | R10.4.1+ for splicing | Splice junction concordance >=95% only with R10+ |\n| HiFi CCS passes | >=3 | PacBio convention for Q30+ |\n\n## Common Pitfalls\n\n- **Ignoring reference annotation completeness** — SQANTI3 NNC categorization differs by GENCODE version; report version with results.\n- **Not running isoseq3 refine** — concatemers and polyA artifacts inflate isoform counts.\n- **Confusing FLAIR's 'collapse' with 'cluster'** — collapse merges similar isoforms post-alignment; cluster (in isoseq3) merges raw reads pre-alignment.\n- **Treating ONT R9.x splice calls as reliable** — pre-R10.4.1 error patterns generate false novel junctions.\n- **Skipping CAGE \u002F polyA validation in SQANTI3** — TSS \u002F TTS hallucination is common in long-read isoforms.\n- **DTU on too few replicates** — long-read is expensive; n=2 vs n=2 is common but underpowered.\n- **PacBio HiFi alignment with `-ax splice` (not `splice:hq`)** — use the HQ preset for HiFi data; default `splice` is for ONT.\n- **Skipping `--shortread` in FLAIR correct** — long-read junction precision is much higher with short-read augmentation.\n\n## Related Skills\n\n- splicing-quantification - Short-read PSI for cross-validation\n- isoform-switching - DTU framework on long-read counts\n- single-cell-splicing - MAS-Iso-seq + 10X integration\n- long-read-sequencing\u002Fisoseq-analysis - PacBio Iso-Seq general pipeline (CCS, lima, refine, cluster)\n- long-read-sequencing\u002Flong-read-alignment - minimap2 splice:hq details\n- long-read-sequencing\u002Flong-read-qc - QC for long-read data\n- splice-variant-prediction - Cross-reference variant predictions with full isoforms\n\n## References\n\n- Tang et al 2020 *Nat Commun* - FLAIR\n- Prjibelski et al 2023 *Nat Biotech* - IsoQuant\n- Chen et al 2023 *Nat Methods* 20:1187-1195 - Bambu\n- Tardaguila et al 2018 *Genome Res* - SQANTI (original)\n- Pardo-Palacios et al 2024 *Nat Methods* 21:793-797 - SQANTI3\n- Pardo-Palacios et al 2024 *Nat Methods* 21:1349-1363 - LRGASP benchmark\n- Wyman et al 2020 *bioRxiv* - TALON (note: not formally peer-reviewed)\n- Li 2018 \u002F 2021 *Bioinformatics* - minimap2\n- Sahlin & Makinen 2021 *Bioinformatics* - uLTRA\n- Sibley et al 2015 *Nature* - recursive splicing\n- Al'Khafaji et al 2024 *Nat Biotech* - MAS-Iso-seq \u002F Kinnex\n- Joglekar et al 2024 *Nat Neurosci* 27:1051-1063 - scISOr-Seq2 single-cell brain isoform mapping\n- Tian et al 2021 *Genome Biology* 22:310 - FLAMES\n- Brown et al 2022 *Nature* - UNC13A cryptic exon (TDP-43)\n- Klim et al 2019 *Nat Neurosci* - STMN2 cryptic splicing\n","## Version Compatibility\n\nReference examples tested with: FLAIR 2.0+, IsoQuant 3.5+, Bambu 3.4+, SQANTI3 5.4+, minimap2 2.26+, samtools 1.19+, rMATS-long 0.2+, IsoSeq3 4.0+\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# Long-Read Splicing Analysis\n\nFull-length long-read sequencing solves problems that short-read AS cannot: anchor-length-limited microexon detection, complex multi-exon isoform deconvolution, recursive splicing in long introns, and transcript-quantification uncertainty in DTU. The 2024-2026 transition: long-read is becoming the splicing default for high-resolution analysis.\n\n## When Long-Read Wins\n\n| Question | Why long-read wins |\n|----------|---------------------|\n| Microexon detection (3-27 nt) | Reads span the microexon entirely; no aligner anchor problem |\n| Long-intron recursive splicing | Can detect ratchet point usage (Sibley 2015 *Nature*) |\n| Complex isoform deconvolution (TTN, MAPT, NEFM) | Single read per isoform avoids EM ambiguity |\n| DTU without quantification uncertainty | Transcript identity is read-level, not inferred |\n| Novel transcript discovery | No annotation dependence |\n| Phasing splicing with SNVs | Allele-resolved isoforms |\n| Single-cell full-length isoforms | MAS-Iso-seq + 10X 5' is the practical SOTA |\n| Cryptic splicing in TDP-43 ALS | Full-length reads confirm cryptic exon inclusion in target transcripts |\n\n## Platform Selection Matrix\n\n| Platform | Throughput | Accuracy (modal) | Best for | Fails when |\n|----------|------------|------------------|----------|------------|\n| PacBio Revio HiFi (Iso-Seq) | ~25M reads \u002F SMRT cell | Q30+ (CCS) | Bulk transcript discovery; gold standard | Cost prohibitive for very large cohorts |\n| PacBio Kinnex \u002F MAS-Iso-seq | ~16x Iso-Seq via concatemer | Q30+ | High-throughput single-cell long-read | Kinnex de-array (skera) is an extra step |\n| ONT direct cDNA (R10.4.1, PCS-114) | Millions \u002F flowcell | ~98% simplex, ~99% duplex | Cost-effective; throughput | Minor higher error than HiFi |\n| ONT direct RNA (RNA004, 2024+) | ~30M reads | ~96-98% | Native modifications (m6A, pseudo-U); no RT bias | Lower throughput; higher input |\n| ONT pre-R10 (R9.4.1) | Same as R10 | ~85-90% | Legacy data | Pre-R10 not recommended for splicing analysis (false novel junctions) |\n\n**Read length:** PacBio HiFi cdna typically 1-10 kb; ONT cdna 0.5-50+ kb (long-tailed). Both span typical mammalian transcripts. Direct RNA on ONT preserves true 5'\u002F3' termini and modifications.\n\n## Decision Tree by Use Case\n\n| Use case | Recommended tools |\n|----------|--------------------|\n| Bulk Iso-Seq transcript discovery in well-annotated organism | minimap2 -ax splice:hq -> IsoQuant or Bambu -> SQANTI3 |\n| Bulk ONT cDNA in well-annotated organism | minimap2 -ax splice -uf -k14 -> IsoQuant or FLAIR -> SQANTI3 |\n| End-to-end pipeline for differential analysis | FLAIR (correct -> collapse -> quantify -> diffSplice) |\n| Joint discovery + quantification with calibrated novel rate | Bambu in R |\n| De novo discovery for non-model organism | IsoQuant with --genedb omitted |\n| Event-level differential splicing on long reads | rMATS-long |\n| DTU on long-read transcript counts | DRIMSeq -> DEXSeq\u002FsatuRn -> stageR (no Salmon Gibbs needed) |\n| Hybrid short+long for cohort | StringTie2 hybrid + FLAIR \u002F IsoQuant |\n| Single-cell full-length isoforms | MAS-Iso-seq + 10X 5' -> FLAMES or scNanoGPS |\n| Cryptic exon validation in ALS | minimap2 -> FLAIR collapse -> manual inspection of UNC13A, STMN2 |\n| ASO design with full-isoform context | minimap2 -> IsoQuant -> SQANTI3 -> ASO design (see splice-variant-prediction) |\n\n## Splice-Aware Alignment\n\n```bash\n# PacBio HiFi (Iso-Seq) -> minimap2 splice:hq preset\nminimap2 -ax splice:hq -uf --secondary=no \\\n    -t 16 \\\n    reference.fa \\\n    isoseq.fastq.gz | \\\n    samtools sort -@ 8 -o isoseq_aligned.bam\nsamtools index isoseq_aligned.bam\n\n# ONT direct cDNA (PCS-114, PCB-114): unstranded by default; omit -uf\nminimap2 -ax splice -k14 \\\n    -t 16 \\\n    reference.fa \\\n    ont_cdna.fastq.gz | \\\n    samtools sort -@ 8 -o ont_cdna_aligned.bam\nsamtools index ont_cdna_aligned.bam\n\n# ONT direct RNA (RNA004): truly stranded (RNA molecule preserves direction); -uf is correct\nminimap2 -ax splice -uf -k14 \\\n    -t 16 \\\n    reference.fa \\\n    ont_rna.fastq.gz | \\\n    samtools sort -@ 8 -o ont_rna_aligned.bam\nsamtools index ont_rna_aligned.bam\n```\n\n`-uf` forces all reads to the forward transcript strand — correct for direct RNA (single-stranded) and stranded cDNA library preps; **omit for unstranded cDNA** (default ONT PCS\u002FPCB kits) or ~half the reads are lost. `--secondary=no` discards secondary alignments. For genomes with poorly-annotated splice sites, supplement with `--junc-bed gencode_junctions.bed`. uLTRA (Sahlin & Mäkinen 2021 *Bioinformatics*) and deSALT (Liu 2019 *Genome Biol*) are alternatives with higher precision on small\u002Fcryptic exons.\n\n**Critical:** `splice:hq` is the preset for HiFi (Q30+ reads); plain `splice` is for ONT regardless of cDNA vs direct RNA. Using `splice` on HiFi data underuses the high quality; using `splice:hq` on ONT misses true junctions due to error-tolerance mismatch.\n\n## FLAIR Workflow (correct -> collapse -> quantify -> diffSplice)\n\n**Goal:** Identify, quantify, and test full-length isoforms from long-read RNA-seq across conditions.\n\n**Approach:** Correct splice junctions against short-read or annotation evidence, collapse isoforms, quantify per-sample expression, run diffSplice for differential isoform usage.\n\n```bash\nflair correct \\\n    --query aligned.bed \\\n    --genome reference.fa \\\n    --gtf gencode.v45.annotation.gtf \\\n    --shortread short_read_junctions.bed \\\n    --output flair_corrected \\\n    --threads 16\n\nflair collapse \\\n    --query flair_corrected_all_corrected.bed \\\n    --reads sample.fastq.gz \\\n    --genome reference.fa \\\n    --gtf gencode.v45.annotation.gtf \\\n    --output flair_collapsed \\\n    --threads 16\n\nflair quantify \\\n    --reads_manifest reads_manifest.tsv \\\n    --isoforms flair_collapsed.isoforms.fa \\\n    --output flair_quantified \\\n    --threads 16\n\nflair diffSplice \\\n    --isoforms flair_collapsed.isoforms.bed \\\n    --counts_matrix flair_quantified.counts.tsv \\\n    --out_dir flair_diffsplice \\\n    --test \\\n    --threads 16\n```\n\nFLAIR (Tang 2020 *Nat Commun*) handles ONT and PacBio with the same workflow. Output includes per-event PSI, FDR, and visual sashimi-like plots. The `--shortread` flag for `flair correct` is **strongly recommended** when short-read RNA-seq is available — it dramatically improves splice junction precision.\n\n## IsoQuant for Discovery + Quantification\n\n**Goal:** De novo or annotation-guided isoform discovery and quantification with high precision.\n\n**Approach:** Run `isoquant.py` with reference + reads + data type; output is GTF + counts.\n\n```bash\nisoquant.py \\\n    --reference reference.fa \\\n    --genedb gencode.v45.annotation.gtf \\\n    --fastq sample1.fastq.gz sample2.fastq.gz \\\n    --data_type pacbio_ccs \\\n    --output isoquant_output \\\n    --threads 16 \\\n    --model_construction_strategy default_pacbio\n```\n\n`--data_type` accepts `pacbio_ccs` (HiFi), `nanopore` (ONT), or `assembly`. As of v3.0+, `--genedb` is optional for de novo discovery. IsoQuant (Prjibelski 2023 *Nat Biotech*) is current SOTA for novel transcript reconstruction; pairs well with SQANTI3 for downstream classification.\n\nMemory requirement: >=64 GB for atlas-scale runs.\n\n## Bambu for Annotation-Aware Discovery + Quantification\n\n**Goal:** Joint discovery and quantification with statistical filtering of novel isoforms.\n\n**Approach:** R Bioconductor package; takes BAM + reference annotation + genome; outputs ranged SE objects of known + novel transcripts.\n\n```r\nlibrary(bambu)\n\nbam_files \u003C- c('sample1.bam', 'sample2.bam', 'sample3.bam')\ngenome \u003C- 'reference.fa'\ngtf \u003C- 'gencode.v45.annotation.gtf'\n\nbambuAnnotations \u003C- prepareAnnotations(gtf)\n\nse \u003C- bambu(\n    reads = bam_files,\n    annotations = bambuAnnotations,\n    genome = genome,\n    NDR = 0.1,\n    ncore = 8\n)\n\nwriteBambuOutput(se, path = 'bambu_output\u002F')\n\ntx_counts \u003C- as.data.frame(assays(se)$counts)\ngene_counts \u003C- transcriptToGeneExpression(se)\n```\n\nBambu (Chen 2023 *Nat Methods* 20:1187-1195) uses **NDR** (Novel Discovery Rate) as a single, calibrated parameter replacing per-sample heuristics:\n\n| NDR | Interpretation |\n|-----|----------------|\n| 0.05 | Stringent; few novel transcripts; highest precision |\n| 0.1 | Balanced (default) |\n| 0.2-0.3 | Permissive; more novel discoveries; recall over precision |\n\nExcellent for combined discovery + quantification when statistical filtering matters.\n\n## SQANTI3 Classification\n\n**Goal:** Classify discovered isoforms relative to reference; flag artifacts (intra-priming, RT-switching).\n\n**Approach:** Run `sqanti3_qc.py` on the isoform GTF; review classification (FSM\u002FISM\u002FNIC\u002FNNC\u002Fantisense\u002Fgenic\u002Fintergenic\u002Ffusion) and quality flags.\n\n```bash\nsqanti3_qc.py \\\n    --isoforms isoforms.gtf \\\n    --refGTF gencode.v45.annotation.gtf \\\n    --refFasta reference.fa \\\n    --output sqanti3_qc \\\n    --aligner_choice minimap2 \\\n    --CAGE_peak refTSS_v3.3_human_coordinate.hg38.bed \\\n    --polyA_motif_list mouse_and_human.polyA_motif.txt \\\n    --cpus 8\n\nsqanti3_filter.py rules \\\n    --sqanti_class sqanti3_qc_classification.txt \\\n    --filter_isoforms isoforms.fa \\\n    --filter_gtf isoforms.gtf \\\n    --output sqanti3_filtered\n```\n\n| SQANTI category | Meaning |\n|-----------------|---------|\n| FSM (Full Splice Match) | All junctions match reference |\n| ISM (Incomplete Splice Match) | Subset of reference junctions |\n| NIC (Novel In Catalog) | Novel combination of known junctions |\n| NNC (Novel Not in Catalog) | Contains novel junction |\n| Antisense | Overlaps gene on opposite strand |\n| Genic | Within gene but no junction match |\n| Intergenic | Between genes |\n| Fusion | Spans multiple genes |\n\nSQANTI3 (Pardo-Palacios 2024 *Nat Methods* 21:793-797) is the long-read isoform-curation\u002FQC tool, with structural categories and QC tailored to ONT\u002FPacBio error patterns. **Filter intra-priming and RT-switching** flags before reporting.\n\n## rMATS-long for Differential Isoform Analysis on Long-Read Data\n\n**Goal:** Apply differential isoform analysis to long-read transcript abundance with classification and visualization.\n\n**Approach:** rMATS-long is a multi-script Python pipeline distributed via bioconda; entry point is `rmats-long` followed by the script name. It supports two modes: **abundance-based** (using ESPRESSO-style abundance estimates) and **ASM-based** (Alternative Splicing Modules — sets of isoforms sharing exon-junction structure). Run preprocessing scripts in order before `rmats_long.py`.\n\n```bash\nconda install -c conda-forge -c bioconda rmats-long\n\n# Preprocessing pipeline (ASM mode); per-script flag names verified vs Xinglab\u002Frmats-long\nrmats-long organize_gene_info_by_chr.py --gtf annotation.gtf --out-dir gene_info_by_chr\u002F\n\n# simplify_alignment_info processes one BAM at a time -> one TSV\nfor bam in *.bam; do\n    rmats-long simplify_alignment_info.py --in-file \"$bam\" --out-tsv \"alignment_info\u002F${bam%.bam}.tsv\"\ndone\n\n# organize_alignment_info_by_gene_and_chr requires a samples-tsv (sample_id\u003CTAB>tsv_path)\nrmats-long organize_alignment_info_by_gene_and_chr.py \\\n    --gtf-dir gene_info_by_chr\u002F \\\n    --out-dir organized\u002F \\\n    --samples-tsv samples.tsv\n\nrmats-long detect_splicing_events.py --align-dir organized\u002F --gtf-dir gene_info_by_chr\u002F --out-dir events\u002F\nrmats-long create_gtf_from_asm_definitions.py --event-dir events\u002F --out-gtf asm.gtf\nrmats-long count_reads_for_asms.py --align-dir organized\u002F --event-dir events\u002F --gtf-dir gene_info_by_chr\u002F --out-dir asm_counts\u002F\n\n# Main differential analysis (ASM mode)\n# --group-1 \u002F --group-2 each take the PATH to a file whose single line is a\n# comma-separated list of sample IDs (matching the BAM basenames in --align-dir).\necho 'ctrl1,ctrl2,ctrl3' > group1.txt\necho 'trt1,trt2,trt3' > group2.txt\nrmats-long rmats_long.py \\\n    --group-1 group1.txt \\\n    --group-2 group2.txt \\\n    --event-dir events\u002F \\\n    --asm-counts-dir asm_counts\u002F \\\n    --align-dir organized\u002F \\\n    --gtf-dir gene_info_by_chr\u002F \\\n    --out-dir rmats_long_output\u002F \\\n    --adj-pvalue 0.05 \\\n    --delta-proportion 0.05 \\\n    --average-reads-per-group 10\n\n# Alternative: abundance-based mode (when you already have ESPRESSO-style estimates)\nrmats-long rmats_long.py \\\n    --abundance abundance.esp \\\n    --updated-gtf updated.gtf \\\n    --group-1 group1.txt \\\n    --group-2 group2.txt \\\n    --out-dir rmats_long_output\u002F \\\n    --no-splice-graph-plot\n```\n\nKey flags: `--adj-pvalue` (default 0.05), `--delta-proportion` (default 0.05), `--average-reads-per-group` (default 10), `--no-splice-graph-plot` (skip expensive splice-graph rendering).\n\nrMATS-long is a separate tool from short-read rMATS-turbo. The predecessor `lr2rmats` used long reads only to *augment* the short-read rMATS GTF. The ASM framework treats AS as a set-of-isoforms problem, more natural for long-read data than rMATS-turbo's pre-defined event categories.\n\n## DTU on Long-Read Counts\n\n**Goal:** Apply DRIMSeq + DEXSeq + stageR DTU pipeline to long-read transcript counts (no quantification uncertainty).\n\n**Approach:** Use FLAIR or Bambu transcript counts as input; long-read counts are read-level identities, so no Salmon Gibbs samples needed.\n\n```r\nlibrary(DRIMSeq); library(DEXSeq); library(stageR)\n\ncounts \u003C- read.table('flair_quantified_counts.tsv', header=TRUE, sep='\\t')\n\nsamples \u003C- data.frame(\n    sample_id = c('s1', 's2', 's3', 's4', 's5', 's6'),\n    condition = c('ctrl', 'ctrl', 'ctrl', 'trt', 'trt', 'trt')\n)\n\nd \u003C- dmDSdata(counts = counts, samples = samples)\nd \u003C- dmFilter(\n    d,\n    min_samps_feature_expr = 3, min_feature_expr = 5,\n    min_samps_feature_prop = 3, min_feature_prop = 0.1,\n    min_samps_gene_expr = 6, min_gene_expr = 10\n)\n```\n\nThen proceed with the standard DEXSeq + stageR DTU pipeline (see `isoform-switching` skill). IsoformSwitchAnalyzeR v2 has explicit long-read input support.\n\n## Single-Cell Long-Read for Splicing\n\n**Goal:** Combine cell typing (10X 5' short read) with full-length isoform structure (Kinnex \u002F MAS-Iso-seq).\n\n**Approach:** Split 10X library; sequence half short-read for cell typing, half PacBio Kinnex for isoforms; recover cell barcodes from long reads via FLAMES or skera (Kinnex de-array).\n\n```bash\n# Demultiplex MAS-Iso-seq reads\nskera split \\\n    raw_kinnex.bam \\\n    mas12_primers.fasta \\\n    demuxed.bam\n\n# Then proceed with lima -> isoseq3 refine -> isoseq3 cluster pipeline\n# For barcode rescue from FLAMES:\nmatch_cell_barcode \\\n    --bam demuxed.bam \\\n    --barcodes 10x_barcodes.tsv \\\n    --output flames_demuxed.bam\n```\n\nJoglekar et al 2024 (*Nat Neurosci* 27:1051-1063) used this approach to map single-cell isoforms across developing and adult mouse and human brain. See `single-cell-splicing` for tools that work on the demultiplexed data.\n\n## Per-Tool Failure Modes\n\n### minimap2: Wrong Preset\n\n**Trigger:** Using `-ax splice` for PacBio HiFi (instead of `-ax splice:hq`) or `-ax splice:hq` for ONT.\n\n**Mechanism:** Presets configure k-mer size, error tolerance, and indel scoring; mismatched preset is sub-optimal.\n\n**Symptom:** Lower alignment rate; missed junctions on HiFi, false novel junctions on ONT.\n\n**Fix:** `splice:hq` for HiFi; `splice -k14` for ONT cDNA (unstranded); add `-uf` only for ONT direct RNA or stranded cDNA preps.\n\n### IsoQuant: Memory Pressure\n\n**Trigger:** Atlas-scale cohort or low-RAM environment.\n\n**Mechanism:** IsoQuant builds graph structures across all reads simultaneously.\n\n**Symptom:** OOM kill; very slow runtime.\n\n**Fix:** Increase RAM to >=64 GB; or batch by chromosome.\n\n### Bambu: NDR Mistuning\n\n**Trigger:** NDR=0.5+ or NDR=0.01.\n\n**Mechanism:** NDR controls the precision-recall tradeoff for novel transcripts.\n\n**Symptom:** Too many spurious novel transcripts (high NDR) or missing real novel transcripts (low NDR).\n\n**Fix:** Default NDR=0.1 is balanced; adjust based on validation expectations.\n\n### SQANTI3: RT-Switching Flags\n\n**Trigger:** PacBio\u002FONT cDNA libraries with template switching artifacts.\n\n**Mechanism:** RT-switching produces chimeric reads spanning two unrelated transcripts; SQANTI3 flags these.\n\n**Symptom:** Many \"fusion\" transcripts in non-cancer samples; biologically implausible.\n\n**Fix:** Filter out RT-switching flags via `sqanti3_filter.py`; investigate library prep if rate >5%.\n\n### FLAIR: Short-Read Augmentation Missing\n\n**Trigger:** Running `flair correct` without `--shortread`.\n\n**Mechanism:** FLAIR uses short-read junctions to correct long-read junction calls; without them, long-read errors persist as junction calls.\n\n**Symptom:** Many false novel junctions; junction precision low.\n\n**Fix:** Always include `--shortread short_read_junctions.bed` when short-read RNA-seq is available; generate with regtools junctions.\n\n### rMATS-long: GTF-Only Input\n\n**Trigger:** Trying to give rMATS-long raw long-read BAMs.\n\n**Mechanism:** rMATS-long expects per-sample isoform GTFs (from FLAIR\u002FIsoQuant collapse), not raw alignments.\n\n**Symptom:** Confusing parsing errors.\n\n**Fix:** Run FLAIR\u002FIsoQuant per sample first; pass the resulting GTFs.\n\n## Reconciliation: When Long-Read Tools Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| FLAIR has more isoforms than IsoQuant | FLAIR collapse less stringent; or IsoQuant filtered more aggressively | Both tools have valid pipelines; report based on use case |\n| Bambu calls fewer novel than IsoQuant | Bambu NDR=0.1 is more conservative | Adjust NDR or trust Bambu's calibration |\n| SQANTI3 classifies as NNC, FLAIR thinks FSM | GENCODE version mismatch | Verify both tools use same annotation |\n| Long-read isoform calls don't match short-read events | Short-read EM ambiguity; or long-read coverage gap | Trust long-read for unambiguous; trust short-read for high-coverage events |\n\n## Quality Control for Long-Read Splicing\n\n| Metric | PacBio HiFi | ONT cDNA R10.4.1 |\n|--------|-------------|-------------------|\n| Read accuracy (modal) | Q30+ (>=99.9%) | ~98% simplex \u002F ~99% duplex |\n| Splice junction concordance to short-read truth | ~98% | 95-98% |\n| Median read length (transcripts) | 1-4 kb | 0.5-3 kb |\n| Throughput per run | ~25M HiFi reads | Tens of millions |\n| Library input | 100-500 ng total RNA | 100-500 ng |\n| Read direction | TSO + dT primed | TSO or random hexamer |\n\nPre-R10 ONT (R9.4.1) had ~85-90% junction concordance and is no longer recommended for splicing.\n\n## Common Errors\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `minimap2: too many anchors` | Repeat-rich genome region | Use `-N 50` to limit secondary alignments |\n| `IsoQuant: ssw-py not found` | Missing dependency | `pip install ssw-py` |\n| `Bambu: prepareAnnotations failed` | GTF malformed | Validate GTF with `gffread -E` |\n| `SQANTI3: kallisto not found` | sqanti3 expects kallisto for short-read overlap | `conda install -c bioconda kallisto` |\n| `FLAIR: flair correct slow` | Genome FASTA not indexed | `samtools faidx reference.fa` |\n| `skera: too many mismatches in adapter` | MAS primer mismatch | Verify primer fasta matches kit version |\n\n## Quality Thresholds\n\n| Metric | Recommendation | Source |\n|--------|----------------|--------|\n| Full-length non-chimeric (FLNC) % | >=80% (PacBio Iso-Seq) | PacBio convention |\n| FSM% | >=50% in well-annotated genome (field-convention rule of thumb; not specified in the SQANTI paper) | SQANTI3 documentation; Tardaguila 2018 *Genome Res* 28:396 |\n| NNC% | \u003C=30% (>30% suggests artifacts unless biologically interesting) | SQANTI3 convention |\n| Junction support | >=2 reads (or >=3 with strict filtering) | Conservative |\n| Bambu NDR | 0.1 default; 0.05 stringent | Chen 2023 *Nat Methods* 20:1187 |\n| SQANTI3 RT-switching flag | filter out unless validated | SQANTI3 convention |\n| SQANTI3 intra-priming flag | filter out | SQANTI3 convention |\n| ONT R-version | R10.4.1+ for splicing | Splice junction concordance >=95% only with R10+ |\n| HiFi CCS passes | >=3 | PacBio convention for Q30+ |\n\n## Common Pitfalls\n\n- **Ignoring reference annotation completeness** — SQANTI3 NNC categorization differs by GENCODE version; report version with results.\n- **Not running isoseq3 refine** — concatemers and polyA artifacts inflate isoform counts.\n- **Confusing FLAIR's 'collapse' with 'cluster'** — collapse merges similar isoforms post-alignment; cluster (in isoseq3) merges raw reads pre-alignment.\n- **Treating ONT R9.x splice calls as reliable** — pre-R10.4.1 error patterns generate false novel junctions.\n- **Skipping CAGE \u002F polyA validation in SQANTI3** — TSS \u002F TTS hallucination is common in long-read isoforms.\n- **DTU on too few replicates** — long-read is expensive; n=2 vs n=2 is common but underpowered.\n- **PacBio HiFi alignment with `-ax splice` (not `splice:hq`)** — use the HQ preset for HiFi data; default `splice` is for ONT.\n- **Skipping `--shortread` in FLAIR correct** — long-read junction precision is much higher with short-read augmentation.\n\n## Related Skills\n\n- splicing-quantification - Short-read PSI for cross-validation\n- isoform-switching - DTU framework on long-read counts\n- single-cell-splicing - MAS-Iso-seq + 10X integration\n- long-read-sequencing\u002Fisoseq-analysis - PacBio Iso-Seq general pipeline (CCS, lima, refine, cluster)\n- long-read-sequencing\u002Flong-read-alignment - minimap2 splice:hq details\n- long-read-sequencing\u002Flong-read-qc - QC for long-read data\n- splice-variant-prediction - Cross-reference variant predictions with full isoforms\n\n## References\n\n- Tang et al 2020 *Nat Commun* - FLAIR\n- Prjibelski et al 2023 *Nat Biotech* - IsoQuant\n- Chen et al 2023 *Nat Methods* 20:1187-1195 - Bambu\n- Tardaguila et al 2018 *Genome Res* - SQANTI (original)\n- Pardo-Palacios et al 2024 *Nat Methods* 21:793-797 - SQANTI3\n- Pardo-Palacios et al 2024 *Nat Methods* 21:1349-1363 - LRGASP benchmark\n- Wyman et al 2020 *bioRxiv* - TALON (note: not formally peer-reviewed)\n- Li 2018 \u002F 2021 *Bioinformatics* - minimap2\n- Sahlin & Makinen 2021 *Bioinformatics* - uLTRA\n- Sibley et al 2015 *Nature* - recursive splicing\n- Al'Khafaji et al 2024 *Nat Biotech* - MAS-Iso-seq \u002F Kinnex\n- Joglekar et al 2024 *Nat Neurosci* 27:1051-1063 - scISOr-Seq2 single-cell brain isoform mapping\n- Tian et al 2021 *Genome Biology* 22:310 - FLAMES\n- Brown et al 2022 *Nature* - UNC13A cryptic exon (TDP-43)\n- Klim et al 2019 *Nat Neurosci* - STMN2 cryptic splicing\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\u002Flong-read-splicing\u002FSKILL.md","FLAIR","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-long-read-splicing","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-long-read-splicing",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-long-read-splicing",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-long-read-splicing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-long-read-splicing\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Flongread_splicing_pipeline.sh","SCRIPT","脚本",3262,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-long-read-splicing\u002Fexamples\u002Flongread_splicing_pipeline.sh",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",4665,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-long-read-splicing\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},"01M7EXRQF9GFM7D9BG6N5HAT34","oath","Auditing regulatory compliance (SOC2\u002FPCI-DSS\u002FHIPAA\u002FISO 27001): maps requirements, checks controls, designs audit trails, implements Policy as Code. Use when compliance auditing is needed.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Foath\u002FSKILL.md",[],[],"2026-11-15 14:25:24",{"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":19},"01M7EXRH7TYTNZJT0BQXEWAMW7","nexus","Orchestrating multi-specialist task chains and scope-adaptive product delivery: classifies intent, selects and executes the minimum viable chain, aggregates results, and verifies acceptance criteria. For multi-domain tasks, build-first delivery, and product lifecycle execution.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnexus\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":19},"01M7EXRCDPFWVEEEFR2ZQGJCYY","nest","Designing LLM-optimized folder structures: audits and restructures directories for context efficiency, progressive disclosure, and prompt cache performance. Not for general repo structure (Grove).","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnest\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":19},"01M7EXR7JEER60TH0HD0AH4EE9","native","Implementing production iOS\u002FAndroid\u002FmacOS native features (SwiftUI, Compose) and iterating a screen against a reference design. Not for cross-platform RN\u002FFlutter (Port) or web (Artisan).","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fnative\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":19},"01M7EXR133J7DD5961R80QTRZY","muse","Defining and managing design tokens, applying token systems to existing codebases, building design system foundations. Use for spacing, color, typography, dark mode, cross-platform output.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fmuse\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":19},"01M7EXQWWX7ECQN0J50B41YN5N","morph","Converting document formats (Markdown\u002FWord\u002FExcel\u002FPDF\u002FHTML) and generating reusable conversion scripts. Use for distributable specs, accessibility-compliant PDFs, or Pandoc\u002FLibreOffice pipelines.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fdevsecops\u002Fmorph\u002FSKILL.md",[],[]]