There are two issues I would like to highlight:
1: Line 53and 162: test = as.matrix(S[allIdx,])
If allIdx only has only one value, the matrix will become a vector and mess up the computation. drop=FALSE should be added to prevent this.
2: When computing the flux sums, I am curious as to why the individual fluxes are not multiplied by the respective stoichiometric coefficients before being summed?
There are two issues I would like to highlight:
1: Line 53and 162: test = as.matrix(S[allIdx,])
If allIdx only has only one value, the matrix will become a vector and mess up the computation. drop=FALSE should be added to prevent this.
2: When computing the flux sums, I am curious as to why the individual fluxes are not multiplied by the respective stoichiometric coefficients before being summed?