Quantifies alternative splicing from aligned RNA-seq with LeafCutter2, producing intron-usage tables in which every junction carries a productive or unproductive label, and tests for differential splicing between two groups.
Overview¶
This module turns aligned RNA-seq into splicing phenotypes, as splicing_calling does, but replaces LeafCutter with LeafCutter2 and adds a functional label to every junction. It expects BAM files already mapped with STAR using the WASP option, following the GTEx/TOPMed RNA-seq pipeline.
Splicing is quantified as alternatively excised intron usage: junctions sharing a splice site are grouped into clusters and each intron is reported as a fraction of the reads in its cluster, so skipped exons, alternative 5-prime and 3-prime splice site usage and more complex events are captured by one measure without naming the event type Li et al. (2018).
What LeafCutter2 adds is classification. A dynamic programming pass over the clusters reads each junction against the annotated coding sequence and asks whether the transcript it implies stays in frame to a stop codon: junctions are labeled PR (productive, protein-coding), UP (unproductive, premature stop and so a nonsense-mediated decay target), NE (neither: a junction in a gene with no protein-coding transcript) or IN (not evaluated: the default for any junction the classifier did not assess; the code calls it intergenic, but it also covers junctions inside genes the classifier skipped). The label is appended to the intron ID, so chr10:134786:179993:clu_1_+:PR carries chromosome, intron, cluster and function in one key (Buen Abad Najar et al., 2025). Unproductive splicing is the quantity of interest wherever a splicing factor is suspected of losing control of cryptic exons.

How LeafCutter2 works. (a) Junction reads are clustered, classified and counted, giving productive and unproductive splicing for sQTL mapping and differential splicing. (b) To classify a junction, LeafCutter2 follows paths from annotated start codons to stop codons and applies nonsense-mediated decay (NMD) rules: junctions are called productive or unproductive, and some remain unclassified. Panels a and b adapted (cropped) from Buen Abad Najar et al., 2025, Figure 1, under CC BY 4.0.
leafcutter2extracts junctions from each BAM with regtools, then clusters, classifies and quantifies them.leafcutter2_preprocessingis the first half ofleafcutter2, stopping once the list of per-sample.juncfiles is written. Run it only when the clustering happens elsewhere.leafcutter2_clusterstarts from an existing list of junction files and does the clustering, classification and quantification alone. It is the entry point when junctions were extracted by another pipeline.star2juncconverts STARSJ.out.tabfiles into the junction BED format LeafCutter2 reads, for cohorts where the BAMs are no longer available.differential_splicingtests every cluster for a change in intron usage between two groups with LeafCutter’sleafcutter_ds.R, adjusting for covariates.
leafcutter2 and leafcutter2_preprocessing share their first step. leafcutter2_cluster is an alternative entry point to the second step, not a stage that follows it. differential_splicing follows either clustering entry point and reads its LeafCutter1-format count table.
Differential splicing is tested with a Dirichlet-multinomial model fitted to each cluster on its own, so differential_splicing splits the count table by chromosome, tests the 24 parts (1-22, X, and everything else) as separate jobs, and joins the results. Only the false discovery rate needs every cluster at once; it is recomputed over the joined table with the Benjamini-Hochberg method, so the result is the same as one unsplit run (Li et al., 2018).
When to run it. After STAR alignment, and before splicing_normalization, in place of splicing_calling. Run differential_splicing after clustering when the question is a comparison of two groups rather than QTL mapping.
Input¶
--samplestests/fixtures/splicing_calling/leafcutter/protocol_example.sample_list.txt(the sample manifest, tab delimited with a header, shared withsplicing_calling.coord_bam_listis the column read for BAM paths;SJ_listis read only bystar2junc. Strandness isrf,fr, orstrand_missing. Output files take their prefix from this filename with all extensions stripped, so this manifest producesprotocol_example.*; override it with--output-prefix.)
sample_id strand coord_bam_list SJ_list
SAMPLE_001 rf SAMPLE_001.Aligned.sortedByCoord.out.bam SAMPLE_001.SJ.out.tab
SAMPLE_002 rf SAMPLE_002.Aligned.sortedByCoord.out.bam SAMPLE_002.SJ.out.tabThe SJ.out.tab files this manifest names are shipped, so star2junc runs as written; the junction files it pairs with are shipped too, so leafcutter2_cluster does as well. The BAMs are not in the repository; supply them through --data-dir to run leafcutter2 or leafcutter2_preprocessing from this manifest, or use the BAM manifest below.
--samplestests/fixtures/splicing_calling/leafcutter/protocol_example.bam_list.txt(a second manifest for the workflows that start from BAMs, naming the one alignment the repository ships. Its strandness isXS, the moderegtoolsinfers from the BAM’s own tags, because this fixture carries no library strand information.)
sample_id strand coord_bam_list SJ_list
SAMPLE_001 XS protocol_example.chr22_16M_17M.bam NAThat BAM is tests/fixtures/phenotype_formatting/protocol_example.chr22_16M_17M.bam, the chr22:16M-17M alignment the repository’s own splicing_calling tests use, and the one the shipped .junc fixtures were extracted from. Junction files are named after the BAM rather than the sample_id, so it produces protocol_example.chr22_16M_17M.junc.
--data-dir-- directory holding the files named in the manifest; defaults to the directory containing--samples.--cwd-- output directory, defaultoutput.--container-- default empty. LeafCutter2 is installed into the pixi environment rather than distributed as an image, so this module runs without a container unless one is supplied.--entrypoint-- with--container, the command that starts the image’s environment; by defaultmicromamba run -n <name>, with the name taken from the image (leafcutter_apptainer:latestorleafcutter.sifgivesleafcutter).
LeafCutter2 2.0 or newer is required. The 2.x package restructured the code into leafcutter2/ with classifier.py and a cli.py entry point, and added the leafcutter2-star2junc command that star2junc calls. Pre-2.0 builds ship the original repository scripts (Transcript_tools.py, ForwardSpliceJunctionClassifier.py) with no package metadata, and their classification step fails.
Check by whether leafcutter2-star2junc is on PATH, not by the version string: packaged builds do not always carry the upstream version. The dnachun conda build is labeled 1.0.1 but ships 2.0.1, so a version comparison alone would wrongly reject it.
pixi global install leafcutter2 installs it. LeafCutter2 is not published on PyPI, so pip install leafcutter2 fails; to install from source use pip install git+https://github.com/leafcutter2/leafcutter2.git, or put that URL in a project manifest’s [pypi-dependencies].
Junction extraction (leafcutter2, leafcutter2_preprocessing):
--anchor-len-- minimum anchor length on each side of a junction, default8.--min-intron-len-- shortest intron considered, default50.--max-intron-len-- longest intron considered, default500000.--min-mapq-- minimum mapping quality of a read before its junctions are counted, default0(no filter). regtools counts every alignment of a read, so a read that maps to several places adds support at each of them, and in repeated gene families this can create junctions that are not really there. STAR gives uniquely mapped reads a mapping quality of255and multimappers3or less, so--min-mapq 255keeps unique reads only.
Clustering, classification and quantification (leafcutter2, leafcutter2_cluster):
--annotation-gtfreference_data/Homo_sapiens.GRCh38.103.chr.reformatted.ERCC.gtf(GTF carryinggene,transcript,CDS,start_codonandstop_codonfeatures. Classification reads the coding sequence from it, so a GTF without start and stop codons will not do.)--genome-fastareference_data/GRCh38_full_analysis_set_plus_decoy_hla.noALT_noHLA_noDecoy_ERCC.fasta(genome assembly matching the GTF, with a.faiindex beside it)
--juncfilestests/fixtures/splicing_calling/leafcutter/protocol_example.junction_files.txt(leafcutter2_clusteronly: one junction file path per line)
tests/fixtures/splicing_calling/leafcutter/SAMPLE_001.junc.gz
tests/fixtures/splicing_calling/leafcutter/SAMPLE_002.junc.gz--min-clu-reads-- minimum reads in a cluster, default30.--min-reads-- minimum reads for a junction to be considered, default5.--min-clu-ratio-- minimum fraction of cluster reads supporting a junction, default0.001.--min-read-std-- minimum standard deviation of reads across samples, default0.5.--max-intron-len-- longest intron clustered, default500000.--offset-- coordinate offset. Defaults to1inleafcutter2; required, with no default, inleafcutter2_cluster. See below.--output-prefix-- prefix for every output file, default the--samplesname with all extensions stripped. Set it when two workflows write into one--cwd, or when the manifest name carries dots that are not extensions.
--max-intron-len is 500000 here against a LeafCutter2 default of 100000. The larger value is the GTEx sQTL discovery default used throughout this protocol, and the one splicing_calling applies. Leaving it at 100000 silently discards every intron above that length, so the two pipelines would no longer be comparable. The reason for the larger value is protocol compatibility, not a claim about where cryptic exons occur.
--offset depends on the junction file format, and getting it wrong corrupts the classification rather than failing loudly.
Junction files come in two shapes. regtools .junc is BED12, with the anchor blocks in columns 11 and 12; the BED6 form written by star2junc, and used by LeafCutter2’s own example data, carries intron coordinates directly. The two need different offsets:
| Input | Offset | Evidence |
|---|---|---|
regtools .junc (BED12) | 1 | Clustering the repository’s two junction fixtures gives no intron shared with leafcutter_cluster_regtools.R at offset 0, and exact agreement on all six at offset 1. |
BED6, including star2junc output | 0 | LeafCutter2’s twelve-sample chr10 example classifies 2,324 PR / 345 UP / 236 NE / 125 IN at offset 0, with intron IDs matching the published ones. At offset 1 the same data gives 505 / 1,261 / 1,138 / 125. Confirmed on three whole-transcriptome brain samples against Ensembl 108: 55,248 junctions, 68% PR. |
leafcutter2 defaults to 1, because its junctions always come from regtools via leafcutter2_1, so the format is known.
leafcutter2_cluster has no default and will not run without --offset. Its junction list comes from outside the module, so neither value is safe to assume: a default would be wrong roughly half the time and wrong silently. Pass 0 for BED6, 1 for regtools .junc, as the minimal working example does.
The step rejects a junction list that mixes the two formats, since one offset cannot suit both. Beyond that, an offset error is silent: the symptom is a collapse in the productive fraction, because shifted coordinates no longer meet the annotated splice sites. Check the PR share before trusting a run.
The GTF and FASTA are not in the repository; both are built by reference_data_preparation and are the same pair RNA_calling and bulk_expression_normalization use. Chromosome names must match across the junction files, the GTF and the FASTA. This pair is chr-prefixed, so junctions called against a bare-numbered assembly will not classify; the clustering steps check the two naming styles agree before starting and stop if they do not.
Differential splicing (differential_splicing):
--countsoutput/leafcutter2/leafcutter1_files/protocol_example_perind_numers.counts.gz(the LeafCutter1-format intron counts written byleafcutter2_2orleafcutter2_cluster. The header holds the sample names only; each row is an intron and its read count in each sample. The preview is the repository’sexpected_perind_numers.counts.gz, which has the same layout.)
SAMPLE_001 SAMPLE_002
chr22:12314919:12319407:clu_1_- 31 23
chr22:12314919:12351352:clu_1_- 25 0--groups<groups.txt>(space or tab delimited, no header. Column 1 is the sample name, which must match a column name in--counts: the junction file base name, not the manifestsample_id. Column 2 is the group; exactly two groups are compared, and the second group named is compared against the first. Further columns are covariates. Numeric columns are treated as continuous, so code a categorical covariate as text, for examplebatch1rather than1. Samples missing from this file are left out of the test. No groups file ships with the repository.)
--min-samples-per-intron-- ignore introns with reads in fewer samples than this, default5.--min-samples-per-group-- samples per group that need--min-coveragereads in a cluster for it to be tested, default3.--min-coverage-- reads a cluster needs in each of those samples, default20.--timeout-- seconds allowed for one cluster’s model fit, default30.--output-prefix-- prefix for the output files, default the--groupsname without its extension.
leafcutter_ds.R needs R with the leafcutter package, which the pixi environment does not provide. Run this workflow with --container oras://ghcr.io/cumc/leafcutter_apptainer:latest, the image splicing_normalization also uses; commands then start in the image’s leafcutter environment (see --entrypoint). If micromamba stops with temp_directory_path: No such file or directory, the host’s temporary folder is not visible inside the image; run export SINGULARITYENV_TMPDIR=/tmp APPTAINERENV_TMPDIR=/tmp first. Each of the 24 parts is one job, and --numThreads, --walltime and --mem apply to each part; the largest chromosomes take the longest.
Runtime:
--numThreads,--job-size,--walltime,--mem-- threads (default8) and cluster resources.--modular-script-dir-- location of the shell drivers, defaultcode/script.
Output¶
output/leafcutter2/SAMPLE_001.junc(leafcutter2_1) (per-sample junctions extracted from the BAM by regtools, BED12 with the anchor blocks in columns 11 and 12)output/leafcutter2/protocol_example.junction_counts.gz(leafcutter2_2,leafcutter2_cluster) (one row per junction, keyedchrom:start:end:clu_N_strand:CLASS, giving raw supporting-read counts per sample. This is the table LeafCutter’s R differential tools read.)
chrom SAMPLE_001 SAMPLE_002
chr22:12314919:12319407:clu_1_-:IN 31 23
chr22:12314919:12351352:clu_1_-:IN 25 0
chr22:28168701:28196318:clu_2_-:UP 11 6output/leafcutter2/protocol_example.cluster_ratios.gz(leafcutter2_2,leafcutter2_cluster) (the same rows asnumerator/denominatorstrings, the junction’s reads over its cluster’s reads)
chrom SAMPLE_001 SAMPLE_002
chr22:12314919:12319407:clu_1_-:IN 31/56 23/23
chr22:12314919:12351352:clu_1_-:IN 25/56 0/23output/leafcutter2/clustering/protocol_example_clusters(leafcutter2_2,leafcutter2_cluster) (the intron cluster definitions, one cluster per line asstart:end:reads. Passing this back through the tool’s--clusterflag skips clustering on a repeat run.)
chr22:- 12314919:12319407:54 12314919:12351352:25
chr22:- 28168701:28196318:17 28168701:28214161:15output/leafcutter2/clustering/protocol_example_junction_classifications.txt(leafcutter2_2,leafcutter2_cluster) (the classification table the:CLASSlabel is derived from.Gene_namecarries whatever the GTF’sgene_nametag holds, which in the protocol’s reformatted annotation is the Ensembl gene ID.)
Gene_name Intron_coord Strand Annot Coding UTR GencodePC
ENSG00000100154 chr22:28629830-28679621 - True True False True
ENSG00000100154 chr22:28306643-28629551 - True True False Trueoutput/leafcutter2/clustering/protocol_example_exon_stats.txt(leafcutter2_2,leafcutter2_cluster) (per-exon counts from the classification pass)output/leafcutter2/clustering/protocol_example_lowusage_introns(leafcutter2_2,leafcutter2_cluster) (introns dropped for falling below--min-clu-ratio)output/leafcutter2/clustering/protocol_example_nuc_rule_distances.txt(leafcutter2_2,leafcutter2_cluster) (distances used by the 50-nucleotide NMD rule)output/leafcutter2/clustering/protocol_example_long_exon_distances.txt(leafcutter2_2,leafcutter2_cluster) (distances used by the long-final-exon exception to that rule)
Names under clustering/ and leafcutter1_files/ are LeafCutter2’s own, built by appending an underscore and a suffix to --outprefix; this module cannot change them. The files it names itself use a dot.
output/leafcutter2/leafcutter1_files/protocol_example_perind.counts.gz(leafcutter2_2,leafcutter2_cluster) (LeafCutter1-format cluster ratios without the class label, written because this module always passes--keepleafcutter1. It lets the originalleafcutter_ds.Rrun on LeafCutter2 clusters.)output/leafcutter2/leafcutter1_files/protocol_example_perind_numers.counts.gz(leafcutter2_2,leafcutter2_cluster) (the matching LeafCutter1-format numerator table)output/leafcutter2/protocol_example.intron_usage_perind.junc(leafcutter2_preprocessing_2) (the list of per-sample.juncfiles, one path per line)output/leafcutter2/SAMPLE_001.SJ.out.junc.gz(star2junc) (BED6 junctions converted from a STARSJ.out.tab, read counts in column 5. The name comes from theSJ.out.tabit was converted from.)
chr22 12314919 12319407 . 31 -
chr22 28168701 28196318 . 11 -output/leafcutter2/<prefix>_parts/<prefix>.part_1.counts.gz(differential_splicing_1) (the--countstable split by chromosome, one file for each of1to22,Xandother, each with the original header.<prefix>is--output-prefix. A chromosome with no clusters gets a header-only file.)output/leafcutter2/<prefix>_parts/<prefix>.part_1_cluster_significance.txtandoutput/leafcutter2/<prefix>_parts/<prefix>.part_1_effect_sizes.txt(differential_splicing_2) (leafcutter_ds.Rresults for one part. Theirp.adjustcolumn is corrected within that part only and is superseded by the joined files below. A part with no clusters leaves both files empty.)output/leafcutter2/<prefix>_cluster_significance.txt(differential_splicing_3) (one row per cluster.statusisSuccesswhen the cluster was tested and otherwise names the filter that removed it;loglranddfare the likelihood-ratio statistic and its degrees of freedom;pis the p-value;p.adjustis the Benjamini-Hochberg false discovery rate over every tested cluster. Nodifferential_splicingrun ships with the repository; the rows below are from a 200-sample cohort run, filtered to tested clusters.)
status loglr df p cluster p.adjust
Success 1.3909991384935 3 0.426471900986588 chr1:clu_1000_+ 1
Success 2.08124492446643 2 0.124774780291386 chr1:clu_10000_- 0.763086823387392output/leafcutter2/<prefix>_effect_sizes.txt(differential_splicing_3) (one row per intron.logefis the fitted log effect; the two group columns, named after the groups, are the fitted share of the cluster’s reads using the intron in each group;deltapsiis the second group minus the first. Rows from the same cohort run.)
intron logef nonTDP TDP deltapsi
chr1:11018873:11020429:clu_1000_+ -0.0418300775955741 0.430996568014776 0.441382860788809 0.0103862927740326
chr1:11018873:11020434:clu_1000_+ -0.00616456524633462 0.000214498361652778 0.000227643349884984 1.31449882322058e-05Sample column names in junction_counts.gz and cluster_ratios.gz are the junction files’ base names, not the sample_id column of the manifest. Junctions converted by star2junc therefore carry names like SAMPLE_001.SJ.out, and real STAR output often adds a pass suffix, giving SAMPLE_001.1pass.SJ.out. A groups file for differential splicing must use these names, not the manifest’s.
Each step also writes a .stderr log beside its output. LeafCutter2 logs to standard error, so the corresponding .stdout is empty and is not kept.
protocol_example.cluster_ratios.gz is the file that feeds splicing_normalization, not junction_counts.gz. Its prepare_phenotype step splits every cell on / and reads the denominator, so the numerator/denominator form is required; handing it the integer counts fails on the missing second field. junction_counts.gz is for differential splicing tools that want raw counts, such as LeafCutter’s leafcutter_ds.R.
The fifth :CLASS field in the intron ID is safe for that step: it reads only the first three colon-separated fields as coordinates and carries the full ID through unchanged.
Minimal Working Example¶
Cluster and classify from junction files¶
leafcutter2_cluster takes a list of junction files and runs clustering, classification and quantification. The repository ships two regtools junction fixtures and a small chr22 GTF and FASTA, so this example runs on repository data. The FASTA is copied under output/ first because LeafCutter2 writes its index next to it. With real data, use a reference that includes the chromosomes in the junction files with matching names. --min-clu-reads 3 is needed for these small fixtures; a real cohort should keep the default. --offset 1 is passed because the fixtures are regtools .junc. Almost all of the runtime is parsing the annotation, not the junctions, so it is near-constant regardless of cohort size; peak memory was 3.3 GB against a 1.3 GB GTF. Four of the six introns in expected_perind_numers.counts.gz survive, at identical coordinates; the other two belong to a 12-read cluster dropped by the 30-read --min-clu-reads minimum.
Timing: ~7 min (on toy dataset)
mkdir -p output/leafcutter2/reference
cp tests/fixtures/splicing_calling/leafcutter/reference/chr22.leafcutter2.fa.gz tests/fixtures/splicing_calling/leafcutter/reference/chr22.leafcutter2.fa.gz.fai tests/fixtures/splicing_calling/leafcutter/reference/chr22.leafcutter2.fa.gz.gzi output/leafcutter2/reference/
sos run pipeline/splicing_calling_leafcutter2.ipynb leafcutter2_cluster \
--cwd output/leafcutter2 \
--samples tests/fixtures/splicing_calling/leafcutter/protocol_example.sample_list.txt \
--juncfiles tests/fixtures/splicing_calling/leafcutter/protocol_example.junction_files.txt \
--annotation-gtf tests/fixtures/splicing_calling/leafcutter/reference/Homo_sapiens.GRCh38.103.chr22.leafcutter2.reformatted.gtf \
--genome-fasta output/leafcutter2/reference/chr22.leafcutter2.fa.gz \
--offset 1 \
--min-clu-reads 3Junction extraction and clustering from BAMs¶
leafcutter2 extracts junctions from every BAM with regtools and then clusters, classifies and quantifies them. This is the entry point for a full cohort. The one alignment the repository ships covers chr22:16M-17M in a single sample, so --min-clu-reads 3 is needed here: at the default of 30 no cluster survives, and LeafCutter2 then fails in classification rather than exiting cleanly. The repository’s own splicing_calling test uses the same lowered value on this data. A real cohort should leave the default alone.
Timing: ~7 min (on toy dataset)
mkdir -p output/leafcutter2/reference
cp tests/fixtures/splicing_calling/leafcutter/reference/chr22.leafcutter2.fa.gz tests/fixtures/splicing_calling/leafcutter/reference/chr22.leafcutter2.fa.gz.fai tests/fixtures/splicing_calling/leafcutter/reference/chr22.leafcutter2.fa.gz.gzi output/leafcutter2/reference/
sos run pipeline/splicing_calling_leafcutter2.ipynb leafcutter2 \
--cwd output/leafcutter2 \
--samples tests/fixtures/splicing_calling/leafcutter/protocol_example.bam_list.txt \
--data-dir tests/fixtures/phenotype_formatting \
--annotation-gtf tests/fixtures/splicing_calling/leafcutter/reference/Homo_sapiens.GRCh38.103.chr22.leafcutter2.reformatted.gtf \
--genome-fasta output/leafcutter2/reference/chr22.leafcutter2.fa.gz \
--min-clu-reads 3Junction extraction only¶
leafcutter2_preprocessing is the first half of the command above, stopping once the list of .junc files is written.
Timing: ~1 min (on toy dataset)
sos run pipeline/splicing_calling_leafcutter2.ipynb leafcutter2_preprocessing \
--cwd output/leafcutter2 \
--samples tests/fixtures/splicing_calling/leafcutter/protocol_example.bam_list.txt \
--data-dir tests/fixtures/phenotype_formattingJunction conversion from STAR output¶
star2junc converts each SJ.out.tab named in the manifest into the junction BED format LeafCutter2 reads, for cohorts whose BAMs are no longer available. Its output feeds leafcutter2_cluster.
Timing: ~1 s (on toy dataset)
sos run pipeline/splicing_calling_leafcutter2.ipynb star2junc \
--cwd output/leafcutter2 \
--samples tests/fixtures/splicing_calling/leafcutter/protocol_example.sample_list.txt \
--data-dir tests/fixtures/splicing_calling/leafcutterDifferential splicing between two groups¶
differential_splicing splits the clustered intron counts by chromosome, tests each part with leafcutter_ds.R, and joins the parts with the false discovery rate recomputed over all clusters. It reads the LeafCutter1-format table written by either clustering workflow. The two fixture samples are too few to test, so the clustered cohort and the groups file are placeholders.
mkdir -p output/leafcutter2/differential_splicing
# Example data: 20 samples' intron counts on chr22, split into two groups of 10. With real data, use
# leafcutter1_files/<prefix>_perind_numers.counts.gz from leafcutter2 and your own groups file.
zcat tests/fixtures/splicing_normalization/leafcutter_perind.counts.gz | awk 'NR == 1 { $1 = ""; sub(/^ /, ""); print; next } { for (i = 2; i <= NF; i++) sub(/\/.*/, "", $i); print }' | gzip > output/leafcutter2/differential_splicing/protocol_example_perind_numers.counts.gz
zcat tests/fixtures/splicing_normalization/leafcutter_perind.counts.gz | head -n 1 | tr ' ' '\n' | tail -n +2 | awk '{ print $1 "\t" (NR <= 10 ? "case" : "control") }' > output/leafcutter2/differential_splicing/protocol_example.groups.txt
sos run pipeline/splicing_calling_leafcutter2.ipynb differential_splicing \
--cwd output/leafcutter2/differential_splicing \
--samples tests/fixtures/splicing_calling/leafcutter/protocol_example.sample_list.txt \
--counts output/leafcutter2/differential_splicing/protocol_example_perind_numers.counts.gz \
--groups output/leafcutter2/differential_splicing/protocol_example.groups.txt \
--container oras://ghcr.io/cumc/leafcutter_apptainer:latestCommand Interface¶
sos run pipeline/splicing_calling_leafcutter2.ipynb -husage: sos run pipeline/splicing_calling_leafcutter2.ipynb
[workflow_name | -t targets] [options] [workflow_options]
workflow_name: Single or combined workflows defined in this script
targets: One or more targets to generate
options: Single-hyphen sos parameters (see "sos run -h" for details)
workflow_options: Double-hyphen workflow-specific parameters
Workflows:
leafcutter2
leafcutter2_preprocessing
leafcutter2_cluster
star2junc
differential_splicing
Global Workflow Options:
--modular-script-dir code/script (as path)
--cwd output (as path)
The output directory for generated files.
--samples VAL (as path, required)
Sample meta data list
--data-dir path(f"{samples:d}")
Raw data directory, default to the same directory as
sample list
--job-size 1 (as int)
For cluster jobs, number commands to run per job
--walltime 5h
Wall clock time expected
--mem 16G
Memory expected
--numThreads 8 (as int)
Number of threads
--container ''
Software container option
Sections
leafcutter2_1, leafcutter2_preprocessing_1:
Workflow Options:
--anchor-len 8 (as int)
anchor length (default 8)
--min-intron-len 50 (as int)
minimum intron length to be analyzed (default 50)
--max-intron-len 500000 (as int)
maximum intron length to be analyzed (default 500000)
--min-mapq 0 (as int)
keep only reads with at least this mapping quality
before extraction (default 0, off; 255 keeps uniquely
mapped reads for STAR alignments)
leafcutter2_2:
Workflow Options:
--annotation-gtf VAL (as path, required)
GTF annotation with gene, transcript, CDS, start_codon
and stop_codon features
--genome-fasta VAL (as path, required)
Genome assembly FASTA matching the GTF, with a .fai
index beside it
--output-prefix f'{samples:bnn}'
prefix for every output file; defaults to the manifest
name with all extensions stripped. Set it explicitly
when two workflows write into one --cwd, or when the
manifest name carries dots that are not extensions
(cohort.v1.sample_list.txt would otherwise collapse to
"cohort").
--min-clu-reads 30 (as int)
minimum reads in a cluster (default 30 reads)
--min-reads 5 (as int)
minimum reads for a junction to be considered for
clustering (default 5 reads)
--min-read-std 0.5 (as float)
minimum standard deviation of reads across samples
(default 0.5)
--min-clu-ratio 0.001 (as float)
minimum fraction of reads in a cluster that support a
junction (default 0.001)
--max-intron-len 500000 (as int)
maximum intron length to be analyzed (default 500000,
the GTEx value, not LeafCutter2's 100000)
--offset 1 (as int)
coordinate offset; 1 matches
leafcutter_cluster_regtools.R intron ends for regtools
.junc input
leafcutter2_cluster:
Workflow Options:
--juncfiles VAL (as path, required)
text file listing one junction file path per line
--annotation-gtf VAL (as path, required)
GTF annotation with gene, transcript, CDS, start_codon
and stop_codon features
--genome-fasta VAL (as path, required)
Genome assembly FASTA matching the GTF, with a .fai
index beside it
--output-prefix f'{samples:bnn}'
prefix for every output file; defaults to the manifest
name with all extensions stripped. Set it explicitly
when two workflows write into one --cwd, or when the
manifest name carries dots that are not extensions
(cohort.v1.sample_list.txt would otherwise collapse to
"cohort").
--min-clu-reads 30 (as int)
minimum reads in a cluster (default 30 reads)
--min-reads 5 (as int)
minimum reads for a junction to be considered for
clustering (default 5 reads)
--min-read-std 0.5 (as float)
minimum standard deviation of reads across samples
(default 0.5)
--min-clu-ratio 0.001 (as float)
minimum fraction of reads in a cluster that support a
junction (default 0.001)
--max-intron-len 500000 (as int)
maximum intron length to be analyzed (default 500000,
the GTEx value, not LeafCutter2's 100000)
--offset VAL (as int, required)
coordinate offset. Required, with no default: it depends
on the junction file format, and the wrong value
corrupts the classification silently. Pass 0 for BED6, 1
for regtools .junc.
leafcutter2_preprocessing_2:
Workflow Options:
--output-prefix f'{samples:bnn}'
prefix for every output file; defaults to the manifest
name with all extensions stripped. Set it explicitly
when two workflows write into one --cwd, or when the
manifest name carries dots that are not extensions
(cohort.v1.sample_list.txt would otherwise collapse to
"cohort").
star2junc:
differential_splicing_1:
Workflow Options:
--counts VAL (as path, required)
LeafCutter1-format intron counts from leafcutter2 or
leafcutter2_cluster
(leafcutter1_files/<prefix>_perind_numers.counts.gz)
--groups VAL (as path, required)
no header: sample, group (exactly two), then any
covariates
--output-prefix f'{groups:bn}'
prefix for every output file; defaults to the groups
file name without its extension
differential_splicing_2:
Workflow Options:
--groups VAL (as path, required)
no header: sample, group (exactly two), then any
covariates
--min-samples-per-intron 5 (as int)
ignore introns with reads in fewer samples than this
(default 5)
--min-samples-per-group 3 (as int)
samples per group that need min_coverage reads in a
cluster for it to be tested (default 3)
--min-coverage 20 (as int)
reads a cluster needs in each of those samples (default
20)
--timeout 30 (as int)
seconds allowed for one cluster's model fit (default 30)
differential_splicing_3:
Workflow Options:
--groups VAL (as path, required)
no header: sample, group (exactly two), then any
covariates
--output-prefix f'{groups:bn}'
prefix for every output file; defaults to the groups
file name without its extensionWorkflow implementation¶
[global]
parameter: modular_script_dir = path('code/script') # override with --modular-script-dir
# The output directory for generated files.
parameter: cwd = path("output")
# Sample meta data list
parameter: samples = path
# Raw data directory, default to the same directory as sample list
parameter: data_dir = path(f"{samples:d}")
# For cluster jobs, number commands to run per job
parameter: job_size = 1
# Wall clock time expected
parameter: walltime = "5h"
# Memory expected
parameter: mem = "16G"
# Number of threads
parameter: numThreads = 8
# Software container option
parameter: container = ""
# Command that starts the container's environment; by default "micromamba run -n <name>", with the
# name taken from the image (leafcutter_apptainer:latest or leafcutter.sif -> leafcutter)
import re
parameter: entrypoint = ('micromamba run -a "" -n' + ' ' + re.sub(r'(_apptainer:latest|_docker:latest|\.sif)$', '', container.split('/')[-1])) if container else ""
from sos.utils import expand_size
cwd = path(f'{cwd:a}')
# Build the input file lists from the sample manifest (basic SoS input plumbing; no pandas so
# it runs in the base env, no def/handles left in globals so the lists pickle to task workers).
# regtools strandness codes: rf->RF, fr->FR, strand_missing->XS. Blank/"NA" drops that sample.
_lines = open(samples).read().splitlines()
_hdr = _lines[0].split('\t')
_rows = [dict(zip(_hdr, _ln.split('\t'))) for _ln in _lines[1:] if _ln.strip()]
_sm = {'rf': 'RF', 'fr': 'FR', 'strand_missing': 'XS'}
_blank = lambda v: (v or 'NA').strip() in ('', 'NA')
# A manifest may give either the long form (rf, fr, strand_missing) or the regtools code it maps
# to (RF, FR, XS). Anything else is rejected here rather than passed to regtools, which would
# take it as a literal and silently produce wrongly stranded junctions.
_ok = set(_sm) | set(_sm.values())
_bad = sorted({(_r.get('strand') or '').strip() for _r in _rows} - _ok)
if _bad:
raise ValueError(f"unknown strand value(s) {_bad} in {samples}; expected one of {sorted(_ok)}")
# BAM rows and SJ rows are filtered independently, and every per-sample list is derived from
# its own filtered row set, so dropping a row with a blank or NA path cannot shift the
# strandness of the row after it.
_bam_rows = [_r for _r in _rows if not _blank(_r.get('coord_bam_list'))]
_sj_rows = [_r for _r in _rows if not _blank(_r.get('SJ_list'))]
sample_id = [(_r.get('sample_id') or 'NA').strip() for _r in _bam_rows]
strandness = [_sm.get(_s, _s) for _s in [(_r.get('strand') or '').strip() for _r in _bam_rows]]
bam_data = [f'{data_dir}/{_r["coord_bam_list"].strip()}' for _r in _bam_rows]
sj_data = [f'{data_dir}/{_r["SJ_list"].strip()}' for _r in _sj_rows]
# Junction files are named after the BAM basename, so a collision would overwrite a sample.
_bn = [_b.rsplit('/', 1)[-1] for _b in bam_data]
if len(set(_bn)) != len(_bn):
raise ValueError(f"duplicate BAM basenames in {samples}: junction outputs would collide")
del _lines, _hdr, _rows, _sm, _blank, _ok, _bad, _bam_rows, _sj_rows, _bnJunction extraction¶
Documentation: LeafCutter2; the regtools parameter choices are discussed here. This step is identical to splicing_calling’s first step, so junctions extracted by either module are interchangeable. leafcutter2_1 extracts junctions from each BAM, leafcutter2_preprocessing_2 writes the junction list instead of clustering.
[leafcutter2_1, leafcutter2_preprocessing_1]
# anchor length (default 8)
parameter: anchor_len = 8
# minimum intron length to be analyzed (default 50)
parameter: min_intron_len = 50
# maximum intron length to be analyzed (default 500000)
parameter: max_intron_len = 500000
# keep only reads with at least this mapping quality before extraction (default 0, off;
# 255 keeps uniquely mapped reads for STAR alignments)
parameter: min_mapq = 0
input: bam_data, group_by = 1, group_with = "strandness"
output: f'{cwd}/{_input:bn}.junc'
task: trunk_workers = 1, trunk_size = job_size, walltime = walltime, mem = mem, cores = numThreads
bash: expand= "${ }", stderr = f'{_output:n}.stderr', stdout = f'{_output:n}.stdout', container=container, entrypoint=entrypoint
bash ${modular_script_dir}/molecular_phenotypes/calling/regtools_junctions.sh \
--bam ${_input} \
--output ${_output} \
--min-anchor ${anchor_len} \
--min-intron ${min_intron_len} \
--max-intron ${max_intron_len} \
--min-mapq ${min_mapq} \
--strandness ${_strandness}Clustering, classification and quantification¶
leafcutter2_2 clusters the extracted junctions and classifies each one as productive, unproductive, ambiguous or intergenic. --keepleafcutter1 is always passed so that LeafCutter1-format tables are written alongside, which keeps the original leafcutter_ds.R usable on these clusters. Both clustering steps call leafcutter2_cluster.sh, which checks the junction files and annotation before running leafcutter2 and stops if no cluster survives the read filters.
[leafcutter2_2]
# GTF annotation with gene, transcript, CDS, start_codon and stop_codon features
parameter: annotation_gtf = path
# Genome assembly FASTA matching the GTF, with a .fai index beside it
parameter: genome_fasta = path
# prefix for every output file; defaults to the manifest name with all extensions stripped.
# Set it explicitly when two workflows write into one --cwd, or when the manifest name carries
# dots that are not extensions (cohort.v1.sample_list.txt would otherwise collapse to "cohort").
parameter: output_prefix = f'{samples:bnn}'
# minimum reads in a cluster (default 30 reads)
parameter: min_clu_reads = 30
# minimum reads for a junction to be considered for clustering (default 5 reads)
parameter: min_reads = 5
# minimum standard deviation of reads across samples (default 0.5)
parameter: min_read_std = 0.5
# minimum fraction of reads in a cluster that support a junction (default 0.001)
parameter: min_clu_ratio = 0.001
# maximum intron length to be analyzed (default 500000, the GTEx value, not LeafCutter2's 100000)
parameter: max_intron_len = 500000
# coordinate offset; 1 matches leafcutter_cluster_regtools.R intron ends for regtools .junc input
parameter: offset = 1
input: group_by = 'all'
output: counts = f'{cwd}/{output_prefix}.junction_counts.gz',
ratios = f'{cwd}/{output_prefix}.cluster_ratios.gz',
lc1_counts = f'{cwd}/leafcutter1_files/{output_prefix}_perind.counts.gz',
lc1_numers = f'{cwd}/leafcutter1_files/{output_prefix}_perind_numers.counts.gz',
classifications = f'{cwd}/clustering/{output_prefix}_junction_classifications.txt'
depends: annotation_gtf, genome_fasta, path(f'{genome_fasta}.fai')
task: trunk_workers = 1, trunk_size = job_size, walltime = walltime, mem = mem, cores = numThreads
bash: expand= "${ }", stderr = f'{cwd}/{output_prefix}.stderr', stdout = f'{cwd}/{output_prefix}.stdout', container=container, entrypoint=entrypoint
set -e
_juncfile=${cwd}/${output_prefix}.intron_usage_perind.junc
rm -f $_juncfile
for i in ${_input:r}; do
echo $i >> $_juncfile ; done
bash ${modular_script_dir}/molecular_phenotypes/calling/leafcutter2_cluster.sh \
--juncfiles $_juncfile \
--outprefix ${output_prefix} \
--rundir ${cwd} \
--annot ${annotation_gtf} \
--genome ${genome_fasta} \
--maxintronlen ${max_intron_len} \
--minclureads ${min_clu_reads} \
--minreads ${min_reads} \
--minreadstd ${min_read_std} \
--mincluratio ${min_clu_ratio} \
--offset ${offset}Clustering from an existing junction list¶
leafcutter2_cluster is an alternative entry point to the step above: it takes a junction file list directly rather than extracting junctions from BAMs. It writes the same outputs, so the two do not chain.
[leafcutter2_cluster]
# text file listing one junction file path per line
parameter: juncfiles = path
# GTF annotation with gene, transcript, CDS, start_codon and stop_codon features
parameter: annotation_gtf = path
# Genome assembly FASTA matching the GTF, with a .fai index beside it
parameter: genome_fasta = path
# prefix for every output file; defaults to the manifest name with all extensions stripped.
# Set it explicitly when two workflows write into one --cwd, or when the manifest name carries
# dots that are not extensions (cohort.v1.sample_list.txt would otherwise collapse to "cohort").
parameter: output_prefix = f'{samples:bnn}'
# minimum reads in a cluster (default 30 reads)
parameter: min_clu_reads = 30
# minimum reads for a junction to be considered for clustering (default 5 reads)
parameter: min_reads = 5
# minimum standard deviation of reads across samples (default 0.5)
parameter: min_read_std = 0.5
# minimum fraction of reads in a cluster that support a junction (default 0.001)
parameter: min_clu_ratio = 0.001
# maximum intron length to be analyzed (default 500000, the GTEx value, not LeafCutter2's 100000)
parameter: max_intron_len = 500000
# coordinate offset. Required, with no default: it depends on the junction file format, and the
# wrong value corrupts the classification silently. Pass 0 for BED6, 1 for regtools .junc.
parameter: offset = int
# Junction files are declared as dependencies so a missing or changed one invalidates the run.
_junc_list = [_l.strip() for _l in open(juncfiles) if _l.strip()]
input: juncfiles
output: counts = f'{cwd}/{output_prefix}.junction_counts.gz',
ratios = f'{cwd}/{output_prefix}.cluster_ratios.gz',
lc1_counts = f'{cwd}/leafcutter1_files/{output_prefix}_perind.counts.gz',
lc1_numers = f'{cwd}/leafcutter1_files/{output_prefix}_perind_numers.counts.gz',
classifications = f'{cwd}/clustering/{output_prefix}_junction_classifications.txt'
depends: annotation_gtf, genome_fasta, path(f'{genome_fasta}.fai'), _junc_list
task: trunk_workers = 1, trunk_size = job_size, walltime = walltime, mem = mem, cores = numThreads
bash: expand= "${ }", stderr = f'{cwd}/{output_prefix}.stderr', stdout = f'{cwd}/{output_prefix}.stdout', container=container, entrypoint=entrypoint
set -e
bash ${modular_script_dir}/molecular_phenotypes/calling/leafcutter2_cluster.sh \
--juncfiles ${_input} \
--outprefix ${output_prefix} \
--rundir ${cwd} \
--annot ${annotation_gtf} \
--genome ${genome_fasta} \
--maxintronlen ${max_intron_len} \
--minclureads ${min_clu_reads} \
--minreads ${min_reads} \
--minreadstd ${min_read_std} \
--mincluratio ${min_clu_ratio} \
--offset ${offset}Junction list only¶
leafcutter2_preprocessing_2 writes the list of per-sample .junc files and stops, for cohorts whose clustering is done elsewhere.
[leafcutter2_preprocessing_2]
# prefix for every output file; defaults to the manifest name with all extensions stripped.
# Set it explicitly when two workflows write into one --cwd, or when the manifest name carries
# dots that are not extensions (cohort.v1.sample_list.txt would otherwise collapse to "cohort").
parameter: output_prefix = f'{samples:bnn}'
input: group_by = 'all'
output: f'{cwd}/{output_prefix}.intron_usage_perind.junc'
task: trunk_workers = 1, trunk_size = job_size, walltime = walltime, mem = mem, cores = numThreads
bash: expand= "${ }", stderr = f'{_output:n}.stderr', stdout = f'{_output:n}.stdout', container=container, entrypoint=entrypoint
rm -f ${_output:r}
for i in ${_input:r}; do
echo $i >> ${_output:r} ; doneJunction conversion from STAR output¶
star2junc converts each SJ.out.tab named in the manifest into the junction BED format LeafCutter2 reads. Use it when the BAMs are unavailable; note that SJ.out.tab records uniquely mapped junction reads only, so counts will not match those regtools extracts from the same library.
[star2junc]
input: sj_data, group_by = 1
output: f'{cwd}/{_input:bn}.junc.gz'
task: trunk_workers = 1, trunk_size = job_size, walltime = walltime, mem = mem, cores = numThreads
bash: expand= "${ }", stderr = f'{_output:nn}.stderr', stdout = f'{_output:nn}.stdout', container=container, entrypoint=entrypoint
leafcutter2-star2junc ${_input} ${_output}Differential splicing¶
differential_splicing_1 checks the groups file against the count table and splits the table into 24 parts by chromosome; differential_splicing_2 runs leafcutter_ds.R on each part as its own job; differential_splicing_3 joins the parts and recomputes the false discovery rate over every tested cluster. leafcutter_ds.R is the script from LeafCutter, shipped beside the module’s other scripts.
[differential_splicing_1]
# LeafCutter1-format intron counts from leafcutter2 or leafcutter2_cluster
# (leafcutter1_files/<prefix>_perind_numers.counts.gz)
parameter: counts = path
# no header: sample, group (exactly two), then any covariates
parameter: groups = path
# prefix for every output file; defaults to the groups file name without its extension
parameter: output_prefix = f'{groups:bn}'
input: counts
output: [f'{cwd}/{output_prefix}_parts/{output_prefix}.part_{x}.counts.gz' for x in [str(i) for i in range(1, 23)] + ['X', 'other']]
bash: expand= "${ }", stderr = f'{cwd}/{output_prefix}.split.stderr', stdout = f'{cwd}/{output_prefix}.split.stdout'
Rscript ${modular_script_dir}/molecular_phenotypes/calling/leafcutter_ds_split.R \
--counts ${_input} \
--groups ${groups} \
--output-prefix ${cwd}/${output_prefix}_parts/${output_prefix}
[differential_splicing_2]
# no header: sample, group (exactly two), then any covariates
parameter: groups = path
# ignore introns with reads in fewer samples than this (default 5)
parameter: min_samples_per_intron = 5
# samples per group that need min_coverage reads in a cluster for it to be tested (default 3)
parameter: min_samples_per_group = 3
# reads a cluster needs in each of those samples (default 20)
parameter: min_coverage = 20
# seconds allowed for one cluster's model fit (default 30)
parameter: timeout = 30
input: group_by = 1
output: f'{_input:nn}_cluster_significance.txt', f'{_input:nn}_effect_sizes.txt'
task: trunk_workers = 1, trunk_size = job_size, walltime = walltime, mem = mem, cores = numThreads
bash: expand= "${ }", stderr = f'{_input:nn}.stderr', stdout = f'{_input:nn}.stdout', container=container, entrypoint=entrypoint
set -e
if [ "$(zcat ${_input} | head -n2 | wc -l)" -lt 2 ]; then
# no clusters on this chromosome: empty results, which the join skips
: > ${_output[0]}
: > ${_output[1]}
else
Rscript ${modular_script_dir}/molecular_phenotypes/calling/leafcutter_ds.R \
--num_threads ${numThreads} \
--min_samples_per_intron ${min_samples_per_intron} \
--min_samples_per_group ${min_samples_per_group} \
--min_coverage ${min_coverage} \
--timeout ${timeout} \
--output_prefix ${_input:nn} \
${_input} ${groups}
fi
[differential_splicing_3]
# no header: sample, group (exactly two), then any covariates
parameter: groups = path
# prefix for every output file; defaults to the groups file name without its extension
parameter: output_prefix = f'{groups:bn}'
input: group_by = 'all'
output: f'{cwd}/{output_prefix}_cluster_significance.txt', f'{cwd}/{output_prefix}_effect_sizes.txt'
bash: expand= "${ }", stderr = f'{cwd}/{output_prefix}.merge.stderr', stdout = f'{cwd}/{output_prefix}.merge.stdout'
Rscript ${modular_script_dir}/molecular_phenotypes/calling/leafcutter_ds_merge.R \
--output-prefix ${cwd}/${output_prefix} \
--files ${_input}
Troubleshooting¶
| Symptom | Cause | Fix |
|---|---|---|
ERROR: chromosome naming differs | The junction files and the GTF use different chromosome naming (22 against chr22). The preflight check stops the run before clustering. | Supply a GTF and FASTA whose naming matches the junction files. |
Could not find <chrom> (<strand>) in annotations, followed by ValueError: Cannot set a DataFrame with multiple columns to the single column SJClass | The naming styles agree, so the preflight passes, but the GTF still does not cover some chromosome present in the junction files. Clustering completes and the crash comes later, in classification. | Supply a GTF and FASTA covering every chromosome in the junction files. |
Productive fraction collapses; UP and NE dominate junction_counts.gz | --offset does not match the junction file format. | 1 for regtools .junc, 0 for BED6. See Input. |
ERROR: junction files mix formats | The --juncfiles list names both BED6 and BED12 files, which need different offsets. | Convert them to one format, or cluster each set separately. |
the following arguments are required: --offset | leafcutter2_cluster has no offset default by design. | Pass --offset 0 for BED6 or --offset 1 for regtools .junc. |
ERROR: no clusters survived filtering, or ValueError: Cannot set a DataFrame with multiple columns to the single column SJClass with an empty clustering/<prefix>_clusters | No cluster met --min-clu-reads, so there was nothing to classify. Clustering reports success and the failure comes later. | Lower --min-clu-reads, or check the junction files actually carry reads in the region. |
exitcode=127 | leafcutter2 is not on PATH. | Activate the pixi environment holding it before running, or supply --container. |
AttributeError: module 'leafcutter2.Transcript_tools' has no attribute 'ClassifySpliceJunction', after clustering reports success | A pre-2.0 LeafCutter2 is installed. Clustering works, classification does not. | Install LeafCutter2 2.0 or newer. See Input. |
leafcutter2-star2junc: command not found | Same cause: that command only exists in 2.x. | Install LeafCutter2 2.0 or newer. |
| Introns above 100 kb missing | --max-intron-len left at LeafCutter2’s default. | This module defaults to 500000; check it has not been overridden. |
Classification runs but every junction is IN | The GTF lacks CDS, start_codon or stop_codon features, or uses a tag this module does not auto-detect. | Use a GTF carrying those features; set --transcript_type, --gene_name or --transcript_name on the tool if the tags differ. |
there is no package called 'leafcutter' in a differential_splicing_2 log | leafcutter_ds.R needs the R leafcutter package, which the pixi environment lacks. | Pass --container with an image that has it. |
ERROR: no sample in <groups> matches a column of the count table | The groups file uses manifest sample_id values, but the count table is named after the junction files. | Use the column names of --counts in column 1. |
ERROR: <groups> gives 3 groups | leafcutter_ds.R compares exactly two groups. | Keep two groups in column 2, or drop the other samples from the file. |
One differential_splicing_2 job stops at the wall-clock limit | The largest chromosomes take longest. | Raise --walltime; the finished parts are reused on rerun. |
- Li, Y. I., Knowles, D. A., Humphrey, J., Barbeira, A. N., Dickinson, S. P., Im, H. K., & Pritchard, J. K. (2017). Annotation-free quantification of RNA splicing using LeafCutter. Nature Genetics, 50(1), 151–158. 10.1038/s41588-017-0004-9
- Najar, C. F. B. A., Feng, R., Dai, C., Fair, B., Hauck, Q., Li, J., Cao, X., Dey, K. K., De Jager, P., Bennett, D., Liu, X., Wang, G., & Li, Y. I. (2025). Genetic and functional analysis of unproductive splicing using LeafCutter2. 10.1101/2025.04.06.646893