Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

SCTpy

SCTransform normalization for raw UMI counts in Python, with NumPy/SciPy, AnnData support and optional CuPy GPU fitting. Current version: 0.1.0a2 (alpha).

Install

Python 3.10 or later. The PyPI distribution is sct-python; the import is sctpy:

python -m pip install "sct-python[anndata]==0.1.0a2"

Quickstart

Use raw, nonnegative integer counts from an AnnData layer:

from sctpy import SCTConfig, fit_transform_anndata, write_anndata

result = fit_transform_anndata(
    adata,
    layer="counts",
    config=SCTConfig.r_v2(),
)
write_anndata(adata, result, n_top_genes=2000)

The adapter preserves cell/gene identities and writes SCT outputs to AnnData. The array API, fit_transform, also accepts dense NumPy or SciPy CSR/CSC counts with explicit gene/cell names. Use SCTConfig.r_v2() for the documented v2 profile; plain SCTConfig() selects the research defaults.

GPU

Install "sct-python[anndata,gpu]==0.1.0a2" for CUDA 13 or "sct-python[anndata,gpu-cu12]==0.1.0a2" for CUDA 12, then select:

config = SCTConfig.r_v2(cox_reid_backend="cupy", cox_reid_batch_size=512)

The GPU backend accelerates dispersion fitting. Other stages include CPU work, and results use NumPy/SciPy. Dense residual output can be avoided with residual_output="summary".

Scope and documentation

SCTpy provides dispersion fitting, regularization, Pearson residuals, HVG ranking and optional corrected UMI counts. Batch models, extra covariates and a full GPU pipeline are outside the current release.

See the API reference, method specification, validation, GPU details and licensing and provenance. Method references include Hafemeister & Satija (2019) and Choudhary & Satija (2022).

Development

python -m pip install -e ".[test,lint,anndata]"
ruff check .
ruff format --check .
mypy
python -m pytest

License

MIT. Copyright (c) 2026 Bowen Man.

Metadata

Release files for sct-python 0.1.0a2

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

Source distribution (sdist)

Source distribution for sct-python 0.1.0a2
File Size Uploaded Provenance Actions
sct_python-0.1.0a2.tar.gz 288.2 kB With provenance Details for sct_python-0.1.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sct-python 0.1.0a2
File Interpreter ABI Platform Actions
sct_python-0.1.0a2-py3-none-any.whl Python 3 none any Details for sct_python-0.1.0a2-py3-none-any.whl

Total release size: 317.8 kB

Release files / sct_python-0.1.0a2.tar.gz

Download URL sct_python-0.1.0a2.tar.gz
Size 288.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1d3996f2513b91e37fa2f7c743e88d096f4bd563f6d3ea0762ae549f63a4057a
BLAKE2b-256 checksum
How to use checksums
a6c734e0f048401d3adf4a15c78930153b3cf89bfcb55b4b56643213dfcf5448
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 29, 2026.

Transparency log

Release files / sct_python-0.1.0a2-py3-none-any.whl

Download URL sct_python-0.1.0a2-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5250b844676f65df7db40c5737bd9615a5e82eb53062b54ee9a6299a86c191b8
BLAKE2b-256 checksum
How to use checksums
d5e446e4b126cb75824fbbe6f9d9b569e55660b354fa4d0f321e72d1087047e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 29, 2026.

Transparency log

Security for sct-python 0.1.0a2

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sct_python-0.1.0a2.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 Nov 29, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
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