Learn R Programming

dynafluxr (version 1.0.1)

fdyn: Retrieve flux dynamics from metabolic kinetics

Description

Retrieve flux dynamics from metabolic kinetics

Usage

fdyn(
  mf,
  stofull,
  nsp = 4L,
  nki = 5L,
  lieq = NULL,
  monotone = 0,
  dls = FALSE,
  atomlen = NULL,
  npi = 300L,
  wsd = FALSE,
  nmsf = character(0L),
  sderr = NULL,
  tol = 1e-10,
  regular_grid = TRUE
)

Value

List with following components:

mf:

specie data frame used for fitting

tp:

vector of time points for used measurements

tpp:

vector of time points for plot (fine time resolution)

sto:

stoichiometric matrix used for fitting

stofull:

stoichiometric matrix before a possible NA elimination

stoinv:

pseudo-inverse of sto

msp:

measured specie spline function

vsp:

estimated rates spline function

fsp:

estimated total flux (S*v) spline function

dsp:

first derivative of measured spline function

isp:

integrated specie spline function

asp:

atom balance over msp spline function

iasp:

atom balance over isp spline function

vsp:

flux spline function

dsp:

measured specie first derivative spline function

rsp:

residual dM/dt - S%*%v spline function

risp:

integral residual M - \u222bS%*%v dt spline function

sdrate:

matrix of SD values for flux B-spline coefficients, of size (ncoef x nrate)

chi2tab:

data-frame with chi2-test results

sf:

named scale factor vector

internal_knot_ref:

number of internal knots used for estimation of var_ref

Arguments

mf

Data-frame or matrix, specie kinetic measurements. Columns must be named with specie names and 'Time'.

stofull

Full stoichiometric matrix, stofull[i,j] means reaction 'j' produces specie 'i' with coeficient 'stofull[i,j]'. If stofull[i,j] < 0, the specie 'i' is consumed. Columns must be named with reaction names. Rows must be names with the species. "Full" in the name means that matrix includes even NA species.

nsp

Integer, polynomial order of B-spline to use for species (default 4)

nki

Integer, number of internal knots for B-splines (default 5)

lieq

List, equality constraints on species (default NULL, i.e. no equality constraint)

monotone

Numeric scalar or vector, 1=species are monotonically increasing; -1=monotonically decreasing; 0=no constraint. If vector, each value constraints (or not) a corresponding data column in mf ('Time' column is excluded from counting) (default 0, i.e. no monotonicity constraint)

dls

Logical scalar, if TRUE, indicates that differential least squares should be resolved instead of integral least squares. (default FALSE, i.e. ILS will be used)

atomlen

Numerical named vector, indicates what is label length of a given specie used a vector item name. If provided, results will contain lsp and ilsp fields which are a B-spline function representing atom balance over msp and isp splines. (default NULL, i.e. no atom balance will be provided)

npi

Integer scalar, indicates a number of plot intervals to produce smooth plots. (default 300)

wsd

Logical scalar, if TRUE, indicates that differential least squares should be resolved with residuals weighted by a factor of covariance matrix. (default FALSE, i.e. no weighting is used)

nmsf

Character vector, list of species for which scaling factor maust be estimated for --dls.

sderr

Numeric vector, use this SD of measured metabolites instead of automatically estimated. The name of each vector component is metabolite name, tha value is SD vale, e.g. c(GLC=0.1) (default NULL, i.e. SD are automatically estimated).

tol

Double scalar, tolerance for detecting singular matrices and solving linear systems

regular_grid

Logical scalar, use regular knot grid (default: TRUE)

Details

Each item in lieq corresponds to a specie and is a 2 column matrix (Time, Value). Each row of this matrix indicates what 'Value' must take corresponding specie at what 'Time'. Typically, it can be used to impose starting values at Time=0 for some species.
All specie fits are constraint to have values >= 0.