Back to bricks list
Introduction
Getting Started
ID Card
Use Cases
Technical documentations
Version

Network

RESOURCE
Typing name :  RESOURCE.gws_gena.Network Brick :  gws_gena
Parent :
Resource

Metabolic network

Class that represents a network.

A network is a collection of reconstructed metabolic pathways.

Views
NETWORKDefault view
JSON VIEW
SUMMARY
REACTION TABLE
COMPOUND DISTRIBUTION
REACTION GAPS
Functions
__INIT__

Constructor, please do not overwrite this method, use the init method instead Leave the constructor without parameters.

ADD_COMPOUND

Adds a compound

comp : Compound
The compound to add
ADD_REACTION

Adds a product

rxn : Reaction
The reaction to add
ADD_SIMULATION

Adds a simulation

sim : SimulationDict
The simulation dictionary
ADD_TECHNICAL_INFO

Add technical information on the resource. Technical info are useful to set additional information on the resource.

technical_info : TechnicalInfo
technical information to add (key, value)
CHECK_RESOURCE

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

Return type : Union[str, NoneType]
CLONE

Clone the resource to create a new instance with a new id. It copies the RFields.

Return type : ResourceType
COMPOUND_EXISTS

Check that a compound exists in the network

comp : Compound
Return type : bool
COPY

Returns a deep copy

Return type : Network
CREATE_INPUT_STOICHIOMETRIC_MATRIX

Create the input stoichiometric matrix of the network

We define by input stoichiometric matrix, the submatrix of the stoichimetric matrix involving the consumed compounds

include_biomass : bool - True
ignore_cofactors : bool - False
Return type : DataFrame
CREATE_NON_STEADY_STOICHIOMETRIC_MATRIX

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)

include_biomass : bool - True
ignore_cofactors : bool - False
Return type : DataFrame
CREATE_OUTPUT_STOICHIOMETRIC_MATRIX

Create the output stoichiometric matrix of the network

We define by input stoichiometric matrix, the submatrix of the stoichimetric matrix involving the excreted compounds

include_biomass : bool - True
ignore_cofactors : bool - False
Return type : DataFrame
CREATE_STEADY_STOICHIOMETRIC_MATRIX

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)

ignore_cofactors : bool - False
Return type : DataFrame
CREATE_STOICHIOMETRIC_MATRIX

Create the full stoichiometric matrix of the network

Return type : DataFrame
DUMPS

Dumps the network

refresh_layout : bool - False
Return type : NetworkDict
FLATTEN_COMPARTMENT_ID

Flatten the id of a compartment

compartment : Compartment
Return type : str
FLATTEN_COMPOUND_ID

Flatten the id of a compound

comp : Compound
Return type : str
FLATTEN_REACTION_ID

Flatten the id of a reaction

rxn : Reaction
Return type : str
GET_BIOMASS_COMPOUND

Get the biomass compounds if it exists

Return type : Compound
GET_BIOMASS_REACTION

Get the biomass reaction if it exists

Return type : Reaction
GET_COMPOUND_BY_ID

Get a compound by its id.

comp_id : str
The compound id
Return type : Compound
GET_COMPOUND_IDS

Get all compound ids

Return type : List
GET_COMPOUND_STATS_AS_JSON

Get compound stats as JSON

Return type : dict
GET_COMPOUND_STATS_AS_TABLE

Get compound stats as table

Return type : Table
GET_COMPOUNDS_BY_CHEBI_ID

Get a compound by its chebi id and compartment.

chebi_id : str
The chebi id of the compound
compartment : Union[str, NoneType] - None
The compartment of the compound
Return type : List
GET_COMPOUNDS_BY_COMPARTMENTS

Get the compounds in a compartments

compartment_list : List - None
Return type : Dict
GET_DEFAULT_NAME

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

Return type : str
GET_NON_STEADY_COMPOUNDS

Get the non-steady compounds

ignore_cofactors : bool - False
Return type : Dict
GET_NUMBER_OF_COMPOUNDS

Get number of compounds

Return type : int
GET_NUMBER_OF_REACTIONS

Get number of reactions

Return type : int
GET_REACTION_BOUNDS

Get the reaction bounds [lb, ub]

Return type : DataFrame
GET_REACTION_BY_EC_NUMBER

Get a reaction by its ec number.

ec_number : str
The ec number of the reaction
Return type : Reaction
GET_REACTION_BY_ID

Get a reaction by its id.

rxn_id : str
The reaction id
Return type : Reaction
GET_REACTION_BY_RHEA_ID

Get a reaction by its rhea id.

rhea_id : str
The rhea id of the reaction
Return type : Reaction
GET_REACTION_IDS

Get all reaction ids

Return type : List
GET_STATS

Gather and return networks stats

Return type : dict
GET_STATS_AS_JSON

Get stats as JSON

Return type : dict
GET_STEADY_COMPOUNDS

Get the steady compounds

ignore_cofactors : bool - False
Return type : Dict
GET_SUMMARY

Return the summary of the network

Return type : dict
GET_TECHNICAL_INFO

Get the technical information of the resource

key : str
key of the technical information
Return type : TechnicalInfo
GET_TOTAL_ABS_FLUX_AS_TABLE

Get the total absolute flux as table

Return type : Table
HAS_SINK

Return True if the network has sink reaction, False otherwise

Return type : bool
INIT

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

Merge with another network

network : Network
inplace : bool - False
REACTION_EXISTS

Check that a reaction exists in the network

rxn : Reaction
The reaction
Return type : bool
REMOVE_COMPOUND

Remove a compound from the network

comp_id : str
The id of the compound to remove
REMOVE_REACTION

Remove a reaction from the network

rxn_id : str
The id of the reaction to remove
SET_SIMULATIONS

Set simulations

simulations : Dict
TO_CSV

Returns a CSV representation of the network

Return type : str
TO_DATAFRAME

Returns a DataFrame representation of the network

Return type : DataFrame
TO_STR

Returns a string representation of the network

Return type : str
TO_TABLE

Returns a Table representation of the network

Return type : Table
UPDATE_COMPOUND_RECON_TAG

Set a compound recon tag

tag_id : Any
tag_data : dict
UPDATE_EC_RECON_TAG

Set a ec recon tag

tag_id : Any
tag_data : dict
UPDATE_REACTION_RECON_TAG

Set a reaction recon tag

tag_id : Any
tag_data : dict
VIEW_AS_JSON

View as json

params : ConfigParams
Return type : JSONView
VIEW_AS_TABLE

View as table

_ : ConfigParams
Return type : TableView
VIEW_COMPOUND_STATS_AS_TABLE

View compound stats as table

_ : ConfigParams
Return type : TableView
VIEW_GAPS_AS_TABLE

View gaps as table

_ : ConfigParams
Return type : TableView