grassp.ds.gene_sets_curated

grassp.ds.gene_sets_curated#

gene_sets_curated(species='hsap', *, min_genes=None)[source]#

Curated compartments that subcellular proteomics can usually resolve.

Manually curated lists of compartments that a fractionation or proximity labelling experiment tends to separate into distinct profiles. They are the recommended starting point for an initial annotation, because they are the easiest to interpret, they are robust across datasets, and each carries enough members each compartment.

These gene sets were created the following way:

  • ~90 fine-grained UniProt SL terms mapped onto ~20 coarse compartment labels by a hand-written term map;

  • large complexes that these experiments routinely resolve as their own cluster, the 40S and 60S cytosolic ribosomes and the proteasome, were taken from EBI Complex Portal cross-references or a UniProt keyword where no Complex Portal entry exists;

Gene identifiers are gene-name tokens of reviewed UniProt entries for the species.

Parameters:
species Literal['hsap', 'mmus', 'scer'] (default: 'hsap')

One of "hsap" (human, 24 terms), "mmus" (mouse, 24 terms) or "scer" (yeast, 23 terms).

min_genes int | None (default: None)

Drop terms with fewer than this many genes. None (default) keeps all of them; every term in this set is large enough for most purposes.

Return type:

dict[str, list[str]]

Returns:

dict[str, list[str]] Mapping of compartment label to gene names, ready to pass as gene_sets to grassp.tl.mgsa(), grassp.tl.calculate_cluster_enrichment() or grassp.tl.merge_clusters_go(). Those functions already use this set as their default, so an explicit call is only needed to inspect or subset it.

See also

gene_sets_uniprot_sl

the full, unconsolidated UniProt SL vocabulary.

grassp.pp.add_markers

published marker sets, as .obs label columns.

Examples

>>> import grassp as gr
>>> sets = gr.ds.gene_sets_curated()
>>> len(sets)
24
>>> sorted(sets)[:4]
['40S cytosolic ribosome', '60S cytosolic ribosome', 'Cell membrane', 'Centrosome']
>>> len(gr.ds.gene_sets_curated("scer"))
23

Notes

Vendored build: 2026-09-24, from UniProt release 2026_03. UniProt’s REST API only ever serves the current release and the archived ones exist only as whole- knowledgebase tarballs, so this vocabulary cannot be pinned the way gene_sets_go_cc() is – the vendored build is the pin, and the release above is what it was built against. grassp.datasets.gene_sets.provenance() returns the full record per species.

Regenerated by python marker_curation/fetch_consolidated_terms.py, which writes uniprot_subcell_consolidated_{species}.gmt and its sidecar.