Skip to main content

py-Slingshot

A Python port of slingshot (Street et al. BMC Genomics 2018) — branching cell-lineage and pseudotime inference for single-cell RNA-seq.

  • Pure NumPy / SciPy / statsmodels implementation
  • MST over cluster centroids → DFS lineage enumeration → per-lineage principal curve fitting
  • Parity vs R Slingshot on a Y-shaped fixture: pseudotime Spearman 0.99+ along matched lineages

Install

pip install pyslingshot-bio

(module name is pyslingshot; the PyPI distribution name is pyslingshot-bio.)

Quick-start

import pyslingshot
sr = pyslingshot.slingshot(reduced_dim, cluster_labels, start_cluster="root_cluster_id")
# Per-lineage pseudotime
pt = sr.pseudotime              # (n_cells × n_lineages)
# Visualisation
from ggplot2_py import ggsave
ggsave("out.png", plot=pyslingshot.plot_slingshot(sr), width=6, height=4, dpi=120)

Function map

Python R Status
getLineages getLineages ✅
getCurves getCurves ✅ (independent per-lineage; no shared-start fitting yet)
slingshot slingshot ✅
plot_slingshot plot(sds) / vignette ✅
plot_pseudotime (custom) ✅
embedCurves embedCurves ⏳ v0.2
predict predict ⏳ v0.2
branchID branchID ⏳ v0.2

Known limitations (v0.1)

  1. Simultaneous principal-curve fitting deferred — v0.1 fits each lineage independently. R Slingshot shares the early stem across lineages during fitting, which produces cleaner branching. v0.2 will add this.
  2. MST distance metric uses plain Euclidean on centroids; R uses Mahalanobis-style scaling by within-cluster dispersion when dist.method = "slingshot" (default).
  3. embedCurves, predict, branchID deferred to v0.2.
  4. Lineage count can differ from R because of root-selection and lineage-merging differences; the matched lineages have Spearman ≥ 0.99 pseudotime parity.

Citation

Street, K. et al. Slingshot: cell lineage and pseudotime inference for single-cell transcriptomics. BMC Genomics 19, 477 (2018).

License

MIT.

Metadata

Release files for pyslingshot-bio 0.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 pyslingshot-bio 0.1.0
File Size Uploaded Provenance
pyslingshot_bio-0.1.0.tar.gz 10.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyslingshot-bio 0.1.0
File Interpreter ABI Platform
pyslingshot_bio-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / pyslingshot_bio-0.1.0.tar.gz

Download URL pyslingshot_bio-0.1.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
07cece788bef1ea806b5a1bd1f76f760ab0576e91e34600df933f80a6b0c84b0
BLAKE2b-256 checksum
How to use checksums
8ff8fe8e969628f51a5d5ae10ad855f179859c6dd828ca796bd63dfa6bb0473d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 25, 2026.

Transparency log

Release files / pyslingshot_bio-0.1.0-py3-none-any.whl

Download URL pyslingshot_bio-0.1.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aeba5fc421b8ca6ccdbfb1ea48714cf0092eed12369386bce8c31db8fd0a541f
BLAKE2b-256 checksum
How to use checksums
38c5d33c10e275f10e6d36af17ba6215c306a1102b3b65936bfcc1a8ec39e0e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 25, 2026.

Transparency log

Security for pyslingshot-bio 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyslingshot_bio-0.1.0.tar.gz

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 May 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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