Allow to recover all the informations of the padmet file.
The section Data Base informations corresponds to the self.info
The section Nodes corresponds to the data of each nodes in self.dicOfNode, sep =” ”
The section Relations corresponds to the data of each relations in self.dicOfRelationIn/Out, sep =” “

Initialize a padmetRef from sbml. Copy all species, convert id with sbmlPlugin
stock name in COMMON NAME. Copy all reactions,
convert id with sbmlPlugin, stock name in common name, stock compart and stoichio data relative
to reactants and products in the misc of consumes/produces relations

PadmetSpec is an object representing the metabolic network of a species(organism)
based on a reference database PadmetRef.
contains <Policy>, <Node> and <Relation>
The policy defines the way Node and Relation are associated
A node is an Object that contains information about an element of the network
(can be a pathway, reaction…).
A relation defines how two nodes are connected. In a relation there is
a node “in” and a node “out”. (reactionX’in’ consumes metaboliteX’out’)
PadmetSpec contains 3 attributes:

Allow to recover all the information of the padmet file.
The section Data Base information corresponds to the self.info
The section Nodes corresponds to the data of each nodes in self.dicOfNode, sep =” ”
The section Relations corresponds to the data of each relations in self.dicOfRelationIn/Out, sep =” “

Summurizes the network in a folder (output_dir) of 4 files.
all_pathways.csv: report on the pathways of the network.
PadmetRef is used to recover the total reactions of a pathways. (sep = ” “)
line = dbRef_id, Common name, Number of reactions found,

Total number of reaction, Ratio (Reaction found / Total)

all_reactions.csv: report on the reactions of the network. (sep = ” “)
line = dbRef_id, Common name, formula (with id),

formula (with common name), in pathways, associated genes, sources

all_metabolites.csv: report on the metabolites of the network. (sep = ” “)
line = dbRef_id, Common name, Produced (p), Consumed (c), Both (cp)
all_genes.csv: report on the genes of the network. (sep= ” “)
line = “id”, “Common name”, “linked reactions”

Copy data from sbml to padmet. If the id of the sbml are
different with the padmetRef, need to add a dictionary of associations
between the id in the sbml and the id of the database of reference.
if no padmetRef, will create reactions and compounds based on the given sbml
@param sbml_file: pathname of the sbml file
@param padmetRef: <PadmetRef> padmet of reference.
@param mapping_dict (opt): pathname of the file containing the
association original_id ref_id, sep =” ”
@param verbose: print info
@param force: if true, allow to copy reactions that are not in padmetRef
by creating new reaction
@type sbml_file, assocIdOriginRef: str
@type padmetRef: PadmetRef
@type verbose, force: bool
@return: _
@rtype: None

Allows to update miscellaneous data of a Node.
@param node_id: the id of node to update
@param data: tuple with data[0] refers to the miscellaneous data key
(ex: common_name, direction …), data[1] is a list of value to add / update.
data[1] can be None if the action is to pop the key
@param action: if == “add”: the list data[1] will be added (ex: adding a common_name)
if == “remove”: if data[1] is not None, the list data[1] will
be removed (ex: remove just one specific common_name)
if == “update”:data[1] is the new value of the key data[0]
ex: updateNode(‘RXN-5’,(‘direction’,[‘LEFT-TO-RIGHT’]),update). The
reaction’ direction will be change to left2right

Parameters:

node_id (str) – the id of the node to update

data (tuple) – tuple of data to update, data[0] is the key, data[1] is a value, list or None