Binomial deviance feature selection for single-cell count data (AnnData)
Project description
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyscry-0.1.0.tar.gz.
File metadata
- Download URL: pyscry-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2d6259141d26bda9233e1decd317b6569aa0bd15b5a355d828b6ecf4aaeb746
|
|
| MD5 |
3bb36ebf8f9f8cb19904d2177245556b
|
|
| BLAKE2b-256 |
c8e9c6b5b9c285e287450b00adfc9759097bff3b41f276533f2f7c99c689a46a
|
Provenance
The following attestation bundles were made for pyscry-0.1.0.tar.gz:
Publisher:
publish.yml on shahrozeabbas/pyscry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscry-0.1.0.tar.gz -
Subject digest:
c2d6259141d26bda9233e1decd317b6569aa0bd15b5a355d828b6ecf4aaeb746 - Sigstore transparency entry: 2155524067
- Sigstore integration time:
-
Permalink:
shahrozeabbas/pyscry@738a141cc83d7a58cc95fc0f1b8eaf69187f579d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/shahrozeabbas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@738a141cc83d7a58cc95fc0f1b8eaf69187f579d -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyscry-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyscry-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e4d14f4b4670efca09966dae2a81252fdbc483dd4a57b7368fab061d9acc515
|
|
| MD5 |
74ece9b753bcfd62c113c38c93f7879c
|
|
| BLAKE2b-256 |
1f579a6dee7576c2161736a2c80d5854a864e0c6556a50dbdc86e3ee865459ba
|
Provenance
The following attestation bundles were made for pyscry-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on shahrozeabbas/pyscry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscry-0.1.0-py3-none-any.whl -
Subject digest:
7e4d14f4b4670efca09966dae2a81252fdbc483dd4a57b7368fab061d9acc515 - Sigstore transparency entry: 2155524101
- Sigstore integration time:
-
Permalink:
shahrozeabbas/pyscry@738a141cc83d7a58cc95fc0f1b8eaf69187f579d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/shahrozeabbas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@738a141cc83d7a58cc95fc0f1b8eaf69187f579d -
Trigger Event:
release
-
Statement type: