mantispy.ds.gene_sets

Contents

mantispy.ds.gene_sets#

mantispy.ds.gene_sets(name='hallmark', organism='human', cache_dir=None)[source]#

A gene-set network from OmniPath, pinned to a local snapshot.

Parameters:
  • name (str (default: 'hallmark')) – A friendly shortcut ("hallmark", "GO_BP", "Reactome", "CORUM") or any OmniPath resource name that decoupler.op.show_resources lists (for example "MSigDB", "KEGG").

  • organism (str (default: 'human')) – The organism the resource is fetched for. "CORUM" is human only.

  • cache_dir (str | Path | None (default: None)) – Where the snapshot is kept. Defaults to mantispy.settings.cache_dir.

Return type:

DataFrame

Returns:

A frame with source (the set), target (a gene symbol) and weight (1.0), in the shape ora() and enrich() read. For "CORUM" the set is a complex.

Notes

The first call fetches from the OmniPath web service (or, for "CORUM", downloads the packaged complexes) and writes a parquet snapshot; later calls read the snapshot, so CI and offline use never refetch. "GO_BP" and "Reactome" are collections of the large MSigDB resource.