Metadata-Version: 2.4
Name: ln-ttest
Version: 0.1.1
Summary: LN's t-test: differential expression testing on an asymptotically unbiased log-fold-change estimator
Author: Oskar Kviman, Pedro F. Ferreira
Maintainer-email: "Pedro F. Ferreira" <pedro.miguel.ferreira.pf@gmail.com>
License: BSD 3-Clause License
        
        Copyright (c) 2026, Oskar Kviman and Pedro F. Ferreira
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Homepage, https://github.com/okviman/lntest
Project-URL: Source, https://github.com/okviman/lntest
Keywords: single-cell,differential-expression,transcriptomics,scanpy
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.9
Requires-Dist: statsmodels>=0.13
Provides-Extra: test
Requires-Dist: anndata>=0.9; extra == "test"
Requires-Dist: pandas>=1.5; extra == "test"
Requires-Dist: scanpy>=1.10; extra == "test"
Requires-Dist: pytest>=7; extra == "test"
Provides-Extra: anndata
Dynamic: license-file

# LN's $t$-test

[![CI](https://github.com/okviman/lntest/actions/workflows/ci.yml/badge.svg)](https://github.com/okviman/lntest/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/ln-ttest.svg)](https://pypi.org/project/ln-ttest/)

Differential expression testing for single-cell transcriptomics with reduced false discoveries.

## Installation

```bash
pip install ln-ttest
```

## Usage

```python
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"]
```

## Example

The notebook [PBMC3k](notebooks/pbmc3k.ipynb) showcases LN's $t$-test finding much less DE genes than scanpy's $t$-test on the 3k PBMCS data set from 10x Genomics.
