Splice Girl
Topological analysis of RNA splicing in endometriosis
Status, November 24, 2026
Research software, in progress. The Rust tool is published on crates.io (version 0.2.2) and its 127 automated tests pass. The eight-sample endometriosis analysis is specified in advance. Three of the eight samples have been aligned on the university cluster, so there is no case/control result yet.
- Team
- Splice Girls: Summer Malik, Vania Zeledon, Sydney Holmes, Wynn Oo
- My role
- Lead programmer and mathematical modeling
- Context
- BINF 2111 team research project, UNC Charlotte, fall 2026
- Install
cargo install splice-girl --locked- Code
- GitHub repository · crates.io · docs.rs
- License
- CC BY 4.0 (versions 0.2.0 and later; 0.1.0 was MIT)
On this page
- Why splicing
- Research question
- What I did
- The mathematics
- Study design
- From reads to numbers
- Why the Rust stage is fast
- Validation so far
- Try it yourself
- Limitations
- Technical stack
- Status and citation
- Supporting materials
Why splicing
A gene is copied into an early RNA molecule made of exons and introns. During splicing, the introns are usually removed and selected exons are joined. Different joining choices (alternative splicing) can produce different finished RNAs from the same gene.
RNA sequencing gives short reads, and some of them span the joint between two exons. Those joints are splice junctions. Standard summaries count how many reads support each junction. Splice Girl asks a structural question instead: how do all of a gene's observed junctions fit together?
The first application is endometriosis. Candidate genes come from two independent kinds of evidence: genetic risk (the GWAS Catalog and Koller et al. 2026) and measured responses to dioxin-like chemicals (the Comparative Toxicogenomics Database). Together that is 661 candidate genes, each labeled risk-only, environment-only or both.
Research question
Do endometriosis samples organize their RNA splice connections differently from control samples?
The measurement is a cycle fraction: how much of a gene's normalized junction signal is left over after the best node-based explanation is removed. The study compares that number between four endometriosis and four control samples of the same tissue.
What I did
I was the team's lead programmer and worked on the mathematical modeling. The repository's dated contribution logs record each person's work. Mine includes:
- Wrote the first version of the Rust tool, the synthetic mathematical foundation the rest was built on.
- Wrote the data contract and the parser tests that reject bad input, the plain-language Hodge explanation, and the math specification's equations and checks.
- Built the read-preprocessing workflow (Cleaver/fastp, HISAT2, junction assignment) and validated the public dataset manifests.
- Added the three-panel graph figure, the
validateinput audit, the all-gene comparison, installation checks, continuous integration and the candidate-sized benchmark. - Prepared and published the first crates.io releases (0.1.0, 0.2.0 and 0.2.1). For 0.2.0, I moved the project to CC BY 4.0, with authorization from all four contributors.
- Ran the cluster work: downloading, aligning and counting three of the eight samples, then running the Rust analysis on them (Slurm jobs recorded in the logs).
Teammates: Vania Zeledon led computational development and the mathematical theory, including the statistics specification, the exact permutation test, the junction-usage baseline, the cohort analysis configuration and the interpretation plan. Sydney Holmes led the biological research. Wynn Oo worked on the RNA-seq data and splice-junction research.
The mathematics
A gene as a graph
For one gene in one sample, each exon locus is a node and each observed splice junction is a directed edge, pointing the way the transcript reads. Its weight is the number of reads supporting it. An exon-skipping event adds a second route between the same two exons:
E1 ──→ E2 ──→ E3 one route
E1 ──→ E2 ──→ E3 exon skipping: a second route,
│ ↑ straight from E1 to E3
└─────────────┘
The edge signal is normalized so samples with different sequencing depth can be compared:
we = ce / Σj cj
The incidence matrix B1 has one row per node and one column per edge. Each edge's column is −1 at its source, +1 at its target, and 0 elsewhere. Nodes and edges are sorted by identifier, so the answer does not depend on the input row order.
Hodge decomposition
Splice Girl finds the node values (a potential φ) that best explain the edge signal F, then splits F into what they explain and what is left:
φ* = argminφ ‖F − B1Tφ‖22 (normal equations: Lφ* = B1F, L = B1B1T)
Fgrad = B1Tφ* Fcycle = F − Fgrad C = ‖Fcycle‖2 / ‖F‖2
L is the graph Laplacian. It is singular, because adding a constant to φ on a connected piece of the graph changes nothing. So the code fixes the first node of each connected component at zero and solves for the rest.
Gradient, curl and harmonic. In full combinatorial Hodge theory, a flow on edges splits three ways: a gradient part (in the image of B1T), a curl part (flow around filled-in faces, the image of B2) and a harmonic part (in the kernel of both). A splice graph has nodes and edges but no filled faces, so B2 = 0. The curl part is empty, and everything that is not gradient is harmonic. That harmonic part is the cycle-space component Splice Girl reports. It has dimension |E| − |V| + (number of connected components), the graph's cycle rank. Adding faces, which would separate curl from harmonic, is deliberately left out of the current specification.
Every answer checks itself
No result is reported unless three identities hold, at a relative tolerance built on 10−9:
F ≈ Fgrad + Fcycle B1Fcycle ≈ 0 FgradTFcycle ≈ 0
These say the split is complete, the leftover really is cycle-space flow, and the two parts are orthogonal, so they do not double-count signal.
A worked example you can check
The packaged example's TRIANGLE gene in sample S0 has junction counts A→B = 30, A→C = 5 and B→C = 30. So F = (6, 1, 6)/13 on (A→B, A→C, B→C). The cycle space is spanned by z = (1, −1, 1), going A→B→C and back along C→A. Projecting onto it gives Fcycle = (11/39)(1, −1, 1) ≈ (0.2821, −0.2821, 0.2821). The cycle fraction is C = 121/219 ≈ 0.5525. These are exactly the values the program prints in Figure 3.
Study design
- Data: public paired-end RNA-seq of proliferative endometrium, GEO GSE315857: four control (SRR36710387–390) and four endometriosis (SRR36710383–386) samples, 49.5 to 89.7 million read pairs each.
- Reads to junctions: clean reads, align to the GENCODE v50 GRCh38.p14 primary assembly with HISAT2, and check strand orientation. A sample is held back if fewer than 95% of read 1s agree. Junctions are counted from uniquely mapped reads with at least 8 bases on each side and mapped to annotated exon pairs. Ambiguous junctions are excluded, not guessed.
- One shared graph per gene: chosen without looking at case/control labels. An edge is kept if it has at least 5 reads in at least 4 of the 8 samples. A gene is kept if its graph has cycle rank at least 1 and every sample has at least 50 reads on those edges.
- Comparison: for each gene, the effect is mean C(cases) − mean C(controls). The summary statistic is the mean absolute effect across genes. An exact permutation test uses all 70 ways to label 4 of the 8 samples as cases, with Benjamini–Hochberg correction across genes.
- Baseline: a simpler measure (junction-usage entropy) goes through the same test. If the Hodge measurement does no better, that gets reported.
- Settings saved in advance: the thresholds and the analysis configuration are frozen, and an interpretation plan is written before the full run.
From reads to numbers
The work splits into two very different stages. Upstream, established bioinformatics tools turn raw sequencing reads into junction counts. Downstream, Splice Girl does the mathematics. The numbers below are one endometriosis sample, SRR36710386, run on UNC Charlotte's HPC cluster on November 19, 2026.
1. Upstream preprocessing
- Download from SRA and convert to FASTQ: about 36 GB of paired reads (conversion took 2 min 39 s)
- Clean, then align 54,679,380 read pairs with HISAT2 (97.54% overall alignment)
- Assign junction-spanning reads to annotated exon pairs: 28,844,691 junction observations kept, 1,274,883 ambiguous ones excluded
- Write the junction table: 210,520 rows
1 h 41 min 47 s
alignment plus junction extraction (Slurm job 27844959)
2. Splice Girl (Rust)
- Read and validate the 210,520-row table
- Build one graph per gene
- Hodge decomposition, with the three checks on every graph
- Write
sample_metrics.tsv(3.8 MB) andjunction_components.tsv(34 MB)
5 s
Hodge analysis stage (Slurm job 27866517)
Only the Hodge stage took five seconds. Getting from raw reads to the junction table took about an hour and 42 minutes, not counting the download and FASTQ conversion. The 28.8 million figure counts junction observations at the assignment stage. The Rust tool reads the 210,520 aggregated rows built from them. Building the shared reference map behind that table took 5,087,789 annotated exons across 646,577 transcripts and produced 536,254 graph nodes.
Why the Rust stage is fast
This is about the shape of the problem, not a race against other tools:
- Reads are counted once, upstream. The mathematics never touches individual reads. 28,844,691 observations become one row per junction, per gene and sample: 210,520 rows.
- Each gene is its own small problem. The linear system for one gene has one unknown per exon node (minus one per connected piece). Its size depends on the gene's exon structure, not on sequencing depth. In the 243-gene benchmark on real data, the largest graph had 66 nodes.
- Genes are independent. The run is one pass over the table, solving many small systems. There is no matrix covering all genes at once.
- The solver is simple on purpose: Gaussian elimination with partial pivoting on each gene's reduced Laplacian, with no external linear-algebra dependency. The math specification flags it for review before very large or badly conditioned graphs.
The five seconds is one recorded run of one sample, not a general runtime guarantee. A second, smaller measurement on real data: analysis plus export for 243 genes (1,388 junction rows) took a median of 11.2 ms over five runs, with about 4 MiB peak memory.
Validation so far
The software
- 127 Rust tests pass on the current code (commit
f3d7596, rerun for this page on November 24, 2026). The repository also records 64 preprocessing tests and 32 helper-script tests passing in Python. - Synthetic graphs with known answers: a chain and a branching tree give 0, an equal-weight directed cycle gives 1, the exon-skipping triangle gives exactly 1/9, and a fixed noisy version gives 5618/45027 ≈ 0.12477.
- Bad input fails with a clear message instead of being skipped silently: wrong headers, negative or non-finite counts, self-loops, duplicate edges, zero total support and mismatched sample manifests. Existing result folders are never overwritten.
Real data, checked independently
On November 18, the packaged tool ran on the first 1,000,000 cleaned read pairs (about 2%) of control sample SRR36710387. Two independent checks followed:
- 243 of the 661 candidate genes were observed, with 1,388 junction edges. A separate parser re-read the alignment file, and all 19,983 read–junction observations matched the exported counts exactly.
- For every one of the 243 genes, the incidence matrix was rebuilt in NumPy and the least-squares problem was solved with SVD. All 243 matched the Rust results. The largest difference was 4.96 × 10−11, under the declared 10−8 tolerance.
That is a check of counting and numerics on one control. It is not a biological finding.
Try it yourself
This needs Rust 1.85 or newer. The example uses eight invented samples and four invented genes, and downloads no patient data. These exact commands were run with the published 0.2.2 crate on November 24, 2026:
cargo install splice-girl --locked
splice-girl example --output splice-girl-example
cd splice-girl-example
# read-only preflight (prints PASS, 8 samples, 1 eligible gene, 7 scenarios)
splice-girl check --config analysis.json
# the full run: writes configured-results/
splice-girl run --config analysis.json
open configured-results/report.html
The example's own README.md walks through prepare-shared, stats and sensitivity step by step. Every saved run includes a run_manifest.json with the command, version, settings and input checksums.
configured-results/primary_report/graphs/graph-000002.svg). The same nodes, edges and line-width scale appear in every panel. Dashed edges run against their stored direction. Synthetic data.
Limitations
- No case/control result yet. Only three of the eight samples are aligned. Any gene-level difference seen so far comes from single samples and is not evidence.
- Small study. Four samples per group allow only 70 relabelings, so the smallest possible two-sided permutation p-value is coarse. Tissue matching, batch effects and replicate consistency still have to be reviewed.
- Cycle space is not circular RNA. Ordinary exon skipping creates cycle-space signal (Figure 1). The preprocessing does not detect back-splicing, so a missing back-splice edge proves nothing.
- Annotation-bound. Junctions are mapped to annotated exons, so the method cannot discover unannotated splicing. Ambiguous assignments are excluded. In the early pilot that removed most observations (Figure 2), which is why the node rule changed.
- Exploratory look recorded. The threshold values were written on November 18. An exploratory one-case-versus-one-control table was viewed on November 20, and the values were approved unchanged on November 22. The decisions log records this openly, and any later change must be reported as made after case/control data were seen.
- Graph-level only. No filled faces, so curl and harmonic parts are not separated. The dense solver suits per-gene graphs and needs review before very large ones.
- Splice Girl is research software, not a clinical or diagnostic tool.
Technical stack
- Rust (2024 edition, minimum Rust 1.85): parsing, graphs, Hodge decomposition, exact permutation tests, Benjamini–Hochberg correction, baselines, SVG figures and offline HTML reports. Dependencies are only
serdeandserde_json. - Python: read preprocessing adapters, gene-set construction and interpretation scripts.
- Bioinformatics tools: SRA-Tools, Cleaver/fastp, HISAT2, samtools, GENCODE v50 annotation, FastQC/MultiQC.
- Infrastructure: Slurm jobs on UNC Charlotte's HPC cluster, GitHub Actions (formatting, strict Clippy, tests), and JSON run manifests with SHA-256 checksums.
Status and citation
Splice Girl is research software, not a peer-reviewed publication. The repository's CITATION.cff asks anyone using it to cite the software and record the version or commit; splice-girl cite prints the same details.
@software{splice_girl_2026,
author = {Holmes, Sydney and Zeledon, Vania and Malik, Summer and Oo, Wynn},
title = {Splice Girl: graph and Hodge analysis of RNA splice-junction data},
version = {0.2.2},
year = {2026},
license = {CC-BY-4.0},
url = {https://github.com/simransummermalik/TopologicalAnalysisofRNASplicinginEndometriosis}
}
Supporting materials
- Source code and full README (GitHub)
- splice-girl on crates.io and API documentation on docs.rs
- Research proposal (24-page PDF, September 2, 2026)
- Math specification: equations, conventions and the hand-derived test values
- Software validation record: installs, tests and benchmarks
- HPC run log for SRR36710386: the Slurm jobs and counts above
- Real-data validation: the BAM recount and SVD check, with exact reproduction steps
- Beginner walkthrough: every demo command with expected answers
- Example input files: junctions, manifest and gene lists