Closed Guillawme closed 7 years ago
Done with commit 4799692ba813788ea623f59e9e40a22bef8f7220.
Currently, fit_binding_model
returns a dataframe containing experiment names and fit objects. This is not the easiest data structure to store objects. I think it should instead return a named list where item names are experiment names, and each item contains the corresponding fit object.
This will make it easier to access results from other functions like make_figure
.
To ensure that a failed fit won't ruin the entire analysis, and still be able to recover the results from successful fits, it might be worth using techniques described here: http://adv-r.had.co.nz/Exceptions-Debugging.html#condition-handling
This only needs a unit test to close the issue.
As it turns out, it is not simple to find a valid dataset (i.e. not just made of NA
s) that makes the function crash. Therefore, it is difficult to make a test case.
It would be very useful to have a way to specify constraints on the parameters to be fitted, for example, it makes sense to:
fret_max
to be greater thanfret_min
(also a physically realistic assumption).It would also be very useful to have a way to choose between keeping a parameter fixed or letting it vary in the fitting procedure. This is especially useful with the quadratic equation, to let the fitting procedure determine the donor concentration (if the value determined by the fitting procedure matches the intended value, this is a convincing control for the quality of the dataset under study).