Skip to main content

Single-cell alternative-splicing analysis on AnnData (Python port of R splikit)

Project description

scsplice

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

v1.0. v1.0 scope is intentionally narrow:

  • 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.tl.pseudo_correlation — beta-binomial Cox-Snell / Nagelkerke pseudo-R² against an external matrix.

HVG, plotting, and silhouette utilities from the R package are intentionally omitted — scanpy, pyranges, and sklearn already cover those.

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 (once v2.0 is published)

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 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)

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

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). The cross-language regression suite, R reference fixtures, and end-to-end M1/M2 validation pipeline live on the validation branch.

Documentation

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

Topics include:

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scsplice-2.0.0.tar.gz (969.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scsplice-2.0.0-cp312-cp312-manylinux_2_28_x86_64.whl (263.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

scsplice-2.0.0-cp312-cp312-macosx_11_0_arm64.whl (132.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

scsplice-2.0.0-cp312-cp312-macosx_10_15_x86_64.whl (139.8 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

scsplice-2.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (261.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

scsplice-2.0.0-cp311-cp311-macosx_11_0_arm64.whl (131.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

scsplice-2.0.0-cp311-cp311-macosx_10_15_x86_64.whl (138.5 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

scsplice-2.0.0-cp310-cp310-manylinux_2_28_x86_64.whl (260.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

scsplice-2.0.0-cp310-cp310-macosx_11_0_arm64.whl (130.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

scsplice-2.0.0-cp310-cp310-macosx_10_15_x86_64.whl (137.4 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

Details for the file scsplice-2.0.0.tar.gz.

File metadata

  • Download URL: scsplice-2.0.0.tar.gz
  • Upload date:
  • Size: 969.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scsplice-2.0.0.tar.gz
Algorithm Hash digest
SHA256 ed5e7200c87ac1102b63ecd89d35f40deb1140ed98eb844e761cb42b38d98d1c
MD5 de36e0cd561eb15b6f442544685fbfab
BLAKE2b-256 fd04158929e85cc0c7a2337818826b02b12668749184641afb4e773fe3ba30f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0.tar.gz:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6b64908c35546e5442d5a2aaa1571592ad157c235fe767cd6fc88f3cad272927
MD5 0b9ff967f0f04532cadcc7388e2b2212
BLAKE2b-256 afabcb0d469ae4f5239f8190266bb3741c7ca1cd1dcf52e5d29ebde96fa1224a

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a47194deb7cfd4d60aab6a3af39e34ffbda9dd3eaf2152e5850beb7e81125dde
MD5 7d39a73da98495a62aec4669e76b79d0
BLAKE2b-256 6953eedbe3829115103086e77b5d0988ec10babc48603801306db4959eb1f1bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9f43db18fc55c2f65999f11fcf9b3dbb96bd701d24089022b6017416e4755541
MD5 b190e4b4f5716c14da0892c54f0336b9
BLAKE2b-256 2e45d1c00843640723cdbe3810b3ee30dc50cc97056bb262e238e096de7543c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp312-cp312-macosx_10_15_x86_64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 acc5755fac313f6147f96c84150bfd51d21bbad4b30855f40bda2a082e16a714
MD5 82af2f2280acab70f56641842a25873d
BLAKE2b-256 c953cac14c48826daa2bfc158af3dc791ed5248bb50178172274992b6ae2a0e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 195c74b3e2223ec7f210d4ddc1726c5e9253b813d0a667c17f0c74c2a51bd721
MD5 2cc8e7b9795129c95519c51115385c8d
BLAKE2b-256 7ccf5aac86c529b2b65ca0a436cced0da3101a3a7c7c90e0b7524881b9c2f5a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 fa4532b16fea847024372398a3acbdcc87136f034f08e589e5918380797b93ed
MD5 29973c7e53145eb531beabbf67c7fb1d
BLAKE2b-256 58736eb43b6c7141f036216e8461f6c78b338a27de4805537596852bde107200

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp311-cp311-macosx_10_15_x86_64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2806cb95e1ba7a1a6b97e223ad156d66f7f5cead6ad611d42bf788ba9af0634c
MD5 db7d1e20cedd6843fca768d2c9b2c2eb
BLAKE2b-256 2abe71dc18b7c8e732f525a5f78013ae8834157a648b6c4be4e47fdba9b0c172

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 505c1faa37ff44a3c84f9cdbd924c021afd3c691c3502a586117152bbc280fd2
MD5 127a906096bb4052f9b9e39d86aa23d1
BLAKE2b-256 d11398b79a56d7a91c6f9c0dad6ad6aa4cead3433e4d861d9f9b732c23e3bbf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scsplice-2.0.0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for scsplice-2.0.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 47e5d0b0dda1c5c4b996f631d89bb26208c7e4e5eb2d3bf022c6b2cea8e93d56
MD5 1acf46a65feab68be3556fa81bcb4dbf
BLAKE2b-256 9bd4b631177fd5e69548ec33b703e300ac53eaab911282606e11b7772a45e183

See more details on using hashes here.

Provenance

The following attestation bundles were made for scsplice-2.0.0-cp310-cp310-macosx_10_15_x86_64.whl:

Publisher: wheels.yml on Arshammik/scsplice

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page