pylimma.goana

pylimma.goana(de, gene_pathway, universe=None, *, species=None, prior_prob=None, covariate=None, plot=False, fdr=0.05, trend=False, **kwargs)[source]

Gene-ontology over-representation analysis.

Port of R limma’s goana (goana.R). See module docstring for the gene_pathway format and the Phase-1 scope cuts.

Parameters:
  • de (MArrayLM, AnnData, dict-of-vectors, or 1-D vector of gene IDs) – Differentially-expressed genes. When a fit object is supplied, the up- and down-regulated gene sets are derived internally (BH adjustment at level fdr).

  • gene_pathway (DataFrame) – Mapping from gene IDs to GO terms. See module docstring.

  • universe (sequence of str, optional) – Background gene universe. Defaults to all gene IDs in gene_pathway. Required - without GO.db there is no meaningful default beyond the supplied gene_pathway.

  • species (str, optional) – Accepted for R-API compatibility; ignored without GO.db.

  • prior_prob (sequence of float, optional) – Per-gene null DE probability (R name: null.prob).

  • covariate (sequence of float, optional) – Covariate values aligned to the universe; if supplied, trend becomes implicit and goana_trend is run. Phase 1 raises NotImplementedError.

  • plot (bool, default False) – Forwarded to goana_trend when applicable.

  • fdr (float, default 0.05) – FDR threshold for selecting up/down DE genes from a fit object (R name: FDR). Only used in the MArrayLM branch.

  • trend (bool, numeric, or str, default False) – Use length / abundance bias correction. Phase 1 raises NotImplementedError for any truthy / numeric / character value.

  • **kwargscoef and geneid for the MArrayLM branch.

Return type:

DataFrame