pku-yuangroup/openai4s/bio-alternative-splicing-single-cell-splicing

Claude Code and agent skill by pku-yuangroup/openai4s

Trust tier 3
  • community
Source check pending

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

Analyzes alternative splicing at single-cell resolution. The first decision is library chemistry — 10X 3' is fundamentally limited (RT primes from poly-A, R2 falls in 3' UTR, <0.1 junction read per cell per AS event). Plate-based full-length methods (Smart-seq3, FLASH-seq, VASA-seq, STORM-seq) and single-cell long-read (MAS-Iso-seq, scISOr-Seq2) are the chemistries that give per-cell isoform structure. Tools include MARVEL (R, Smart-seq integrated), BRIE2 (Bayesian PSI with regulatory features and ELBO_gain test), scQuint (junction-cluster, plate-based; not for 10X), SpliZ (annotation-free Z-score), Psix (graph-smoothness regulated AS), and Sierra (alternative polyadenylation, often confused with AS). Use when analyzing isoform usage in scRNA-seq, identifying cell-type-specific splicing, or determining whether scRNA-seq chemistry supports splicing analysis at all.

Install

npx vskill@latest install pku-yuangroup/openai4s/bio-alternative-splicing-single-cell-splicing

SKILL.md

The same SKILL.md was published earlier as pku-yuangroup/openai4s/bio-alternative-splicing-single-cell-splicing.

Version Compatibility

Reference examples tested with: MARVEL 2.0+, BRIE2 0.2.4+, scQuint 0.1+, SpliZ 0.0.1+, Sierra 1.0+, Psix 0.1+, anndata 0.10+, scanpy 1.10+, pandas 2.2+, scipy 1.13+

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

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

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

Single-Cell Splicing Analysis

The fundamental decision is chemistry, not tool. Most droplet 3' scRNA-seq cannot support transcriptome-wide splicing inference because reverse transcription primes from the poly(A) tail and most reads land in the 3' UTR — far from CDS-region splicing events. Plate-based full-length methods and single-cell long-read sequencing are the chemistries that give per-cell isoform structure across the gene body.

The 10X 3' Problem (Quantified)

Three compounding mechanisms make 10X Chromium 3' (v3.1, GEM-X, v4) hostile to splicing:

  1. 3' enrichment: median fragment <1 kb from poly(A); >70% of unique reads fall within 3' UTR.
  2. Short R2 (~91 nt): each read straddles at most one junction; usually none, because R2 lands in 3' UTR.
  3. PCR concatemers and TSO artifacts: pollute junction detection; UMI collapse is gene-level, not isoform-level.

Quantitative estimate: Only a small fraction of cassette exons sit close enough to the polyA site to be sampled by 3' chemistry (empirical estimates from APA/3'-end atlases — see Tian & Manley 2017 Nat Rev Mol Cell Biol for the 3' UTR isoform landscape). Effective junction read yield from 10X 3' is <0.1 per cell per AS event — vs the 5-10 needed for stable per-cell PSI. Most splicing analyses on 10X 3' data report artifacts.

The 5' kit (10X 5' GEX) does not solve this — it shifts capture from 3' UTR to 5' UTR / TSS-proximal regions. Marginal improvement; not a transcriptome-wide solution. Note that V(D)J recovery requires the 10X Chromium Single Cell Immune Profiling kit (with TCR/BCR-specific enrichment), not 5' GEX alone — postdocs designing immune-repertoire experiments must use the dedicated V(D)J kit.

Decision: Does the Chemistry Support Splicing Analysis?

ChemistrySplicing analysis viable?Best alternative if no
10X 3' (Chromium v3, GEM-X, v4, Flex)No (transcriptome-wide); maybe near-3'-end eventsSierra for APA
10X 5' GEXLimited; near-5'-end events onlySierra for alternative TSS; switch to MAS-Iso-seq
Smart-seq2Yes (full transcript)MARVEL or BRIE2
Smart-seq3 / Smart-seq3xpressYes + UMI molecule countingMARVEL or BRIE2
FLASH-seqYes (faster, cheaper Smart-seq3)MARVEL or BRIE2
VASA-seqYes + total RNA (incl. nascent, IR)MARVEL with IR analysis
STORM-seqYes + total RNA + ribodepletionMARVEL with IR analysis
MAS-Iso-seq + 10X 5' (PacBio Kinnex)Yes — full isoforms per cellFLAMES, scNanoGPS, IsoQuant, see long-read-splicing
scISOr-Seq2 (PacBio + 10X)Yes — full isoforms with cell-typingFLAMES, IsoQuant
ONT direct cDNA scRNAYesFLAMES
ONT direct RNA scRNAYes + native modificationsFLAMES

Tool Selection Matrix

ToolBest forInputStrengthsFails when
MARVELSmart-seq plate-based and (v2+) 10X droplet unified workflowPlate or droplet BAMs + SeuratSE/A5SS/A3SS/MXE/RI/AFE/ALE; modality classification; native Seurat integration; v2 droplet supportR-only
BRIE2Plate-based with regulatory feature priorPlate BAM + GFF3 eventsBayesian variational PSI + ELBO_gain test; principled uncertainty; CLI-driven (brie-count, brie-quant)TensorFlow dependency; slow at scale
scQuintPlate-based annotation-free junction-cluster quantification (validated on Smart-seq2)STAR junctions across cellsCluster-level junction usage; latent DirichletAuthors recommend AGAINST use on 10X 3'/5' data (3'-bias confounds); plate-based only
SpliZAnnotation-free discovery of cell-state-associated splicingSTAR-aligned BAMsPer-gene Z-score; no event database neededAnnotation-free = power tradeoff
PsixRegulated AS along trajectoriesPSI matrix + kNN graphTests graph smoothness; robust to dropoutNeeds cell-state graph upstream
SierraAPA in 10X 3' (NOT splicing)10X BAM + GTFPeak-calling 3' ends; DEXSeq DTU on UTR isoformsAPA only; not for cassette exons
pseudobulk leafcutter / rMATSBetween-cell-type differential splicingAggregated BAMsBulk-level statistical powerLoses within-cluster heterogeneity
MAS-Iso-seq + FLAMESFull-length single-cell isoforms10X 5' + PacBio KinnexFull isoforms per cell at scaleCost; complex pipeline

Decision Tree by Goal

GoalRecommended approach
"Will my 10X 3' data support splicing?"No transcriptome-wide; consider Sierra for APA. Note: scQuint authors recommend against use on 10X data
Cassette exon analysis in cell types from Smart-seq2MARVEL with ComputePSI + AssignModality + CompareValues
Discover cell-state-associated splicing without an event databaseSpliZ
Test regulated AS along developmental pseudotimePsix
Per-cell PSI with uncertainty in low-coverage cellsBRIE2
Differential splicing between two well-defined cell typesPseudobulk leafcutter or rMATS on aggregated BAMs
APA (alternative polyadenylation, often confused with AS)Sierra
Full-length single-cell isoforms at scaleMAS-Iso-seq + FLAMES (long-read)
Microexons (3-27 nt)Long-read or aligner with low overhang (uLTRA, deSALT)
snRNA-seq (nuclei) — IR questionLibrary captures nuclear RNA enriched for incomplete splicing — interpret IR cautiously

MARVEL Plate-Based Workflow

Goal: Run a unified workflow from STAR junctions to cell-type-specific splicing calls.

Approach: Build a wide splice-junction count matrix (rows = junctions keyed by coord.intron, columns = cells), assemble per-event feature tables, then construct MARVEL object with named slots (SpliceJunction, SplicePheno, SpliceFeature, IntronCounts, GeneFeature, Exp, GTF). Quantify PSI per event class, classify modality, test differential splicing.

r
library(MARVEL); library(Seurat); library(data.table)
seurat_obj <- readRDS('cells.rds')
# Build wide SJ matrix: first column 'coord.intron' (e.g. 'chr1:100007082:100022621'),
# subsequent columns are per-cell sample IDs with junction counts as values.
# This is constructed from STAR SJ.out.tab files (one per cell) merged on intron coord.
sj_files <- list.files('star_pass2/', pattern='SJ.out.tab$', full.names=TRUE)
sj_long <- rbindlist(lapply(sj_files, function(f) {
d <- fread(f, sep='\t', header=FALSE,
col.names=c('chr','start','end','strand','motif','annot','unique','multi','overhang'))
d$coord.intron <- paste(d$chr, d$start, d$end, sep=':')
d$sample <- gsub('_SJ.out.tab$', '', basename(f))
d[, .(coord.intron, sample, unique)]
}))
sj <- dcast(sj_long, coord.intron ~ sample, value.var='unique', fill=0)
# SpliceFeature is a NAMED LIST keyed by event class
df.feature.list <- list(
SE = read.table('events_SE.txt', header=TRUE, sep='\t'),
A5SS = read.table('events_A5SS.txt', header=TRUE, sep='\t'),
A3SS = read.table('events_A3SS.txt', header=TRUE, sep='\t'),
MXE = read.table('events_MXE.txt', header=TRUE, sep='\t'),
RI = read.table('events_RI.txt', header=TRUE, sep='\t')
)
# SplicePheno: per-cell metadata; sample.id column maps to SpliceJunction column names
df.pheno <- seurat_obj@meta.data
df.pheno$sample.id <- rownames(df.pheno)
marvel <- CreateMarvelObject(
SpliceJunction = sj,
SplicePheno = df.pheno,
SpliceFeature = df.feature.list,
GeneFeature = read.table('gene_features.tsv', header=TRUE, sep='\t'),
Exp = read.table('tpm.tsv', header=TRUE, sep='\t', row.names=1),
GTF = rtracklayer::import('annotation.gtf')
)
marvel <- ComputePSI(marvel, CoverageThreshold=10, EventType='SE')
marvel <- AssignModality(marvel, EventType='SE')
marvel <- CompareValues(
marvel,
cell.group.g1 = neurons, cell.group.g2 = glia,
method = 'wilcox', n.cells = 25, psi.delta = 0.1
)

For 10X droplet data, MARVEL v2+ provides CreateMarvelObject.10x() and AnnotateSJ.10x() constructors. Verify the exact API via ?CreateMarvelObject.10x in installed MARVEL.

MARVEL classifies events into modalities (Song 2017 Mol Cell): included (PSI~1), excluded (PSI~0), bimodal (mixture at 0/1), middle (peaked ~0.5), multimodal. Bimodality usually reflects mixed cell states or stochastic monoallelic-like bursting. Mid-modality (peaked at 0.5) can be technical (mixed cells in a droplet) — confirm with full-length data.

BRIE2 Bayesian PSI

Goal: Estimate per-cell PSI with informative regulatory-feature prior; test cell-state association via likelihood-ratio testing on covariate effects.

Approach: BRIE2 is a CLI-driven workflow (brie-count for read counting, brie-quant for variational inference + LRT). Prepare a GFF3 of splicing events, count cell-barcoded junction reads, then fit the model with covariate testing.

bash
# 1. Count splicing events per cell
brie-count \
-a splicing_events.gff3 \
-S sample_list.tsv \
-o brie_counts/ \
-p 16
# 2. Fit BRIE2 with LRT against the cell-type covariate
brie-quant \
-i brie_counts/brie_count.h5ad \
-c cell_metadata.tsv \
-o brie_quant.h5ad \
--interceptMode gene \
--LRTindex All \
--testBase null \
--MCsize 3 \
--batchSize 1000000 \
-p 16

--interceptMode gene fits a gene-specific intercept (recommended); --LRTindex All tests all covariates; --testBase null uses the null model as the LRT reference. Verify exact flag set via brie-quant -h in installed BRIE2.

python
import scanpy as sc
adata_splice = sc.read_h5ad('brie_quant.h5ad')
# Per-event covariate effects, ELBO values, and LRT statistics live in
# adata_splice.varm and adata_splice.var; column names depend on BRIE2 version.
# Inspect with: print(adata_splice); print(adata_splice.varm.keys())
# Per-event significance is typically derived from LRT delta-ELBO.

BRIE2 (Huang & Sanguinetti 2021 Genome Biol) uses a sequence-derived feature prior (exon length, GC content, splice site strength, motif counts) to regularize PSI estimates in low-coverage cells. The LRT-based covariate test answers "is this event associated with cell state?" without requiring per-cell PSI accuracy. Threshold the delta-ELBO at ~3 (analogous to log-Bayes-factor); confirm against version-specific output keys via the brie-tutorials repo.

SpliZ for Annotation-Free Discovery

Goal: Identify splicing-defined cell populations without an event database.

Approach: Compute per-gene splicing Z-score across cells; test for cell-state association via permutation.

bash
# SpliZ is a Nextflow pipeline (not a standalone CLI). Configure inputs in a .config
# file (dataname, input_file, libraryType, grouping_level_1/2) - either SICILIAN
# output (SICILIAN=true) or BAMs via a samplesheet CSV + metadata + GTF (SICILIAN=false).
nextflow run salzmanlab/spliz -r main -latest -c spliz.config

SpliZ (Olivieri 2022 Nat Methods) is robust to dropout because it pools junction information across the gene; particularly useful for discovering splicing diversity in heterogeneous tumor samples.

Psix for Regulated AS Along Trajectories

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

Security

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

Quality evaluation

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

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

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

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

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