gws_gena

Introduction
Getting Started
ID Card
Use Cases
Technical documentations
Version

Reaction

Class that represents a reaction of a network.

Networks' reactions are proxy of biota reaction (i.e. Rhea compounds). They a used to build reconstructed digital twins.

:property id: The id of the reaction :type id: str :property name: The name of the reaction :type name: str :property direction: The direction of the reaction. Bidirectional (B), Left direction (L), Righ direction (R) :type direction: str :property lower_bound: The lower bound of the reaction flux (metabolic flux) :type lower_bound: float :property upper_bound: The upper bound of the reaction flux (metabolic flux) :type upper_bound: float :property rhea_id: The corresponding Rhea of the reaction :type rhea_id: str :property enzymes: The details on the enzymes that regulates the reaction :type enzymes: list[dict] :type gene_reaction_rule: 'str' :property gene_reaction_rule: The gene reaction rule of the reaction

Attributes
data: dictdirection: strenzymes: Listgene_reaction_rule: strid: strlayout: ReactionLayoutDictlower_bound: floatname: strproducts: Dictrhea_id: strsubstrates: Dictupper_bound: float
Functions
__init__

Initialize self. See help(type(self)) for accurate signature.

dict_ : ReactionDict
add_data_slot

Set data

slot : str
data : dict
add_product

Adds a product to the reaction

comp : Compound
The compound to add as product
stoich : float
The stoichiometry of the compound in the reaction
network : Union
update_if_exists : bool - False
add_substrate

Adds a substrate to the reaction

comp : Compound
The compound to add as substrate
stoich : float
The stoichiometry of the compound in the reaction
network : Union
update_if_exists : bool - False
compute_mass_and_charge_balance

Compute the mass and charge balance of a reaction

Return type : dict
copy

Deep copy

Return type : Reaction
get_data_slot

Set data

slot : str
default : Any
get_pathways
Return type : ReactionPathwayDict
get_pathways_as_flat_dict
Return type : Dict
has_products

has products

has_substrates

has substrates

is_biomass_reaction

Returns True, if it is the biomass reaction; False otherwise

is_empty

is empty

remove_product

Remove a product to the reaction

comp : Compound
The compound to remove
remove_substrate

Removes a substrate to the reaction

comp : Compound
The compound to remove
set_data

Set data

data : dict
to_str

Returns a string representation of the reaction

show_names : bool - False
Return type : str
create_sink_reaction @classmethod
related_compound : Compound
network : Union
lower_bound : float - -1000.0
upper_bound : float - 1000.0
Return type : Reaction
from_biota @classmethod

Create a biota reaction from a Rhea id or an EC number.

biota_reaction : Any
The biota reaction to use. If not provided, the rhea_id or ec_number are used to fetch the corresponding reaction from the biota db.
rhea_id : Any
The Rhea id of the reaction. If given, the other parameters are not considered
ec_number : Any
The EC number of the enzyme related to the reaction. If given, all the Rhea reactions associated with this enzyme are retrieved for the biota DB
tax_id : Any
The taxonomy ID of the target organism. If given, the enzymes are fetched in the corresponding taxonomy. If the taxonomy ID is not valid, no reaction is built.
tax_search_method : str - bottom_up
The taxonomy search method (Defaults to `bottom_up`). * `none`: the algorithm will only search at the given taxonomy level * `bottom_up`: the algorithm will to traverse the taxonomy tree to search in the higher taxonomy levels until a reaction is found
Return type : List