Skip to main content

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 is python-limma (pip install python-limma). The names pylimma / limmapy were unavailable on PyPI, so the distribution carries the omicverse-ecosystem name.

This is a standalone mirror of the implementation developed in omicverse. It powers omicverse's edgeR / limma-voom differential-expression backends and the pydeqms proteomics 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, lib_size=lib_size)   # EList: logCPM + mean-variance weights
fit = pylimma.eBayes(pylimma.lmFit(v, design))        # as lmFit(v, design) in R
pylimma.topTable(fit, coef=1)                         # logFC, AveExpr, t, P.Value, adj.P.Val, B

lib_size is the effective library size (library size x TMM factor), e.g. from pyedger: pyedger.effective_lib_sizes(pyedger.normLibSizes(dge)). Coefficients are 0-based (coef=1 is R's coef = 2).

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.

Metadata

Release files for python-limma 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-limma 0.1.1
File Size Uploaded Provenance Actions
python_limma-0.1.1.tar.gz 20.8 kB With provenance Details for python_limma-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-limma 0.1.1
File Interpreter ABI Platform Actions
python_limma-0.1.1-py3-none-any.whl Python 3 none any Details for python_limma-0.1.1-py3-none-any.whl

Total release size: 38.1 kB

Release files / python_limma-0.1.1.tar.gz

Download URL python_limma-0.1.1.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f17f26004a1d16357d40c5d446b992bd6a678c5fc3bfc00afa44bfc383a8b176
BLAKE2b-256 checksum
How to use checksums
b4e69c306e7333d15e81efb692f40bcde4d5a2567d4b878751cfb3ef19de5ea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 9, 2026.

Transparency log

Release files / python_limma-0.1.1-py3-none-any.whl

Download URL python_limma-0.1.1-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bb1c63177b83d9069af15109a6b0347c5f06a853141fc02358e0e1b9faddd30
BLAKE2b-256 checksum
How to use checksums
df99cf1f5ebbb4d5266c4c683d97a64cc8dc976bb9d658fb31c55fb8eaccaa6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 9, 2026.

Transparency log

Security for python-limma 0.1.1

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.

Select from 2 files

Attestation for python_limma-0.1.1.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 Nov 9, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page