grassp.tl.load_gmt#
- load_gmt(source=None, species='hsap', deduplicate_terms=True)[source]#
Resolve a gene-set source into a
{term: [gene, ...]}dict.- Parameters:
- source
Union[str,Mapping[str,Sequence[str]],None] (default:None) One of:
dict/ mapping — returned as a plain{name: list(genes)}dict.existing file path — parsed as GMT (tab-separated; column 0 = term name, column 1 = description/source and is discarded, columns 2+ = gene identifiers).
Noneor a non-path string — delegated tograssp.tools.enrichment._load_gmt()(uses the consolidated UniProt subcellular-location sets bundled with grassp, or a gseapy library name), if grassp is importable.
- species
str(default:'hsap') Passed through to grassp when
sourceisNone; one of"hsap","mmus","scer".- deduplicate_terms
bool(default:True) If
True(default), collapse terms with identical gene membership (keeping the first-seen name); seegrassp.tools.enrichment._deduplicate_gene_sets().
- source
- Return type:
- Returns:
dict[str, list[str]] Mapping of term name to list of gene identifiers.