Input / output#
MATLAB functions in GECKO/src/io of the GECKO toolbox.
Functions#
Function |
Summary |
|---|---|
Load the conventional GEM (non-ecModel). |
|
Load the ecModel that matches the modelAdapter. |
|
Load total protein measurements and exchange flux data. |
|
Load absolute proteomics data and average over replicates. |
|
Save an ecModel in YAML and/or SBML format. |
Reference#
loadConventionalGEM#
function model = loadConventionalGEM(varargin)
Load the conventional GEM (non-ecModel).
Loads the conventional GEM (non-ecModel) from the location specified in the modelAdapter. By default, it looks in the models/ subdirectory of the param.path specified in the modelAdapter. When loading conventional GEMs from other locations, one can directly use importModel.
Name-Value Arguments
filename: charname of the model file, without extension, located in the models/ subfolder of param.path as specified in the modelAdapter; it is loaded as SBML (.xml) (default: the value specified as param.convGEM in the modelAdapter, which may instead point to a YAML file).
modelAdapter: ModelAdaptera loaded model adapter, from where the model folder is read (default: the current default model adapter).
Returns
model: structmodel in RAVEN format.
Examples
% optional arguments may be given positionally or as name-value pairs:
model = loadConventionalGEM(filename, modelAdapter);
model = loadConventionalGEM('filename', filename);
See also
loadEcModel
loadEcModel#
function model = loadEcModel(varargin)
Load the ecModel that matches the modelAdapter.
Loads the ecModel that matches the modelAdapter. By default, it loads the models/ecModel.yml in the directory specified as param.path in the modelAdapter. Alternative files in the same folder can be loaded by providing the appropriate filename. If loading models from other locations, one can directly use readYAMLmodel.
An ecModel whose protein usage and pool reactions run in the GECKO 3 direction is upgraded in the loaded model with upgradeEcModel, with a warning. An ecModel format (gecko_format in the file's metaData, see saveEcModel) above 4 is an error.
Name-Value Arguments
filename: charname of the ecModel file (default 'ecModel.yml'). File should be located in the models/ subfolder of param.path as specified in the modelAdapter.
modelAdapter: ModelAdaptera loaded model adapter, from where the model folder is read (default: the current default model adapter).
Returns
model: structan ecModel (with ecModel.ec structure).
Examples
% optional arguments may be given positionally or as name-value pairs:
model = loadEcModel(filename, modelAdapter);
model = loadEcModel('filename', filename);
See also
loadConventionalGEM, saveEcModel
loadFluxData#
function fluxData = loadFluxData(varargin)
Load total protein measurements and exchange flux data.
Loads total protein content and exchange flux data (e.g. carbon source, O2, CO2) from a tab-delimited file.
Name-Value Arguments
fluxDataFile: charpath to file with flux data (default reads data/fluxData.tsv as specified in modelAdapter).
modelAdapter: ModelAdaptera loaded model adapter (default: the current default model adapter).
Returns
fluxData: structstructure with flux data.
Notes
The fluxData structure has the following fields:
conds : sampling condition.
Ptot : total protein (g/gDCW).
grRate : growth rate (1/h).
exchFluxes : exchange fluxes (mmol/gDCWh).
exchMets : exchanged metabolites, matching exchFluxes.
exchRxnIDs : exchange reaction IDs, matching exchMets.
evotuneRMSEweight : if column existed in fluxData.tsv, weights for RMSE calculation in evotune kcat tuning.
source : if column existed in fluxData.tsv, description where the data comes from.
Examples
% optional arguments may be given positionally or as name-value pairs:
fluxData = loadFluxData(fluxDataFile, modelAdapter);
fluxData = loadFluxData('fluxDataFile', fluxDataFile);
See also
loadProtData
loadProtData#
function protData = loadProtData(replPerCond, varargin)
Load absolute proteomics data and average over replicates.
Loads absolute proteomics data (in mg/gDCW) and returns mean values across replicates for each condition in the data file. By default it also filters the data by various criteria, to remove uncertain data (see input parameters).
Parameters
replPerCond: doublevector with number of replicates for each condition in the dataset. Example: [3, 2] if first condition has triplicates and second condition has duplicates.
Name-Value Arguments
protDataFile: charpath to file with proteomics data, where protein levels are in mg/gDCW (default reads data/proteomics.tsv as specified in modelAdapter). Alternatively, protDataFile can be a protData structure that was previously made by loadProtData.
filterData: logicalwhether abundances should be filtered. If false, minVal, maxRSD, maxMissing, cutLowest and addStdevs are not considered (default true).
modelAdapter: ModelAdaptera loaded model adapter (default: the current default model adapter).
minVal: doubleminimum mean protein measurement per condition; proteins with a lower mean abundance are discarded (set to NaN) for that condition (default 0, i.e. no lower threshold).
maxRSD: doublemaximum relative standard deviation (RSD, the standard deviation across replicates divided by their mean) allowed per condition; proteins exceeding it are discarded (set to NaN) for that condition (default 1, i.e. RSD up to 100%).
maxMissing: doubleminimum fraction of replicates within a condition that must have a measured value; proteins with fewer present replicates than this fraction requires are discarded (set to NaN) for that condition (default 2/3, i.e. at least two of three replicates must have a value). If conditions have different number of replicates (as indicated in replPerCond), maxMissing can also be a vector of the same length as replPerCond, with individual values per condition.
cutLowest: doublepercentage of lowest mean values per condition to be discarded (not considering NaN values) (default 5).
addStdevs: doublehow many standard deviations should be added to the mean value of each protein measurement across replicates, broadening the confidence interval (default 1).
Returns
protData: structstructure with (filtered) proteome data.
Notes
The protData structure has the following fields:
uniprotIDs : cell array with Uniprot IDs matching protData.abundances.
abundances : matrix of proteomics data, where each column contains mean abundances per condition.
Examples
% optional arguments may be given positionally or as name-value pairs:
protData = loadProtData(replPerCond, protDataFile, filterData, modelAdapter, minVal, maxRSD, maxMissing, cutLowest, addStdevs);
protData = loadProtData(replPerCond, 'filterData', false);
See also
loadFluxData
saveEcModel#
function saveEcModel(ecModel,varargin)
Save an ecModel in YAML and/or SBML format.
Saves the ecModel in either YAML format (= default and preferred, as all ecModel content is reserved) and/or SBML format (= more widely compatible with other constraint-based modelling tools, can be used for running simulations like FBA etc., but this model cannot be loaded back into MATLAB for applying further GECKO functions, as model.ec is lost).
A YAML file records its ecModel format (gecko_format, see loadEcModel) and the GECKO release that wrote it (generator) in its metaData, in place of the geckopy_version that earlier geckopy releases wrote.
The ecModel is saved to the ecModel-specific models/ subfolder. For saving to other locations, writeYAMLmodel or exportModel are more suitable.
Parameters
ecModel: structan ecModel (with ecModel.ec structure).
Name-Value Arguments
filename: charending with either .yml or .xml, specifying if the ecModel should be saved in YAML or SBML file format. If no file extension is given, the ecModel will be saved in YAML format. If no filename is given, 'ecModel.yml' is used.
modelAdapter: ModelAdaptera loaded model adapter, from where the model folder is read (default: the current default model adapter).
Examples
% optional arguments may be given positionally or as name-value pairs:
saveEcModel(ecModel,filename,modelAdapter);
saveEcModel(ecModel,'filename',filename);
See also
loadEcModel