USEPA / CompTox-ToxCast-tcplFit2

A Concentration-Response Modeling Utility
https://usepa.github.io/CompTox-ToxCast-tcplFit2/
Other
1 stars 0 forks source link

Create an AUC wrapper function for after hit-calling #22

Closed sedavid01 closed 1 year ago

sedavid01 commented 1 year ago

Goal: We have the AUC function that can estimate the area under the concentration-response curve (AIC) for any of the available models fit. Now we want an option for integrating with the results from tcplhit2_core and/or concResponseCore, which allows us to automatically get the AUC just for the winning model.

  1. Determine which function(s) we want this to integrate with, which enables the use of AUC in tcpl processing - @brown-jason can provide additional context to this behavior.
  2. Create a wrapper function that links in with the identified functions and performs the desired behavior laid out in step 1.
  3. Document the function with an example.
  4. Add an example to a vignette (exisiting or new) - may want to discuss with @brown-jason and @sedavid01 on this.
  5. (Optional at this stage) Create a unit test for this function.
sedavid01 commented 1 year ago

Start with this one by branching off of the 12-get_AUC function branch.

sedavid01 commented 1 year ago

Asked @Kelly-Carstens-EPA and @madison-feshuk if they could do some testing of the function on their end with this updated functionality. If there is not time or other priorities, then feel free to ignore. Preference for testing (should be only about 15-30 min check):

  1. Pull down mc3 data from invitrodb.
  2. Pull down updates from this branch, load all functions in the package devtools::load_all().
  3. Follow case example in provided vignette - essentially tcplfit2_core on mc3 data then tcplhit2_core on output from fitting then post_hit_AUC.

Again if you are unable to perform testing no worries. Just want to generally make sure things are working for others prior to merging the PR, but not entirely a blocker.

sedavid01 commented 1 year ago

From suggestion from @madison-feshuk, Carter and Ashley can possibly do the testing on this functionality in lieu of Madison and/or Kelly.

@gracezhihuizhao, can you please add @cthunes and @Ashley-Ko to the PR.

gracezhihuizhao commented 1 year ago

This PR was approved and merged into "dev". Closing this ticket.

Kelly-Carstens-EPA commented 12 months ago

I did a test run of the get_AUC function and compared results to the function I previously used for the 'hill' function (invitrodb_v3_5 data). The AUC's are dissimilar between methods but would need to do a full analysis with a set of curves to understand how variable the AUCs are. For DTXSID6020226 in endpoint (aeid 2494) I found an AUC of 186.66 using the get_AUC function. I found an AUC of 109.31 using my previous function (integration based). These differences may not be surprising because different model parameters were used. I looked at a second chemical and observed a similar difference.

@sedavid01 @gracezhihuizhao let me know if you would like to dig deeper into this analysis.