Metabolic network
Class that represents a network.
A network is a collection of reconstructed metabolic pathways.
Views
Functions
Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters.
Adds a compound
Name | Type | Default value | Description |
---|---|---|---|
comp | Compound | The compound to add `gena.network.` |
Adds a product
Name | Type | Default value | Description |
---|---|---|---|
rxn | Reaction | The reaction to add `gena.network.` |
Adds a simulation
Name | Type | Default value | Description |
---|---|---|---|
sim | SimulationDict | The simulation dictionary ``, |
Add technical information on the resource. Technical info are useful to set additional information on the resource.
Name | Type | Default value | Description |
---|---|---|---|
technical_info | TechnicalInfo | Technical information to add (key, value) |
You can redefine this method to define custom logic to check this resource. If there is a problem with the resource, return a string that define the error, otherwise return None This method is called on output resources of a task. If there is an error returned, the task will be set to error and next proceses will not be run. It is also call when uploading a resource (usually for files or folder), if there is an error returned, the resource will not be uploaded
Union[str, NoneType] |
Clone the resource to create a new instance with a new id. It copies the RFields.
ResourceType |
Check that a compound exists in the network
Name | Type | Default value | Description |
---|---|---|---|
comp | Compound |
bool |
Returns a deep copy
Network |
Create the input stoichiometric matrix of the network
We define by input stoichiometric matrix, the submatrix of the stoichimetric matrix involving the consumed compounds
Name | Type | Default value | Description |
---|---|---|---|
include_biomass | bool | True | |
ignore_cofactors | bool | False |
DataFrame |
Create the non-steady stoichiometric matrix of the network
We define by non-steady stoichiometric matrix, the submatrix of the stoichimetric matrix involving the non-steady compounds (e.g. extra-cellular, biomass compounds)
Name | Type | Default value | Description |
---|---|---|---|
include_biomass | bool | True | |
ignore_cofactors | bool | False |
DataFrame |
Create the output stoichiometric matrix of the network
We define by input stoichiometric matrix, the submatrix of the stoichimetric matrix involving the excreted compounds
Name | Type | Default value | Description |
---|---|---|---|
include_biomass | bool | True | |
ignore_cofactors | bool | False |
DataFrame |
Create the steady stoichiometric matrix of the network
We define by steady stoichiometric matrix, the submatrix of the stoichimetric matrix involving the steady compounds (e.g. intra-cellular compounds)
Name | Type | Default value | Description |
---|---|---|---|
ignore_cofactors | bool | False |
DataFrame |
Create the full stoichiometric matrix of the network
DataFrame |
Dumps the network
Name | Type | Default value | Description |
---|---|---|---|
refresh_layout | bool | False |
NetworkDict |
Flatten the id of a compartment
Name | Type | Default value | Description |
---|---|---|---|
compartment | Compartment |
str |
Flatten the id of a compound
Name | Type | Default value | Description |
---|---|---|---|
comp | Compound |
str |
Flatten the id of a reaction
Name | Type | Default value | Description |
---|---|---|---|
rxn | Reaction |
str |
Get the biomass compounds if it exists
Compound |
Get the biomass reaction if it exists
Reaction |
Get a compound by its id.
Name | Type | Default value | Description |
---|---|---|---|
comp_id | str | The compound id `` |
Compound |
Get all compound ids
List |
Get compound stats as JSON
dict |
Get compound stats as table
Table |
Get a compound by its chebi id and compartment.
Name | Type | Default value | Description |
---|---|---|---|
chebi_id | str | The chebi id of the compound `` | |
compartment | Union[str, NoneType] | None | The compartment of the compound `str` |
List |
Get the compounds in a compartments
Name | Type | Default value | Description |
---|---|---|---|
compartment_list | List | None |
Dict |
You can redefine this method to set a name of the resource. When saving the resource the name will be saved automatically This can be useful to distinguish this resource from another one or to search for the resource
str |
Get the non-steady compounds
Name | Type | Default value | Description |
---|---|---|---|
ignore_cofactors | bool | False |
Dict |
Get number of compounds
int |
Get number of reactions
int |
Get the reaction bounds [lb, ub]
DataFrame |
Get a reaction by its ec number.
Name | Type | Default value | Description |
---|---|---|---|
ec_number | str | The ec number of the reaction `` |
Reaction |
Get a reaction by its id.
Name | Type | Default value | Description |
---|---|---|---|
rxn_id | str | The reaction id `` |
Reaction |
Get a reaction by its rhea id.
Name | Type | Default value | Description |
---|---|---|---|
rhea_id | str | The rhea id of the reaction `` |
Reaction |
Get all reaction ids
List |
Gather and return networks stats
dict |
Get stats as JSON
dict |
Get the steady compounds
Name | Type | Default value | Description |
---|---|---|---|
ignore_cofactors | bool | False |
Dict |
Return the summary of the network
dict |
Get the technical information of the resource
Name | Type | Default value | Description |
---|---|---|---|
key | str | Key of the technical information |
TechnicalInfo |
Get the total absolute flux as table
Table |
Return True if the network has sink reaction, False otherwise
bool |
This can be overwritten to perform custom initialization of the resource. This method is called just after the init (constructor) of the resource. The default values of RFields are set before this method is called.
Merge with another network
Name | Type | Default value | Description |
---|---|---|---|
network | Network | ||
inplace | bool | False |
Check that a reaction exists in the network
Name | Type | Default value | Description |
---|---|---|---|
rxn | Reaction | The reaction `gws.gena.` |
bool |
Remove a compound from the network
Name | Type | Default value | Description |
---|---|---|---|
comp_id | str | The id of the compound to remove `` |
Remove a reaction from the network
Name | Type | Default value | Description |
---|---|---|---|
rxn_id | str | The id of the reaction to remove `` |
Set simulations
Name | Type | Default value | Description |
---|---|---|---|
simulations | Dict |
Returns a CSV representation of the network
str |
Returns a DataFrame representation of the network
DataFrame |
Returns a string representation of the network
str |
Returns a Table representation of the network
Table |
Set a compound recon tag
Name | Type | Default value | Description |
---|---|---|---|
tag_id | Any | ||
tag_data | dict |
Set a ec recon tag
Name | Type | Default value | Description |
---|---|---|---|
tag_id | Any | ||
tag_data | dict |
Set a reaction recon tag
Name | Type | Default value | Description |
---|---|---|---|
tag_id | Any | ||
tag_data | dict |
View as json
Name | Type | Default value | Description |
---|---|---|---|
params | ConfigParams |
JSONView |
View as table
Name | Type | Default value | Description |
---|---|---|---|
_ | ConfigParams |
TableView |
View compound stats as table
Name | Type | Default value | Description |
---|---|---|---|
_ | ConfigParams |
TableView |
View gaps as table
Name | Type | Default value | Description |
---|---|---|---|
_ | ConfigParams |
TableView |