fit-arb
fit:
QSoas> l michaelis.dat QSoas> fit-arb vm/(1+km/x)After running the fit, the window should look like this: Now, with the fit, we have reasonable values for vm (
vm
) and Km (km
). But, for publication, one would want to generate "smooth" curve going through the lines... Saving the curve from "Data.../Save all" doesn't help, since the data has as many points as the original data and looks very "jaggy" (like on the screenshot above)... So one needs a curve with more data points.
Maybe the most natural solution is simply to use generate-buffer
together with apply-formula
using the formula and the values of km
and vm
obtained from the fit, like:
QSoas> generate-buffer 0 20 QSoas> apply-formula y=3.51742/(1+3.69767/x)By default,
generate-buffer
generate 1000 evenly spaced x values, but you can change their number using the /samples
option. The two above commands can be combined to just one call to generate-buffer
:
QSoas> generate-buffer 0 20 3.51742/(1+3.69767/x)This works, but it is quite cumbersome and it is not going to work well for complex formulas or the results of differential equations or kinetic systems...
This is why to each fit-
command corresponds a sim-
command that computes the result of the fit using a "saved parameters" file (here, michaelis.params
, but you can also save it yourself) and buffers as "models" for X values:
QSoas> generate-buffer 0 20 QSoas> sim-arb vm/(1+km/x) michaelis.params 0This strategy works with every single fit ! As an added benefit, you even get the fit parameters as meta-data, which are displayed by the
show
command:
QSoas> show 0 Dataset generated_fit_arb.dat: 2 cols, 1000 rows, 1 segments, #0 Flags: Meta-data: commands = sim-arb vm/(1+km/x) michaelis.params 0 fit = arb (formula: vm/(1+km/x)) km = 3.69767 vm = 3.5174They also get saved as comments if you save the data.
Important note: the sim-arb
command will be available only in the 3.0 release, although you can already enjoy it if you use the github version.