Alternative splicing from RNA-seq data#
This mini-protocol produces normalized, gene-annotated splicing phenotypes for splicing-QTL analysis using either LeafCutter or psichomics.
Miniprotocol Timing#
Timing: TBD
Overview#
The splicing-calling module provides two alternative quantification routes. LeafCutter derives intron excision ratios from STAR splice-junction files without relying on a transcript annotation. psichomics calculates percent-spliced-in (PSI) values for annotated alternative-splicing events and therefore also requires the SUPPA annotation object.
The normalization module performs missingness and variability filtering followed by quantile normalization. The gene-annotation module then assigns coordinates and phenotype groups required by TensorQTL. LeafCutter and psichomics are alternative routes, not one combined chain.
Steps#
Analysis goal |
Commands to run, in order |
Inputs |
|---|---|---|
LeafCutter from aligned RNA-seq data |
1 → 2 → 3 |
|
LeafCutter from a precomputed ratio matrix |
2 → 3 |
|
psichomics from aligned RNA-seq data |
4 → 5 → 6 |
BAM list and alignments above; |
psichomics from a precomputed PSI matrix |
5 → 6 |
|
Within the selected route, run the commands in numerical order. The bundled example data support the two precomputed-matrix routes; the calling routes require aligned BAM files.
1. Quantify intron usage with LeafCutter#
What it does: leafcutter extracts splice junctions and clusters introns to calculate per-sample intron excision ratios.
sos run pipeline/splicing_calling.ipynb leafcutter --cwd output/splicing/leafcutter --samples output/rnaseq/protocol_example.rnaseq.bam.list.txt --data-dir output/rnaseq/star_output_wasp
2. Normalize LeafCutter ratios#
What it does: leafcutter_norm filters introns and clusters, mean-imputes retained missing values, and quantile-normalizes the ratio matrix.
sos run pipeline/splicing_normalization.ipynb leafcutter_norm --cwd output/splicing/leafcutter --ratios input/rnaseq/protocol_example.leafcutter.intron_usage_perind.counts.gz --mean-impute
3. Annotate LeafCutter phenotypes#
What it does: annotate_leafcutter_isoforms maps introns to genes and writes the coordinate-sorted phenotype matrix and phenotype-group file used by TensorQTL.
sos run pipeline/gene_annotation.ipynb annotate_leafcutter_isoforms --cwd output/splicing/leafcutter --phenoFile input/rnaseq/protocol_example.leafcutter.intron_usage_perind.counts.gz_raw_data.qqnorm.txt --intron-count input/rnaseq/protocol_example.leafcutter.intron_count.tsv --coordinate-annotation input/reference_data/Homo_sapiens.GRCh38.103.chr.reformatted.collapse_only.gene.ERCC.gtf --map-stra site
4. Quantify annotated events with psichomics#
What it does: psichomics uses aligned reads and a SUPPA event annotation to calculate PSI values for alternative-splicing events.
sos run pipeline/splicing_calling.ipynb psichomics --cwd output/splicing/psichomics --samples output/rnaseq/protocol_example.rnaseq.bam.list.txt --data-dir output/rnaseq/star_output_wasp --splicing-annotation input/reference_data/Homo_sapiens.GRCh38.103.chr.reformatted.ERCC.SUPPA_annotation.rds
5. Normalize psichomics PSI values#
What it does: psichomics_norm filters PSI events for missingness and variability and produces a quantile-normalized event matrix.
sos run pipeline/splicing_normalization.ipynb psichomics_norm --cwd output/splicing/psichomics --ratios input/rnaseq/protocol_example.psichomics.psi_raw_data.tsv
6. Annotate psichomics phenotypes#
What it does: annotate_psichomics_isoforms assigns genomic coordinates and phenotype groups to normalized psichomics events for TensorQTL.
sos run pipeline/gene_annotation.ipynb annotate_psichomics_isoforms --cwd output/splicing/psichomics --phenoFile output/splicing/psichomics/psichomics_raw_data_bedded.qqnorm.txt --coordinate-annotation input/reference_data/Homo_sapiens.GRCh38.103.chr.reformatted.collapse_only.gene.ERCC.gtf
Output Files#
Route/step |
Output filename and relative path |
Description |
|---|---|---|
LeafCutter calling |
|
Intron excision ratios and supporting intron counts |
LeafCutter normalization |
|
QC-filtered and quantile-normalized ratios |
LeafCutter annotation |
|
TensorQTL phenotype and grouping files |
psichomics calling |
|
Raw event-level PSI matrix |
psichomics normalization |
|
QC-filtered and normalized PSI matrix |
psichomics annotation |
|
TensorQTL phenotype and grouping files |
Anticipated Results#
Each selected route ends with a coordinate-sorted, bgzip-compressed phenotype matrix and a matching phenotype-group file. Rows represent introns or annotated splicing events, columns represent samples, and the normalized values can be supplied directly to splicing-QTL association testing.
Command interface#
sos run pipeline/splicing_calling.ipynb -h
sos run pipeline/splicing_normalization.ipynb -h
sos run pipeline/gene_annotation.ipynb -h