LN's $t$-test
Differential expression testing for single-cell transcriptomics with reduced false discoveries.
Installation
pip install ln-ttest
Usage
from lntest import rank_genes_groups_ln
rank_genes_groups_ln(adata, groupby="leiden", layer="norm_counts") # normalized, not log-transformed
adata.uns["rank_genes_groups"]["logfoldchanges"]
adata.uns["rank_genes_groups"]["lfc_se"]
To select each cluster's markers, we recommend taking the genes LN's $t$-test calls significant and up in the cluster, ranked by the log ratio of their detection rates over its standard error:
rank_genes_groups_ln(adata, groupby="leiden", layer="norm_counts", corr_method="bonferroni", rankby="markers")
adata.uns["rank_genes_groups"]["names"]["3"][:20] # cluster 3's top 20 markers
Example
The notebook PBMC3k showcases LN's $t$-test finding far fewer DEGs than scanpy's $t$-test on the 3k PBMCS data set from 10x Genomics.
Metadata
Release files for ln-ttest 0.2.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 | |
|---|---|---|---|
| ln_ttest-0.2.0.tar.gz | 23.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ln_ttest-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.2 kB
Release files / ln_ttest-0.2.0.tar.gz
| Download URL | ln_ttest-0.2.0.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8914601877025399b6d06c9d446517e3f6f082a69a0418b609d7f8e0827bdbb
|
|
BLAKE2b-256 checksum How to use checksums |
13b7019143df2f964b0523118f76948dec7f06ee37f21f895c6ce4164bcdd3e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 11, 2026.
Transparency logRelease files / ln_ttest-0.2.0-py3-none-any.whl
| Download URL | ln_ttest-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56815da2d7067ab04f849b9ff9c0f549f827910a908de313d1936ee5921b66d3
|
|
BLAKE2b-256 checksum How to use checksums |
1284faf23802a00697dd6069460875f7957f696a21290e494cb22c272ea0dcdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 11, 2026.
Transparency log