Fluxomics¶
- C13ConfidenceInterval(v0, expdata, model, max_score, directions, majorIterationLimit)¶
USAGE:
[vs, output, v0] = C13ConfidenceInterval(v0, expdata, model, max_score, directions, majorIterationLimit)
- INPUTS:
v0: set of flux vectors to be used as initial guesses. They may be valid or not. expdata: experimental data model: the standard model. Additional field .N (= null(S)) should also
be provided. This is a basis of the flux space.
max_score: maximum allowable data fit error
- OPTIONAL INPUTS:
- directions: ones and zeros of which reactions to compute (size = n x 1) or numbers of reactions to use aka. [1; 5; 7; 8; 200] or
reaction strings aka. {‘GPK’, ‘PGL’}. Ratios are possible with this input only. Default = [] meaning - do FVA with no ratios.
majorIterationLimit: default = 10000
- OUTPUT:
vs: matrix output: structure v0: as in input
- compareBinsOfFluxes(xglc, model, sammin, sammax, metabolites)¶
Takes the overall sammin and sammax samples, bins them into separate bin sizes and compares them, then compares the results to the largest bin size. calls [totalz, zscore, mdv1, mdv2] = compareTwoSamp(xglc, model, samp1, samp2, measuredMetabolites) sammin and sammax each contain bins of fluxes in x.samps(r,1).points
USAGE:
[output] = compareBinsOfFluxes(xglc, model, sammin, sammax, metabolites)
- INPUTS:
xglc: sugar distribution model: model structure sammin: samples containing bins of fluxes sammax: samples containing bins of fluxes
- OPTIONAL INPUT:
metabolites: list of metabolites
- OUTPUT:
output: result of comparison
- compareMultSamp(xglc, model, samps, measuredMetabolites)¶
Compare the multiple sets of samples
USAGE:
[totalz, zscore, mdvs] = compareMultSamp(xglc, model, samps, measuredMetabolites)
- INPUTS:
xglc: sugar distribution, a random sugar distribution is calculated if empty model: model structure, expects model.rxns to contain a list of rxn names samps: samples, expects to have a field named points containing an array of sampled points
- OPTIONAL INPUT:
measuredMetabolites: parameter fed to calcMDVfromSamp.m which only calculates the MDVs for the metabolites listed in this array
- OUTPUTS:
totalz: sum of all zscores zscore: calculated difference for each mdv element distributed across all the points mdvs: contains fields:
mdv - the calculated mdv distribution converted from the idv solved from each point contained in their respective samples sampX
names - the names of the metabolites
ave - the average of each mdv element across all of the points
stdev - the standard dev for each mdv element across all points
- compareTwoMDVs(mdv1, mdv2)¶
Compares the 2 sets of mdvs
USAGE:
[totalz, zscore] = compareTwoMDVs(mdv1, mdv2)
- INPUT:
mdv1, mdv2: contains fields:
mdv - the calculated mdv distribution converted from the idv solved from each point contained in their respective samples sampX
names - the names of the metabolites
ave - the average of each mdv element across all of the points
stdev - the standard dev for each mdv element across all points
- OUTPUTS:
totalz: sum of all zscores zscore: calculated difference for each mdv element distributed across all the points
- compareTwoSamp(xglc, model, samp1, samp2, measuredMetabolites)¶
Compare the 2 sets of samples
USAGE:
[totalz, zscore, mdvs] = compareMultSamp(xglc, model, samps, measuredMetabolites)
- INPUTS:
xglc: sugar distribution, a random sugar distribution is calculated if empty model: model structure, expects model.rxns to contain a list of rxn names samp1, samp2: samples, expects samp1 and samp2 to have a field named points containing an array of sampled points
- OPTIONAL INPUT:
measuredMetabolites: parameter fed to calcMDVfromSamp.m which only calculates the MDVs for the metabolites listed in this array
- OUTPUTS:
totalz: sum of all zscores zscore: calculated difference for each mdv element distributed across all the points mdv1, mdv2: contains fields:
mdv - the calculated mdv distribution converted from the idv solved from each point contained in their respective samples sampX
names - the names of the metabolites
ave - the average of each mdv element across all of the points
stdev - the standard dev for each mdv element across all points
- fitC13Data(v0, expdata, model, majorIterationLimit)¶
USAGE:
[vout, rout] = fitC13Data(v0, expdata, model, majorIterationLimit)
- INPUTS:
- v0: It will automatically be converted to alpha by solving N*alpha = v;
if v0 is a matrix then it is assumed to be a multiple start situation and vout will also have this size.
- expdata: either a data structure or a cell array of structures, in
which case it is assumed that you wan to fit the sum of the scores
model: model structure
- OPTIONAL INPUT:
majorIterationLimit: max number of iterations solver is allowed to take. Default = 1000
- OUTPUTS:
vout: reflects size of v0, result of NLPsolution rout: cell, result of NLPsolution
- getBinsOfFluxes(samp, numfluxes, numbins)¶
Takes a samp.points fluxes and bin them by numfluxes (remainder not used) or divide up in to bins of fluxes by numbins (remainder not used) sample each bin of fluxes and compare the differences between them.
USAGE:
[output] = getBinsOfFluxes(samp, numfluxes, numbins)
- INPUTS:
samp: fluxes numfluxes: default = 100 numbins: default = []
- OUTPUT:
output: structure with .samps field
- getCompareBinsOfFluxes(xglc, model, samplo, samphi, metabolites)¶
Compares the bins of fluxes between samplo and samphi, calls compareBinsOfFluxes(xglc, model, sammin, sammax, metabolites). `samplo and samphi each contain samples in x.points
USAGE:
[output] = getCompareBinsOfFluxes(xglc, model, samplo, samphi, metabolites)
- INPUTS:
xglc: sugar distribution model: model structure samplo: samples containing bins of fluxes samphi: samples containing bins of fluxes
- OPTIONAL INPUT:
metabolites: list of metabolites
- OUTPUT:
output: result of comparison
- getRandGlc()¶
Generates random glucose in isotopomer format
USAGE:
[xGlc] = getRandGlc()
- OUTPUT:
xGlc: random glucose
- goodInitialPoint(model, n)¶
Generates 4*length(model.lb) random points, takes linear combinations of them so that all points are in the interior.
USAGE:
[out] = goodInitialPoint(model, n)
- INPUTS:
model: model structure n: number, default = 1
- OUTPUT:
out: random points with linear combinations
- isotopomerViewer(mdv1, mdv2, names)¶
Takes in an “experiment” and views the isotopomer as distributions between mdv1 and mdv2. No output.
USAGE:
isotopomerViewer(mdv1, mdv2, names)
- INPUTS:
mdv1, mdv2: structures names: names in the plot
- naturallabel(n)¶
Returns a natural label idv of n carbons. Assumes 1.1% C13
USAGE:
[out] = naturallabel(n)
- INPUT:
n: size of label
- OUTPUT:
out: natural label idv of n carbons
- runHiLoExp(experiment)¶
Takes an experiment with the following structure and splits the sample space at the median of a target flux solves the two spaces with a given sugar and compares the resulting mdvs to provide a z-score.
USAGE:
[experiment] = runHiLoExp(experiment)
- INPUTS:
experiment: contains:
model with fields:
S = the stoichiometric matrix
rxns = array of reaction names, corresponding the S
c = optimization target 1, or -1
ub,lb = upper and lower bounds of reactions
points = a #fluxes X #samples (~2000) array of the solution space if missing or empty, will generate a sample
glcs = an array of sugars in isotopomer format, each column a separate sugar. Should not be in MDV format. Conversion is done automatically. will default to generate 1 random sugar if set to []
targets = an array of cells with string for the reaction to split on the solution space, defaults to ‘PGL’
thresholds = #targets X 1 array of thresholds
metabolites = an optional parameter fed to calcMDVfromSamp.m which only calculates the MDVs for the metabolites listed in this array. e.g - optionally, metabolites can also be a structure of fragments
hilo = a #targets X #samples array of 0/1’s, 0 id’s the sample of fluxes as the lo side and 1 id’s the sample for the hi side. hilo will only be calculated/recalculated if it’s missing or if the targets have been replaced using the param list
mdvs = structure of mdv results:
(name) = name of the run = t + glc# e.g. t1, t2, glc# refers to the glc in the glcs array.
- score_KS(mdv, hilo, lambda)¶
Calculates KS score
USAGE:
[out] = score_ridge(mdv, hilo, lambda, crossval)
- INPUTS:
mdv: structure hilo: (0’s and 1’s), ideally there will be a similar # of each.
- OPTIONAL INPUTS:
lambda: weighting, if the mean is less than lambda, the scores get weighted less, default = .02
- OUTPUT:
out: score
- score_ridge(mdv, hilo, lambda, crossval)¶
Calculates ridge score
USAGE:
[out] = score_ridge(mdv, hilo, lambda, crossval)
- INPUTS:
mdv: structure hilo: (0’s and 1’s), ideally there will be a similar # of each.
- OPTIONAL INPUTS:
lambda: ridge parameter, default = .01 crossval: whether to do cross validation. This severely slows
down the computation, default is no.
- OUTPUT:
out: score