Refactor residual function to subtract only reactants that have been measured.
Now the dataframe with the modelled time-course data will only contain columns/data for reactants that also have been measured.
Motivation
closes #17
Previously the residual tried to subtract modelled time-course values of reactants that have no time-course measurements.
This resulted in an error for the minimization step, since the dataframe contained NaN values.
Tested
This was tested with a dataset of Maria Pinto, with the reaction:
L-cysteine -> sulfide + L-alanine
Measured was the time-course of L-cysteine and sulfide but not L-alanine.
The experimental data contained the columns s0 and s1 (L-cysteine and sulfide)
The modelled data previously contained s0, s1 and s2
Now it also contains only s0 and s1
Changes
Refactor residual function to subtract only reactants that have been measured. Now the dataframe with the modelled time-course data will only contain columns/data for reactants that also have been measured.
Motivation
closes #17 Previously the residual tried to subtract modelled time-course values of reactants that have no time-course measurements. This resulted in an error for the minimization step, since the dataframe contained NaN values.
Tested
This was tested with a dataset of Maria Pinto, with the reaction: L-cysteine -> sulfide + L-alanine Measured was the time-course of L-cysteine and sulfide but not L-alanine. The experimental data contained the columns s0 and s1 (L-cysteine and sulfide) The modelled data previously contained s0, s1 and s2 Now it also contains only s0 and s1
This change is