Skip to main content

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 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)            # 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_limma-0.1.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_limma-0.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

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

Hashes for python_limma-0.1.0.tar.gz
Algorithm Hash digest
SHA256 921b6f59f2765034b05e6ce124caa6744a4133d829537053617b9d951328c9b1
MD5 27ab50b504ca6daee03b8fa34c17c755
BLAKE2b-256 d1122eb20ca6e6089112ee58f35e793830e6fe38e82c8e99bb9c6729b0f635e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_limma-0.1.0.tar.gz:

Publisher: publish.yml on omicverse/py-limma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for python_limma-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8decec55a30694320ae4e38f4a5462498b94d2b8326273c843f9863de45004f
MD5 200e88f5bd78af4b2c3411728f0073c3
BLAKE2b-256 84c6e7fa9f82c25a982189618342a00acda50cd3fc10ea5fed854e39a1ccda64

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_limma-0.1.0-py3-none-any.whl:

Publisher: publish.yml on omicverse/py-limma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page