Skip to main content
MultiGEDI

PyPI Python versions License: MIT Tests Docs

Single-cell alternative-splicing analysis for the scverse ecosystem.

scsplice is the Python port of the R package splikit. It analyses splice-junction count data in single-cell RNA-seq, treating each event as a pair of inclusion (M1) and exclusion (M2) counts derived from local junction variants (LJVs). The package is AnnData-native — junctions live on the var axis, M1 and M2 sit in layers, and downstream analysis composes naturally with scanpy.

Status

v2.1.0 keeps a deliberately focused API:

  • scs.io.read_starsolo — ingest STARsolo Solo.out/SJ/ for one or more samples.
  • scs.tl.make_m2 — build the exclusion matrix from M1 + LJV grouping.
  • scs.pp.highly_variable_events — per-library binomial-deviance HVE selection.
  • scs.io.read_starsolo_gene — read raw or filtered gene counts, including STARsolo EM matrices.
  • scs.tl.pseudo_correlation — beta-binomial Cox-Snell / Nagelkerke pseudo-R² with event-wise permutation inference.
  • scs.tl.get_pseudo_correlation_result — materialize export-ready statistics and long null tables.
  • scs.pp.highly_variable_genes — Seurat/R-splikit variance-stabilizing-transformation (VST) HVG selection (pip install "scsplice[hvg]").

Plotting and silhouette utilities from the R package, and R splikit's other HVG method (sum_deviance), are intentionally omitted — scanpy, pyranges, and sklearn already cover that ground.

Installation

scsplice ships a C++ extension built via scikit-build-core + pybind11. Eigen3 (header-only) is required at install time; OpenMP is optional but strongly recommended for multi-threaded kernels.

From PyPI

pip install scsplice

From source

git clone https://github.com/Arshammik/scsplice
cd scsplice
pip install .

System dependencies before running pip install:

Ubuntu / Debian

sudo apt install libeigen3-dev libomp-dev

macOS (Homebrew)

brew install eigen libomp
# tell CMake where Apple Clang's OpenMP lives
export OpenMP_ROOT="$(brew --prefix libomp)"
export LDFLAGS="-L${OpenMP_ROOT}/lib"
export CPPFLAGS="-I${OpenMP_ROOT}/include"

HPC cluster (Compute Canada / Sharcnet pattern)

module load eigen/3.4.0
# any modern GCC with OpenMP (gcc/12+) on the system module path

Editable install (development)

pip install -e ".[dev]"

This installs the package, all test dependencies, the docs toolchain (mkdocs-material, mkdocstrings[python], mkdocs-jupyter), and ruff / pre-commit. C++ edits require re-running pip install -e .; pure-Python edits take effect immediately.

Quick start

import numpy as np
import scsplice as scs
import scanpy as sc

# (1) Ingest STARsolo splice-junction counts (M1) and LJV grouping
adata = scs.io.read_starsolo(
    sj_dirs=["sample1/Solo.out/SJ", "sample2/Solo.out/SJ"],
    sample_ids=["s1", "s2"],
)

# (2) Build exclusion matrix (M2) from inclusion counts + junction grouping
scs.tl.make_m2(adata, n_threads=8)

# (3) Identify highly variable events per library using binomial deviance
scs.pp.highly_variable_events(adata, min_row_sum=50, n_threads=8)

# (4) Compute pseudo-correlation with the 100-permutation default
# zdb must be events × cells and aligned to adata.var_names / adata.obs_names
zdb = np.random.default_rng(42).normal(size=(adata.n_vars, adata.n_obs))
scs.tl.pseudo_correlation(adata, zdb, seed=42, n_threads=8)
result = scs.tl.get_pseudo_correlation_result(adata)
result.statistics.to_csv("pseudo_correlation_statistics.csv", index=False)
result.null_distribution.to_csv("pseudo_correlation_null.csv", index=False)

# Optional: compose with scanpy on the splicing embedding
# (PCA / neighbors / leiden over logit(M1 / (M1 + M2)))

Gene-expression ingestion defaults to raw STARsolo counts, preferring UniqueAndMult-EM.mtx and falling back to matrix.mtx, then independently applies the internal filtered-barcode whitelist. Use matrix_source="filtered" to read the filtered matrix directly or matrix_source="auto" for the scsplice 2.0.0 source-selection behavior.

Numerical equivalence

scsplice reproduces R splikit results to a documented tolerance on a fixed reference dataset (M2 bit-exact; HVE deviance rtol=1e-10; pseudo-correlation rtol=1e-7; HVG standardize_variance rtol=1e-6). The M1/M2/HVE/pseudo-correlation cross-language regression suite and R reference fixtures live on the validation branch. The highly_variable_genes (VST) equivalence test lives on main (tests/test_highly_variable_genes_vs_r.py) and is skipped automatically until its fixture is regenerated via Rscript tests/r_export/export_hvg_reference.R — see that script's header and tests/load_hvg_r_ref.py. Its loess step uses scikit-misc's loess binding, which wraps the same netlib/Cleveland-Grosse Fortran/C code R's stats::loess() calls, so the equivalence is genuine rather than a from-scratch approximation.

Documentation

Full documentation is available at https://arshammik.github.io/scsplice/.

Topics include:

License

MIT.

Metadata

Release files for scsplice 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scsplice 2.1.0
File Size Uploaded
scsplice-2.1.0.tar.gz 1.2 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for scsplice 2.1.0
File
scsplice-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
scsplice-2.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
scsplice-2.1.0-cp312-cp312-macosx_10_15_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.15+ x86-64 Details
scsplice-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
scsplice-2.1.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
scsplice-2.1.0-cp311-cp311-macosx_10_15_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.15+ x86-64 Details
scsplice-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
scsplice-2.1.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
scsplice-2.1.0-cp310-cp310-macosx_10_15_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.15+ x86-64 Details

Total release size: 2.9 MB

Release files / scsplice-2.1.0.tar.gz

Download URL scsplice-2.1.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
af7caed1c59fbb4717fd3e4bdb52f222c61483b92ee2024e6734c7e85930d38a
BLAKE2b-256 checksum
How to use checksums
45c3f2cd23ab65133d15f74992729113b92d4a6965b7afa3debe3e862cb9eb73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL scsplice-2.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 278.5 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b9d2fa93ec8277906bfca950882692787009c925af20c5fa7950643059b04ff5
BLAKE2b-256 checksum
How to use checksums
4276fa5eca8271eaf9b5665ec00f329d0322f2408ff33d982cd6a774dd7a7d1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL scsplice-2.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 144.9 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
39fad31824f8b8991cdee00eb25a7ac5a0a1d0db2156cbbf092f9eac3a10bbb2
BLAKE2b-256 checksum
How to use checksums
550c3e8180a387eca7073cfc47ebaaea9c539dba525520a9b5ddb91db16e9821
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp312-cp312-macosx_10_15_x86_64.whl

Download URL scsplice-2.1.0-cp312-cp312-macosx_10_15_x86_64.whl
Size 151.9 kB
Tags CPython 3.12 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
7387a4a9c56e149aca776de795d1f9056cf5f8e10118944e01188811bde7ee5e
BLAKE2b-256 checksum
How to use checksums
ca19d771766962fb66e6b5e86c57b073e060459d1694fb09b283ed99332985bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL scsplice-2.1.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 276.2 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8290b892925d4fc193bfaa73fb30343c231e2e7fd4a73a6e71708c2908493b4d
BLAKE2b-256 checksum
How to use checksums
4dd2889da00d0c2f98fa8cdbef321250c9845f1389df7a59f14ba6f93a0c259b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL scsplice-2.1.0-cp311-cp311-macosx_11_0_arm64.whl
Size 144.0 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
65e1e34958859caf6680578023c18d4ab4595c3aca194d16bba2afd23c9bccb7
BLAKE2b-256 checksum
How to use checksums
a59b2e6f3b9cf1c6c96251d40ddbbc8701dde260c091a10b9d84a89c0dd45649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp311-cp311-macosx_10_15_x86_64.whl

Download URL scsplice-2.1.0-cp311-cp311-macosx_10_15_x86_64.whl
Size 150.4 kB
Tags CPython 3.11 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
f5c9d4594c02bc8946476c7496de8daa0bba1746aa1c2dfb6159b857ef806221
BLAKE2b-256 checksum
How to use checksums
5e22e5fbb571147b8d57d2d3cbd3fff8e09d60b60a055da2a1bc38db3c4977ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL scsplice-2.1.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 275.1 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
255c026302fd85b3bdc27a42b53068af652e02326f6ae0e90641a8a858d047e6
BLAKE2b-256 checksum
How to use checksums
0d8135d771f77830258783281b7d382d940de4e3214a7dcad5cb91c78ae7f3d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL scsplice-2.1.0-cp310-cp310-macosx_11_0_arm64.whl
Size 142.9 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
da9a073cde020af929eb87747dd4be40f63ebeccbcd447332f2dc90fe17f1d4b
BLAKE2b-256 checksum
How to use checksums
8f0f8e6066201658d5c23d80665f3ca05733edf91b31f6e0bcf605a73fe05121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / scsplice-2.1.0-cp310-cp310-macosx_10_15_x86_64.whl

Download URL scsplice-2.1.0-cp310-cp310-macosx_10_15_x86_64.whl
Size 149.2 kB
Tags CPython 3.10 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
3140812ec3ba5f6e3026b8e76472595aa8ebfcfff163af3bb0e6bb6e755c4b09
BLAKE2b-256 checksum
How to use checksums
524321eff27914f09c001e882985f3853889e410050fbcc0165081bc8856e656
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.0 This release

10 release files

2.0.1

10 release files

2.0.0

10 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page