torchcell.metabolism.yeast_GEM.YeastGEM

class YeastGEM(root: str = 'data/torchcell/yeast-GEM', version: str = '9.0.2', induced_gene_set: GeneSet | None = None)[source]

Bases: object

Download, load, and expose the yeast-GEM genome-scale model.

version: str

9.0.2 is the CURRENT upstream release (2024-11-23), not a stale pin.

property model: Model

Return the lazily loaded cobra SBML model.

property reaction_map: Hypergraph

Create a hypergraph where edges represent reactions with gene combinations.

Raises:

MemberlessReactionError – if any reaction has no metabolites.

property bipartite_graph: DiGraph

Returns a directed bipartite graph representation of the metabolic network.

The graph has two types of nodes: - Reactions (node_type=”reaction”) - Metabolites (node_type=”metabolite”)

Edges connect reactions to metabolites with a directed structure: - Reaction → Metabolite with edge_type=”product” (metabolite is produced) - Reaction → Metabolite with edge_type=”reactant” (metabolite is consumed)

The edge direction is always from reaction to metabolite, with the edge_type indicating whether the metabolite is a reactant or product.

Returns:

A directed bipartite graph

Return type:

nx.DiGraph

Raises:

MemberlessReactionError – if any reaction has no metabolites.

property gene_set: GeneSet

Returns a GeneSet containing all genes in the model.