diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2014-07-23 08:34:59 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2014-07-23 08:34:59 +0200 |
commit | 4c6f29fe2a3ece5a85160b891c89ce0f55299c11 (patch) | |
tree | 95d221aef9349dbb5c068c6055eb073cdfdca59b /R | |
parent | 651fe9a90eb814a9533309d938c9e830c2ee4b8c (diff) |
Parallel metabolite formation with formation fractions in mkinerrmin
Diffstat (limited to 'R')
-rw-r--r-- | R/mkinerrmin.R | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/R/mkinerrmin.R b/R/mkinerrmin.R index 9ebac6a4..09724730 100644 --- a/R/mkinerrmin.R +++ b/R/mkinerrmin.R @@ -65,11 +65,12 @@ mkinerrmin <- function(fit, alpha = 0.05) # Formation fractions are attributed to the target variable, so look
# for source compartments with formation fractions
for (source_var in fit$obs_vars) {
+ n.ff.source = length(grep(paste("^f", source_var, sep = "_"),
+ names(parms.optim)))
+ n.paths.source = length(fit$mkinmod$spec[[source_var]]$to)
for (target_var in fit$mkinmod$spec[[source_var]]$to) {
if (obs_var == target_var) {
- n.ff.optim <- n.ff.optim +
- length(grep(paste("^f", source_var, sep = "_"),
- names(parms.optim)))
+ n.ff.optim <- n.ff.optim + n.ff.source/n.paths.source
}
}
}
|