sampleFluxEnsemble {BiGGR} | R Documentation |
This function uses a Markov chain Monte Carlo algorithm to sample
an ensemble of flux vectors that satisfy the constrained posed by
the model. To account for inaccuracy in certain fluxes, the user can
specify uncertain fluxes and provide standard deviations. The function
uses the xsample
function from the package limSolve
.
sampleFluxEnsemble(model, uncertain.vars=NULL, iter=3000, ...)
model |
Either an object of class LIM as generated by
|
uncertain.vars |
An object of class |
iter |
Number of iterations in the Monte Carlo procedure |
... |
Additional arguments to |
A matrix
with the posterior flux ensemble. The number of columns
is equal to the number of fluxes in the provided model, the number of
rows is equal to iter
.
This function is a wrapper for the function xsample
.
Hannes Hettling
K. V. den Meersche, K. Soetaert, and D. V. Oevelen: xsample(): An R function for sampling linear inverse problems,Journal of Statistical Software, Code Snippets, vol. 30, pp. 1-15, 4 2009.
xsample
##get example model file of glycolysis and TCA cycle limfile.path <- system.file("extdata", "Glycolysis_TCA.LIM", package="BiGGR") ##Specify uncertainty of fluxes "R_GLCt1r", "R_O2t" uncertain.vars <- data.frame(var=c("R_GLCt1r", "R_O2t"), value=c(0.4, 2.4), sd=c(0.08, 0.48)) ##sample ensemble ensemble <- sampleFluxEnsemble(limfile.path, uncertain.vars) ##Example in which linear combination of fluxes is constrained atp.reacs <- "R_ATPS4m - R_NDPK1m - R_HEX1 - R_PFK - R_PGK + R_PYK" uncertain.vars <- data.frame(var=atp.reacs, value=10, sd=1) ensemble <- sampleFluxEnsemble(limfile.path, uncertain.vars)