Pure-Python port of Bioconductor limma — linear models & empirical-Bayes moderated statistics for differential expression (voom, lmFit, eBayes, topTable).
Project description
limmapy
A pure-Python port of Bioconductor limma (Ritchie et al., Nucleic Acids Research 2015) — linear models and empirical-Bayes moderated statistics for differential expression.
- No
rpy2, no R install — the core limma linear-model workflow reimplemented in NumPy / SciPy - The canonical pipeline:
voom → lmFit → contrasts.fit → eBayes → topTable - Smyth 2004 empirical-Bayes variance moderation;
treat,decideTests,duplicateCorrelation,removeBatchEffect - Both Python-style (
lm_fit,ebayes,top_table) and R-style (lmFit,eBayes,topTable) names exported pandas/numpy-friendly
The import name is
pylimma; the PyPI distribution name ispython-limma(pip install python-limma). The namespylimma/limmapywere unavailable on PyPI, so the distribution carries the omicverse-ecosystem name.
This is a standalone mirror of the implementation developed in
omicverse. It powersomicverse's edgeR / limma-voom differential-expression backends and thepydeqmsproteomics workflow.
Install
pip install python-limma
Quick start
import numpy as np
import pylimma
# expr: genes x samples log-expression matrix; design: samples x coefficients
fit = pylimma.lmFit(expr, design)
fit = pylimma.eBayes(fit)
res = pylimma.topTable(fit, coef=1, number=np.inf)
res.head()
RNA-seq with voom
import pylimma
v = pylimma.voom(counts, design) # EList: mean-variance weights
fit = pylimma.eBayes(pylimma.lmFit(v.E, design, weights=v.weights))
pylimma.topTable(fit, coef=1)
API
| Python | R counterpart |
|---|---|
lm_fit / lmFit |
lmFit |
ebayes / eBayes |
eBayes |
contrasts_fit |
contrasts.fit |
top_table / topTable |
topTable |
voom |
voom |
treat |
treat |
decide_tests / decideTests |
decideTests |
duplicate_correlation / duplicateCorrelation |
duplicateCorrelation |
remove_batch_effect / removeBatchEffect |
removeBatchEffect |
MArrayLM, EList, TestResults |
the corresponding S4 classes |
Citation
Ritchie, M.E., Phipson, B., Wu, D., Hu, Y., Law, C.W., Shi, W., Smyth, G.K. limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Research 43(7), e47 (2015).
…and acknowledge omicverse / this repo for the Python port.
License
LGPL-3.0-or-later — matches the upstream Bioconductor package.
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 python_limma-0.1.0.tar.gz.
File metadata
- Download URL: python_limma-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
921b6f59f2765034b05e6ce124caa6744a4133d829537053617b9d951328c9b1
|
|
| MD5 |
27ab50b504ca6daee03b8fa34c17c755
|
|
| BLAKE2b-256 |
d1122eb20ca6e6089112ee58f35e793830e6fe38e82c8e99bb9c6729b0f635e2
|
Provenance
The following attestation bundles were made for python_limma-0.1.0.tar.gz:
Publisher:
publish.yml on omicverse/py-limma
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_limma-0.1.0.tar.gz -
Subject digest:
921b6f59f2765034b05e6ce124caa6744a4133d829537053617b9d951328c9b1 - Sigstore transparency entry: 1579945595
- Sigstore integration time:
-
Permalink:
omicverse/py-limma@81d44e4c4357659d81ec3f1ce75ce47d8254e202 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/omicverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81d44e4c4357659d81ec3f1ce75ce47d8254e202 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file python_limma-0.1.0-py3-none-any.whl.
File metadata
- Download URL: python_limma-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.8 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 |
e8decec55a30694320ae4e38f4a5462498b94d2b8326273c843f9863de45004f
|
|
| MD5 |
200e88f5bd78af4b2c3411728f0073c3
|
|
| BLAKE2b-256 |
84c6e7fa9f82c25a982189618342a00acda50cd3fc10ea5fed854e39a1ccda64
|
Provenance
The following attestation bundles were made for python_limma-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on omicverse/py-limma
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_limma-0.1.0-py3-none-any.whl -
Subject digest:
e8decec55a30694320ae4e38f4a5462498b94d2b8326273c843f9863de45004f - Sigstore transparency entry: 1579945708
- Sigstore integration time:
-
Permalink:
omicverse/py-limma@81d44e4c4357659d81ec3f1ce75ce47d8254e202 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/omicverse
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@81d44e4c4357659d81ec3f1ce75ce47d8254e202 -
Trigger Event:
workflow_dispatch
-
Statement type: