psamm.datasource.entry
– Model entry representations¶
Representation of compound/reaction entries in models.
-
class
psamm.datasource.entry.
ModelEntry
¶ Abstract model entry.
Provdides a base class for model entries which are representations of any entity (such as compound, reaction or compartment) in a model. An entity has an ID, and may have a name and filemark. The ID is a unique string identified within a model. The name is a string identifier for human consumption. The filemark indicates where the entry originates from (e.g. file name and line number). Any additional properties for an entity exist in
properties
which is any dict-like object mapping from string keys to any value type. Thename
entry in the dictionary corresponds to the name. Entries can be mutable, where the properties can be modified, or immutable, where the properties cannot be modified or where modifications are ignored. The ID is always immutable.-
id
¶ Identifier of entry.
-
name
¶ Name of entry (or None).
-
properties
¶ Properties of entry as a
Mapping
subclass (e.g. dict).Note that the properties are not generally mutable but may be mutable for specific subclasses. If the
id
exists in this dictionary, it must never change the actual entry ID as obtained from theid
property, even if other properties are mutable.
-
filemark
¶ Position of entry in the source file (or None).
-
-
class
psamm.datasource.entry.
CompoundEntry
¶ Abstract compound entry.
Entry subclass for representing compounds. This standardizes the properties
formula
andcharge
.-
formula
¶ Chemical formula of compound.
-
charge
¶ Compound charge value.
-
-
class
psamm.datasource.entry.
ReactionEntry
¶ Abstract reaction entry.
Entry subclass for representing compounds. This standardizes the properties
equation
andgenes
.-
equation
¶ Reaction equation.
-
genes
¶ Gene association expression.
-
-
class
psamm.datasource.entry.
CompartmentEntry
¶ Abstract compartment entry.
Entry subclass for representing compartments.
-
class
psamm.datasource.entry.
DictCompoundEntry
(*args, **kwargs)¶ Compound entry backed by dictionary.
The given properties dictionary must contain a key
id
with the identifier.Parameters: - properties – dict or
CompoundEntry
to construct from. - filemark – Where the entry was parsed from (optional)
-
formula
¶ Chemical formula of compound.
-
charge
¶ Compound charge value.
- properties – dict or
-
class
psamm.datasource.entry.
DictReactionEntry
(*args, **kwargs)¶ Reaction entry backed by dictionary.
The given properties dictionary must contain a key
id
with the identifier.Parameters: - properties – dict or
ReactionEntry
to construct from. - filemark – Where the entry was parsed from (optional)
-
equation
¶ Reaction equation.
-
genes
¶ Gene association expression.
- properties – dict or
-
class
psamm.datasource.entry.
DictCompartmentEntry
(*args, **kwargs)¶ Compartment entry backed by dictionary.
The given properties dictionary must contain a key
id
with the identifier.Parameters: - properties – dict or
CompartmentEntry
to construct from. - filemark – Where the entry was parsed from (optional)
- properties – dict or