Documentation read from 04/17/2019 22:06:43 version of /vol/public-pseed/FIGdisk/dist/releases/cvs.1555556707/common/lib/ModelSEED/FBAMODEL.pm.
This file contains the functions and utilities used by the FBAMODEL Server (MODEL_server.cgi). The "Primary Methods" represent function calls direct to the server. These all have a signature similar to the following.
my $document = FBAMODEL->function_name($args);
where $MODELservObject
is an object created by this module, $args
is a parameter structure, and function_name
is the FBAMODEL Server function name. The output is a structure.
Definition: FBAMODEL::FBAMODEL object = FBAMODEL->new();
Description: Creates a new FBAMODEL function object. The function object is used to invoke the server functions.
Definition:
FIGMODEL::figmodel object = FBAMODEL->figmodel();
Description:
Returns the FIGMODEL object required to get model data from the server
Definition:
FIGMODEL::figmodel object = FBAMODEL->methods();
Description:
Returns a list of the methods for the class
Definition:
FIGMODEL::figmodel object = FBAMODEL->configure_environment();
Description:
Configures the environment of for the MFAToolkit
Definition:
FIGMODEL::figmodel object = FBAMODEL->authenticate_user( { user => string:username,password => string:password} );
Description:
Determines if user data was input and points to a valid account
Definition:
{key=>value} = FBAMODEL->process_arguments( {key=>value},[string:mandatory arguments] );
Description:
Processes arguments to authenticate users and perform other needed tasks
Definition:
{error=>error message} = FBAMODEL->error_message({message* => string:error message,args* => {}:argument hash});
Description:
Returns the errors message when FBAMODEL functions fail
Definition:
{ string::model ids => [string::reaction ids] } = FBAMODEL->get_reaction_id_list( {"id" => [string::model id] } );
Description:
Takes as input a hash with key "id" pointing to a list of model IDs. If no ids are input or if the id "ALL" is submitted, this function will return a list of all reaction IDs in the database. Returns a hash with the model IDs as keys pointing to arrays of the reaction IDs in the models.
Example:
my $ConfigHashRef = { "id" => ["Seed83333.1", "iJR904"] }; my $resultsHashRef = $FBAModel->get_reaction_id_list($ConfigHashRef); $resultsHashRef == { "iJR904" => [ "rxn00001", "rxn00002", ...], "Seed83333.1" => [ "rxn00003", "rxn00007", ...], }
Definition:
{ string::reaction ids => { string::keys => [ string::data ] } } = FBAMODEL->get_reaction_data( { "id" => [string::reaction ids], "model" => [string::model ids] } );
Description:
Takes as input a a hash with key "id" pointing to a list of reaction IDs and (optionally) the key "model" pointing to a list of model ids.
Returns a hash with the input IDs as keys pointing to hashes with the reaction data. The keys in the reaction data hash are "DATABASE" pointing to the reaction ID, "NAME" pointing to an array of reaction names, "EQUATION" pointing to the reaction stoichiometry, "ENZYME" pointing to an array of reaction EC numbers, "PATHWAY" pointing to an array of the metabolic pathways the reaction is involved in, "REVERSIBILITY" pointing to the predicted reversibility for the reaction, "DELTAG" pointing to the predicted gibbs free energy change of the reaction, "DELTAGERR" point to the uncertainty in the predicted free energy change, and "KEGGID" pointing to the ID of the reaction in the KEGG database.
Example:
my $configHashRef = { "id" => ["rxn00001","rxn00002"...], "model" => ["iJR904","Seed83333.1"] }; my $resultHashRef = $FBAmodel->get_reaction_data($configHashRef); $resultHashRef == { "rxn00001" => { "DATABASE" => ["rxn00001"], "EQUATION" => ["A + B => C + D"], "Seed83333.1" => {"DIRECTIONALITY" => ["<="], "COMPARTMENT" => ["c"], "ASSOCIATED PEG" => ["peg.1+peg.2","peg.30"], }, "rxn00002" => ..., }
Definition:
{string:model id => { string::keys => [ string::data ]} } = FBAMODEL->get_reaction_data({"model" => [string::model ids]});
Description:
Takes as input a list of model IDs for which biomass reaction data will be returned.
Returns a hash with the input IDs as keys pointing to hashes with the reaction data. The keys in the reaction data hash are "DATABASE" pointing to the reaction ID, "NAME" pointing to an array of reaction names, "EQUATION" pointing to the reaction stoichiometry, "ENZYME" pointing to an array of reaction EC numbers, "PATHWAY" pointing to an array of the metabolic pathways the reaction is involved in, "REVERSIBILITY" pointing to the predicted reversibility for the reaction, "DELTAG" pointing to the predicted gibbs free energy change of the reaction, "DELTAGERR" point to the uncertainty in the predicted free energy change, and "KEGGID" pointing to the ID of the reaction in the KEGG database.
Example:
my $input = { "model" => ["iJR904","Seed83333.1"]}; my $result = $FBAmodel->get_reaction_data($configHashRef);
Definition:
{ string::model id => [string::compound ids] } = FBAMODEL->get_compound_id_list({"id" => [string::model id]});
Description:
Takes as input a hash with the key "id" pointing to a list of model IDs. If no ids are input or if the id "ALL" is submitted, this function will return a list of all compound IDs in the database.
Returns a hash with the input IDs as keys pointing to arrays of the compound IDs in the models.
Example:
my $configHashRef = { "id" => ["Seed83333.1", "iJR904"] }; my $retValHashRef = $FBAModel->get_compound_id_list($configHashRef); $retValHashRef == { "iJR904" => ["cpd00001", "cpd00002", ...], "Seed83333.1" => ["cpd00003", "cpd00007"], }
Definition:
{ string::compound ids => { string::keys => [ string::data ], } } = FBAMODEL->get_compound_data( { "id" => [string::compound ids], "model" => [string::model ids] } );
Description:
Takes as input a hash with the key "id" pointing to a list of compound IDs and (optionally) the key "model" pointing to a list of model ids.
Returns a hash with the input IDs as keys pointing a hash with the compound data. The keys in the compound data hash are "DATABASE" pointing to the ID of the compound in the database, "NAME" pointing to an array of names for the compound, "FORMULA" pointing to the molecular formula of the compound at pH7, "CHARGE" pointing to the charge of the compound at pH7, "STRINGCODE" pointing to a unique string that encodes the compound structure, and "KEGGID" pointing to an array of KEGG ID for the compound. The key "GROUPING" may also be included, in which case we check to see if each id has an entry in the abstract grouping table, and return the associated data if true.
Example:
my $configHashRef = { "id" => ["rxn00001", "rxn00002", ...], "model" => ["iJR904", "Seeed83333.1", ...] }; my $retValHashRef = $FBAModel->get_compound_data($configHashRef); $retValHashRef == { "rxn00001" => { "DATABASE" => ["rxn00001"], "EQUATION" => ["A + B => C + D"], "Seed83333.1" => { "DIRECTIONALITY" => ["<="], "COMPARTMENT" => ["c"], "ASSOCIATED PEG" => ["peg.1+peg.2","peg.30"], } } }
Definition: [string::media ids] = FBAMODEL->get_media_id_list();
Description:
Takes no input. Returns an array reference of the IDs for all media formulations stored in the SEED biochemistry database. These are the only media formulations on which flux balance analysis may be performed.
Example:
my $media = $FBAModel->get_media_id_list(); @$media == [ "ArgonneLBMedia", "Carbon-D-Glucose", ...];
Definition:
{ string::media ids => { string::key => [string::data] } } = FBAMODEL->get_media_data({"id" => [string::media ids] });
Description:
Takes as input a hash with the key "id" pointing to an array of media ids. Returns a hash with the media ids pointing to a hash containing the media data.
Example:
my $media = ["Carbon-D-Glucose", "ArgonneLBMedia"]; my $retValHashRef = $FBAModel->get_media_data($media); $retValHashRef == { "Carbon-D-Glucose" => { "Compounds" => [ "cpd00001", "cpd00002", ...], "Compartments" => ["e", "e", ...], "Max" => [ 100, 100, ...], "Min" => [ -100, -100, ...], }, "ArgonneLBMedia" => { ... }, }
Definition: [string::model ids] = FBAMODEL->get_metabolic_models( {"user" => string, "password" => string "growth" => bool, "genome" => string, } )
Description: Returns a list of metabolic model Ids that satisfy the given conditions: If username and password are provided, includes all models owned by the authenticated user. Returns no private models if authentication fails. If "growth" is true, only returns models that are growing; this eliminates all models that are currently incomplete or still in the process of being built. If "genome" is supplied, returns only models for a specific genome.
Definition:
[string::model ids] = FBAMODEL->get_model_id_list( {"user" => string, "password" => string} );
Description: Takes as input a hash with the key "user" pointing to the username of a RAST account and the key "password" pointing to the password from the same RAST account.
Returns an array containing the names of all models owned by the user. If no input is provided, the function returns an array containing the names of all public models.
Definition:
{data => [{ string:key => string:value }] } = FBAMODEL->get_model_stats( { "id" => [string:model ids] "user" => string, "password" => string, }); Description:
Give it a list of model ids. Returns a list of key-value pair statisics, one for each model.
Definition:
{ string::model ids => { string::key => [string::data] } } = FBAMODEL->get_model_data( { "id" => [string::model ids], "user" => string, "password" => string, } );
Description:
Takes as input a hash with the key "id" pointing to an array of model ids and the optional key "user" pointing to a RAST account along with the key "password" pointing to the password for the RAST account,
Returns a hash with the model ids as keys pointing to a hash containing the model data. User ID and password must be provided to access data for private models.
Example:
my $inputHashRef = { "id" => ["Seed83333.1", "iJR904"], "user" => "Alice", "password" => "eval", }; my $retValHashRef = $FBAModel->get_model_data($inputHashRef); $retValHashRef == { "Seed83333.1" => { "Genome" => "83333.1", "Name" => "E. coli", "Source" => "SEED"...}, ...}
Definition:
$output = FBAMODEL->get_model_reaction_data($input); $input = { id => string:model ID, ID of model to be accessed. Mandatory argument. user => string:username, RAST username. Mandatory only for private models. password => string:password, RAST password. Mandatory only for private models. -abbrev_eq => 0/1, "1" requests printing of equations with abbreviations. Optional with default of "0". -name_eq => 0/1, "1" requests printing of equations with abbreviations. Optional with default of "0". -id_eq => 0/1, "1" requests printing of equations with abbreviations. Optional with default of "0". -direction => 0/1, "1" requests printing of equations with abbreviations. Optional with default of "1". -compartment => 0/1, "1" requests printing of equations with abbreviations. Optional with default of "1". -pegs => 0/1, "1" requests printing of equations with abbreviations. Optional with default of "1". -roles => 0/1, "1" requests printing of roles associated with reaction. Optional with default of "0". -notes => 0/1, "1" requests printing of equations with abbreviations. Optional with default of "0". -reference => 0/1} "1" requests printing of equations with abbreviations. Optional with default of "0". $output = { string:model ID => [{DATABASE => [string:reaction ID], ABBREVIATION EQ => [string:reaction equation with compound abbreviation], NAME EQ => [string:reaction equation with compound names], DIRECTION => [string:direction of reaction], COMPARTMENT => [string:compartment of reaction], PEGS => [string:sets of genes forming complexes that catalyze reaction], NOTES => [string:notes for reaction in model], REFERENCE => [string:literature reference for reaction]}]};
Description:
This function is used to obtain a table of data relating to all reactions included in a metabolic model. The arguments specify what data should be included in the output. Username and password must be provided to obtain data for private models.
$results = FBAMODEL->get_model_essentiality_data($arguments); $arguments = {"model" => [string]:model ids, "user" => string:user login, "password" => string:password} $results = {string:model ids => {string:media ids => {"essential" => [string]:gene ids} } }
Returns available gene essentiality predictions for the input set of models.
$results = FBAMODEL->get_experimental_essentiality_data($arguments); $arguments = {"genome" => [string]:genome ids, "user" => string:user login, "password" => string:password} $results = {string:genome ids => {string:media ids => {"essential" => [string]:gene ids, "nonessential" => [string]:gene ids} } }
Returns available gene essentiality data for the input set of genomes.
$results = FBAMODEL->fba_calculate_minimal_media($arguments); $arguments = {model" => string:model id, geneKO => [string]:list of genes to be knocked out in study, reactionKO => [string]:list of reactions to be knocked out in study, numFormulations => integer:number of distinct formulations that should be calculated, user => string:user login, password => string:password} $results = {essential => [string]:compound ids, nonessential => [[string]]:compound ids}}
Identifies minimal media formulations for the input models.
{ string::model IDs => [ reaction => [string::reaction ID], media => [string::media IDs], class => [string::essential|active|inactive|dead], class_directionality => [string::=>|<=|<=>], min_flux => [double], max_flux => [double] ] } = FBAMODEL->get_model_reaction_classification_table( { model => [string::model ids], user => string::username, password => string::password } );
my $returnArrayRef = $FBAModel->get_model_reaction_classification_table($configHash);
Where $configHash
is a hash reference with the following syntax:
my $configHash = { "model" => [ "Seed83333.1", "iJR904.1" ], "user" => "bob", "password" => "password123", });
$returnArrayRef
is a hash reference with model ID strings as keys. The value of each model ID is an array reference with the following syntax:
"reaction" => an array reference with one element, the string of the reaction id. "media" => an array reference containing media ID strings. "class" => an array reference of the class of the reaction, ordered by the media condition column. "class_directionality" => an array reference of the class of the reaction, ordered by the media condition column. "min_flux" => minimum flux through each reaction in each media condition in the media colum. "max_flux" => maximum flux through each reaction in each media condition in the media column.
This function naturally pairs with the classify_model_entities()
function which runs new classification analysis on additional media conditions and adds the output to the archived table of classifications if the $archiveResults
tag is set to. The function accepts as input a hash with the key "model" pointing to an array of model IDs for which classification tables should be returned. The function returns a hash with the model IDs acting as the keys pointing to a table of classification data.
Definition:
[ { id => string, media => string, reactionKO => string, geneKO => string, entities => [ string::reaction and transportable compounds ids], classes => [string::classes], "min flux" => [float::minimum flux], "max flux" => [float::maximum flux] } ] = FBAMODEL->classify_model_entities( { "parameters" => [ { id => string, media => string, reactionKO => [string::reaction ids], geneKO => [string::gene ids], archiveResults => [0|1], } ], "user" => string, "password" => string });
Description:
Takes as input a hash with the key "parameters" pointing to an array of hashes with analysis parameters, the key "user" pointing to the username associated with a RAST account, and the key "password" pointing to the password associated with the RAST account.
The analysis parameters are stored in hashes where the keys are the parameter names pointing to the parameter values. Only one parameter is required: "id" pointing to the name of the model to be analyzed. Optional parameters include "media" pointing to the name of the media for the simulation (default is complete media), "reactionKO" pointing to a ";" delimited list of reactions to be knocked out (default is no reactions knocked out), and "geneKO" pointing to a ";" delimited list of the genes to be knocked (default is no genes knocked out).
Returns an array of the input analysis parameters with the additional key values "entities" (which points to an array of the reactions and transportable compounds in the model), "classes" (which points to an array of the class each reaction/compound was assigned to), "max flux" (which points to an array of the maximum possible flux through each reaction/compound), and "min flux" (which points to an array of the minimum possible flux through each reaction/compound)
If the "entities" key is undefined in the output, this means the specified model did not grow in the specified conditions.
Example:
my $ConfigHashRef = {"model" => [{"id" => "Seed83333.1", "media" => "Carbon-D-Glucose", "reactionKO" => "rxn00001;rxn00002", "geneKO" => "peg.1,peg.2"}], "user" => "reviewer", "password" => "eval"}; my $retValArrayRef = $FBAModel->classify_model_entities($ConfigHashRef); $retValArrayRef == [{ "id" => "Seed83333.1", "media" => "Carbon-D-Glucose", "reactionKO" => "rxn00001;rxn00002", "geneKO" => "peg.1,peg.2", "reactions" => ["rxn00001","rxn00002"....], "classes" => ["essential =>","essential<=",...], "max flux" => [100,-10...], "min flux" => [10,-100...], }]
[ { id => string, media => string, reactionKO => string, geneKO => string, "essential genes" => [string::peg ids], "nonessential genes"=> [string::peg ids], } ] = MODELserv->simulate_all_single_gene_knockout( { "parameters" => [ { id => string, media => string, reactionKO => string, geneKO => string, } ], "user" => string, "password" => string });
Takes as input a hash with the key "parameters" pointing to an array of hashes with analysis parameters, the key "user" pointing to the username associated with a RAST account, and the key "password" pointing to the password associated with the RAST account.
The analysis parameters is a hash reference containing the following required and optional key/value pairs:
"id" pointing to the string ID of the model to be analyzed. (Required)
"media" pointing to the name of the media for the simulation (default is complete media).
"reactionKO" pointing to a ";" delimited list of reactions to be knocked out (default is no reactions knocked out).
"geneKO" pointing to a ";" delimited list of the genes to be knocked (default is no genes knocked out).
Returns an array of the input analysis parameters with the additional key values are "essential genes" and "non essential genes" If the "essential genes" and "nonessential genes" keys are undefined in the output, this means the specified model did not grow in the specified conditions.
my $configHashRef = { "parameters" => [{ "id" => "Seed83333.1", "media" => "Carbon-D-Glucose", "reactionKO" => "rxn00001;rxn00002", "geneKO" => "peg.1,pge.2"}], "user" => "bob", "password" => "password123", }; my $retValArrayRef = $FBAModel->simulate_all_single_gene_knockout($configHashRef); $retValArrayRef == [ {"id" => "Seed83333.1", "media" => "Carbon-D-Glucose", "reactionKO" => "rxn00001;rxn00002", "geneKO" => "peg.1,peg.2", "essential genes" => ["peg.10","peg.45"...], "nonessential genes" => ["peg.1", "peg.2"...], }]
[ { id => string, media => string, reactionKO => string, geneKO => string, growth => double, entities => [ string::reaction or transportable compounds ids], fluxes => [double] } ] = FBAMODEL->simulate_model_growth( {"parameters" => [ { id => string, media => string, reactionKO => string, geneKO => string, } ], "user" => string, "password" => string, } );
Takes as input a hash with: the key "parameters" pointing to an array of hashes with analysis parameters, the key "user" pointing to the username associated with a RAST account, and the key "password" pointing to the password associated with the RAST account.
This is a hash reference with the following keys:
id : The string ID of the model to be analyzed. Required.
media : The name of the media for the simulation (default is complete media).
reactionKO : A ";" delimited list of reactions to be knocked out (default is no reactions knocked out).
geneKO : A ";" delimited list of the genes to be knocked (default is no genes knocked out).
Returns an array of the input analysis parameters with the additional key values "growth" (which points to a float with the optimal growth of the model in the specified conditions), "entities" (which points to the reactions and transportable compounds in the model), and "fluxes" (which points to the flux through each reaction).
my $configHash = {"parameters" => [ { "id" => "Seed83333.1", "media" => "Carbon-D-Glucose", "reactionKO" => "rxn00001;rxn00002", "geneKO" => "peg.1,peg.2", } ], "user" => "alice", "password" => "password123"}; my $arrayRefRetVal = $FBAModel->simulate_model_growth($configHash);
{}:Output = FBAMODEL->subsystems_of_reaction->({reactions => [string]:reaction IDs}) Output:{string:reaction ID => [string]:subsystems}
Returns a list of the subsystems the reaction is involved in
{}:Output = FBAMODEL->metabolic_neighborhood_of_roles->({ids => [string:role name]}) Output:{string:role ID => {string:metabolite IDs => [string]:neighboring functional roles based on this metabolite}}
Identifies the functional roles associated with reactions that neighbor the input functional role. Output is organized by the metabolite linking the two roles together.
{}:Output = FBAMODEL->modelseed_roles->({}) Output:{string:roles => [string]:role names}
Returns the list of roles mapped to reactions in the ModelSEED.
{}:Output = FBAMODEL->gapfilled_roles->({ids => [string]:genome or model IDs}) Output:{string:genome ID => {string:role name => [string]:gapfilled reactions}}
Returns the hash of the gapfilled roles for the input genome or model, where the keys are the role names, and the values are the array of gapfilled reactions. If a genome is specified, the default SEED model is used.
string:error message = FBAMODEL->rename_functional_role({originalRoleName => string, newRoleNames => [string], keepOriginal => 0/1, user => string, password => string});
Changes the name of the input "originalRoleName" to one or more new names input as an array in "newRoleNames". If multiple names are input, all mappings involving the original functional role are replicated. If the input flage "keepOriginal" exists and is set to "1", then new roles are created with the new names while the orignal role is retained. All mappings with the original role are retained but also copied with the new names. This is an administrative function with access limited to Model SEED administrators.
string:error message = FBAMODEL->add_functional_role_mapping({roles => [string]:role names,roletypes => [string]:global/local,reactions => [string]:reaction IDs, user => string, password => string});
Creates a new functional role mapping in the database.
{string:role name=>[string]:peg ID} = FBAMODEL->pegs_of_function({roles => [string]:role names});
Returns a hash of the pegs associated with each input functional role.
[ $groupObj ] FBAMODEL->get_abstract_reaction_groups()
Description: Returns an array of all existing abstract reaction groups.
[ $groupObj ] FBAMODEL->get_abstract_compound_groups()
Description: Returns an array of all existing abstract compound groups.
Hey! The above document had some coding errors, which are explained below:
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
'=item' outside of any '=over'
You forgot a '=back' before '=head3'
Unknown directive: =head