sampleFluxEnsemble: Sample a posterior ensemble of feasible flux configurations...

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/sampleFluxEnsemble.R

Description

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.

Usage

1
sampleFluxEnsemble(model, uncertain.vars=NULL, iter=3000, ...)

Arguments

model

Either an object of class LIM as generated by createLIMFromBiGG or createLIMFromSBML, a character with the full path to a LIM model file or an object of class Model from the package rsbml

uncertain.vars

An object of class data.frame containing three columns: 1. The identifier for the flux(es) to be constrained within its uncertainty limits (linear combinations of fluxes e.g. F1 + F2 - F3 are also allowed), 2. the value of the constrained flux and 3. its standard deviation. If uncertain.vars is NULL, the ensemble is sampled without approximate equality constraints

iter

Number of iterations in the Monte Carlo procedure

...

Additional arguments to xsample

Value

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.

Note

This function is a wrapper for the function xsample.

Author(s)

Hannes Hettling

References

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.

See Also

xsample

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
##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)

hettling/BiGGR documentation built on April 17, 2020, 5:19 a.m.