Login
Back to bricks list
Introduction 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

Parameters:
NameTypeDefault valueDescription
compCompound The compound to add `gena.network.`
ADD_REACTION

Adds a product

Parameters:
NameTypeDefault valueDescription
rxnReaction The reaction to add `gena.network.`
ADD_SIMULATION

Adds a simulation

Parameters:
NameTypeDefault valueDescription
simSimulationDict The simulation dictionary ``,
ADD_TECHNICAL_INFO

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

Parameters:
NameTypeDefault valueDescription
technical_infoTechnicalInfo 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

Parameters:
NameTypeDefault valueDescription
compCompound
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

Parameters:
NameTypeDefault valueDescription
include_biomassbool True
ignore_cofactorsbool 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)

Parameters:
NameTypeDefault valueDescription
include_biomassbool True
ignore_cofactorsbool 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

Parameters:
NameTypeDefault valueDescription
include_biomassbool True
ignore_cofactorsbool 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)

Parameters:
NameTypeDefault valueDescription
ignore_cofactorsbool False
Return type:
DataFrame
CREATE_STOICHIOMETRIC_MATRIX

Create the full stoichiometric matrix of the network

Return type:
DataFrame
DUMPS

Dumps the network

Parameters:
NameTypeDefault valueDescription
refresh_layoutbool False
Return type:
NetworkDict
FLATTEN_COMPARTMENT_ID

Flatten the id of a compartment

Parameters:
NameTypeDefault valueDescription
compartmentCompartment
Return type:
str
FLATTEN_COMPOUND_ID

Flatten the id of a compound

Parameters:
NameTypeDefault valueDescription
compCompound
Return type:
str
FLATTEN_REACTION_ID

Flatten the id of a reaction

Parameters:
NameTypeDefault valueDescription
rxnReaction
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.

Parameters:
NameTypeDefault valueDescription
comp_idstr 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.

Parameters:
NameTypeDefault valueDescription
chebi_idstr The chebi id of the compound ``
compartmentUnion[str, NoneType] None The compartment of the compound `str`
Return type:
List
GET_COMPOUNDS_BY_COMPARTMENTS

Get the compounds in a compartments

Parameters:
NameTypeDefault valueDescription
compartment_listList 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

Parameters:
NameTypeDefault valueDescription
ignore_cofactorsbool 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.

Parameters:
NameTypeDefault valueDescription
ec_numberstr The ec number of the reaction ``
Return type:
Reaction
GET_REACTION_BY_ID

Get a reaction by its id.

Parameters:
NameTypeDefault valueDescription
rxn_idstr The reaction id ``
Return type:
Reaction
GET_REACTION_BY_RHEA_ID

Get a reaction by its rhea id.

Parameters:
NameTypeDefault valueDescription
rhea_idstr 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

Parameters:
NameTypeDefault valueDescription
ignore_cofactorsbool 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

Parameters:
NameTypeDefault valueDescription
keystr 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

Parameters:
NameTypeDefault valueDescription
networkNetwork
inplacebool False
REACTION_EXISTS

Check that a reaction exists in the network

Parameters:
NameTypeDefault valueDescription
rxnReaction The reaction `gws.gena.`
Return type:
bool
REMOVE_COMPOUND

Remove a compound from the network

Parameters:
NameTypeDefault valueDescription
comp_idstr The id of the compound to remove ``
REMOVE_REACTION

Remove a reaction from the network

Parameters:
NameTypeDefault valueDescription
rxn_idstr The id of the reaction to remove ``
SET_SIMULATIONS

Set simulations

Parameters:
NameTypeDefault valueDescription
simulationsDict
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

Parameters:
NameTypeDefault valueDescription
tag_idAny
tag_datadict
UPDATE_EC_RECON_TAG

Set a ec recon tag

Parameters:
NameTypeDefault valueDescription
tag_idAny
tag_datadict
UPDATE_REACTION_RECON_TAG

Set a reaction recon tag

Parameters:
NameTypeDefault valueDescription
tag_idAny
tag_datadict
VIEW_AS_JSON

View as json

Parameters:
NameTypeDefault valueDescription
paramsConfigParams
Return type:
JSONView
VIEW_AS_TABLE

View as table

Parameters:
NameTypeDefault valueDescription
_ConfigParams
Return type:
TableView
VIEW_COMPOUND_STATS_AS_TABLE

View compound stats as table

Parameters:
NameTypeDefault valueDescription
_ConfigParams
Return type:
TableView
VIEW_GAPS_AS_TABLE

View gaps as table

Parameters:
NameTypeDefault valueDescription
_ConfigParams
Return type:
TableView