cocomico.base
CoCoMiCo base semantic domains.
Classes
Reactions with the same name but in different taxa are distinct. |
|
Metabolites are metabolite biomolecules tagged with organism biomolecules. |
|
MetaboliteSets are sets of metabolites with additional operations |
|
Seeds are sets of metabolite biomolecules that define inputs to a community. |
|
Reactions with the same name but in different taxa are distinct. |
|
An Exchanged defines an n to m relation between producers and consumers. |
Module Contents
- class cocomico.base.Reaction[source]
Bases:
NamedTupleReactions with the same name but in different taxa are distinct.
- class cocomico.base.Metabolite(provenance: Taxon, biomolecule: Biomolecule)[source]
Metabolites are metabolite biomolecules tagged with organism biomolecules.
- Parameters:
provenance (Taxon) – provenance organism
biomolecule (Biomolecule) – generic metabolite biomolecule
- property provenance: Taxon
Metabolite provenance organism biomolecule.
- Return type:
Taxon
- property biomolecule: Biomolecule
Metabolite generic biomolecule.
- Return type:
Biomolecule
- class cocomico.base.MetaboliteSet[source]
Bases:
Set[Metabolite]MetaboliteSets are sets of metabolites with additional operations for taxa.
- property taxa: set[Taxon]
The taxa of a metabolite set.
- Return type:
set[Taxon]
- property biomolecules: set[Biomolecule]
The taxa of a metabolite set.
- Return type:
set[Biomolecule]
- class cocomico.base.Seeds[source]
Bases:
FrozenSet[Biomolecule]Seeds are sets of metabolite biomolecules that define inputs to a community.
- Parameters:
seeds (Iterable[Biomolecule]) – set of metabolite biomolecules
name (str, optional) – symbolic name for the set of seeds
- class cocomico.base.Exchange[source]
Bases:
NamedTupleReactions with the same name but in different taxa are distinct.
- class cocomico.base.ExchangeNM(relations: set[tuple[Taxon, Taxon]] | set[Exchange] | None = None, producers: Iterable[Taxon] | None = None, consumers: Iterable[Taxon] | None = None)[source]
An Exchanged defines an n to m relation between producers and consumers. Designed to represent metabolite exchanges.
Exchange objects act like a set of pairs of producer-consumer relations that can be queried for membership. Sets of roducers and consumers can also be retrieved separately.
- Parameters:
producers (Iterable[Taxon] | None) – set of producer taxa for this exchange
consumers (Iterable[Taxon] | None) – set of consumer taxa for this exchange
relations (set[tuple[Taxon, Taxon]] | set[Exchange] | None)