USEPA / CompTox-ToxCast-tcplFit2

Performs basic concentration response curve fitting
https://cran.r-project.org/package=tcplfit2
Other
1 stars 0 forks source link

TOX-534 Check acy() usage for concentration est in tcplfit2_core & tcplhit2_core #3

Open brown-jason opened 1 year ago

brown-jason commented 1 year ago

tcplfit2_core uses acy to estimate a theoretical top and the AC50 (gain and loss, if applicable) for curve fits.

tcplhit2_core uses acy to estimate other concentration estimates (e.g. AC5, AC10, BMD, etc.).

To Do:

Investigate if there is a reason for the AC50 being calculated in tcplfit2_core rather than with the other concentration estimates. If yes, then provide additional documentation within the code to provide an quick guidance (bread crumb) explanation. For example, if the AC50 is part of the necessary model parameters used downstream. If no, then document and may consider creating a ticket to "house" all of the concentration estimations together under the same function (i.e. only need to use acy() for tcplhit2_core rather than in both places).

sedavid01 commented 10 months ago

Assigning to Grace.

gracezhihuizhao commented 10 months ago

What the code is doing now is that we will pass the result of tcplfit2_core() to tcplhit2_core(), and in tcplhit2_core() it calls hitloginner() to calculate discrete hit. hitloginner() then takes AC50 as an input, so AC50 has to be in the result that being passed in (other estimators are calculated after hit logic).

However, maybe hitloginner() was updated, but AC50 is marked as no longer unnecessary for this function now, so I believe it doesn't has to be calculated in tcplfit2_core. I'm not sure if this is intended, please let me know.

sedavid01 commented 10 months ago

@brown-jason , are there any further actions/tickets that need to be made from this information collection?

sedavid01 commented 10 months ago

@brown-jason preference is to leave as-is for now. We can always revisit it if there are bugs that crop up and/or necessity to 'relocate' this calculation.