pyscry
Python implementation of binomial deviance feature selection for single-cell count data (non-negative integer matrices), following the multinomial-model view in Townes et al. (2019) and the scry R package. Typical uses include scRNA-seq UMIs and scATAC-seq (or similar) peak or bin counts in AnnData; the method ranks features (adata.var) by deviance under a common null proportion.
Installation
pip install pyscry
Usage
import pyscry
pyscry.highly_deviant_features(adata, n_top_features=2000)
Expects raw (or raw-like) non-negative integer counts in adata.X or a named layer (e.g. UMIs, or ATAC fragments per peak).
Parameters
| Parameter | Type | Description |
|---|---|---|
adata |
AnnData |
Count matrix (cells × features; e.g. genes or peaks) |
n_top_features |
int |
Number of top features to select |
layer |
str | None |
Layer to use instead of adata.X |
subset |
bool |
Subset adata to selected features (default False) |
inplace |
bool |
Write results into adata.var (default True) |
batch_key |
str | None |
Obs key for batch; deviance is summed across batches |
check_values |
bool |
Warn if data are not non-negative integers (default True) |
Outputs
When inplace=True:
adata.var['binomial_deviance']-- deviance score per featureadata.var['highly_variable']-- boolean selection mask
Citation
If you use pyscry, cite the original method paper (written in the scRNA-seq setting; the deviance feature-screening idea applies to other multinomial-style count tables as well):
Townes FW, Hicks SC, Aryee MJ, Irizarry RA (2019). Feature selection and dimension reduction for single-cell RNA-Seq based on a multinomial model. Genome Biology 20:295. https://doi.org/10.1186/s13059-019-1861-6
If citing this Python implementation specifically:
pyscry: Binomial deviance feature selection for AnnData (2026).
Metadata
Release files for pyscry 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyscry-0.1.0.tar.gz | 6.0 kB | With provenance | Details for pyscry-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyscry-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyscry-0.1.0-py3-none-any.whl |
Total release size: 11.1 kB
Release files / pyscry-0.1.0.tar.gz
| Download URL | pyscry-0.1.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2d6259141d26bda9233e1decd317b6569aa0bd15b5a355d828b6ecf4aaeb746
|
|
BLAKE2b-256 checksum How to use checksums |
c8e9c6b5b9c285e287450b00adfc9759097bff3b41f276533f2f7c99c689a46a
|
| 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 Jul 12, 2026.
Transparency logRelease files / pyscry-0.1.0-py3-none-any.whl
| Download URL | pyscry-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e4d14f4b4670efca09966dae2a81252fdbc483dd4a57b7368fab061d9acc515
|
|
BLAKE2b-256 checksum How to use checksums |
1f579a6dee7576c2161736a2c80d5854a864e0c6556a50dbdc86e3ee865459ba
|
| 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 Jul 12, 2026.
Transparency logSecurity for pyscry 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
Both files in this release have been uploaded with provenance metadata.
Attestation for pyscry-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 Jul 12, 2026.
Transparency logA 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.