life-science-protocols / protbot

Protein quantification automation using R
https://life-science-protocols.github.io/protbot/
Other
0 stars 0 forks source link

Create calibration curve object #3

Open ramiromagno opened 11 months ago

ramiromagno commented 11 months ago

Hi @lsilvam:

I think it would be neat to have the calibration curve details encapsulated into one single R object.

We can have a list with a special S3 class, i.e. calibration_curve. This list would have all the details pertaining the calibration curve:

  1. Data used in the calibration curve
  2. Regression details
  3. Other details

How to approach this?

Perhaps create a new function named create_calibration_curve() that takes in the calibration data, and returns said R object that would be a list with the S3 class calibration_curve, see: https://adv-r.hadley.nz/s3.html#s3-classes.

We could use tidymodels to create the elements of the calibration curve object: https://www.tidymodels.org/learn/statistics/tidy-analysis/#regression-models.

Then we could pass this calibration curve object as one single argument to functions that need to use it, such as the function to make estimates of protein concentrations.