Guillawme / rfret

Analyze FRET Binding Data with R
https://guillawme.github.io/rfret
Other
2 stars 5 forks source link

Improve fit_binding_model #19

Closed Guillawme closed 7 years ago

Guillawme commented 7 years ago

It would be very useful to have a way to specify constraints on the parameters to be fitted, for example, it makes sense to:

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).

Guillawme commented 7 years ago

Done with commit 4799692ba813788ea623f59e9e40a22bef8f7220.

Guillawme commented 7 years ago

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.

Guillawme commented 7 years ago

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

Guillawme commented 7 years ago

This only needs a unit test to close the issue.

Guillawme commented 7 years ago

As it turns out, it is not simple to find a valid dataset (i.e. not just made of NAs) that makes the function crash. Therefore, it is difficult to make a test case.