scatrans.expand_enrichment_genes

scatrans.expand_enrichment_genes#

scatrans.expand_enrichment_genes(res)[source]#

Expand semicolon-joined Genes column into a long term-gene table.

One row per Term-Gene pair. Extremely convenient for supplementary materials or downstream gene-level analysis.

If the input comes from run_go(ontology=”ALL”), the “Ontology” column (BP/CC/MF) is preserved and placed first for clarity.

Returns:

  • DataFrame with columns including [Ontology], Term, Description, Gene, plus

  • the main stats columns from the original result.

Parameters:

res (DataFrame)

Return type:

DataFrame