USEPA / CompTox-ToxCast-tcpl

US EPA's Toxicity Forecaster (ToxCast) Pipeline. More information on the ToxCast program available here: https://www.epa.gov/comptox-tools/toxicity-forecasting-toxcast
https://cran.r-project.org/package=tcpl
Other
28 stars 12 forks source link

Suppress or solve warnings for when processing levels 4 + 5 #223

Open cthunes opened 5 months ago

cthunes commented 5 months ago

This error comes in a few forms (where the parameters usually change (different tcplfit2 models). Occurs in levels 4 and 5.

Error in uniroot(acgnlsobj, c(toploc, 1e+05), y = y, tp = tp, ga = ga,  : 
  f() values at end points not of opposite sign

These warnings occured when processing level 5 of aeid 759 and seem to be also caused by tcplfit2.

Warning: There were 549 warnings in `mutate()`.
The first warning was:
ℹ In argument: `df = list(...)`.
ℹ In row 55.
Caused by warning in `sqrt()`:
! NaNs produced
---
Backtrace:
     ▆
  1. ├─tcpl::tcplRun(...)
  2. │ └─tcpl:::.multProc(id = id, lvl = 5L, type = "mc", ncores = ncores)
  3. │   └─parallel::mclapply(id, proc_func, mc.cores = ncores, mc.preschedule = FALSE)
  4. │     └─base::lapply(X = X, FUN = FUN, ...)
  5. │       └─tcpl (local) FUN(X[[i]], ...)
  6. │         └─tcpl:::tcplHit2(dat, coff = cutoff)
  7. │           └─... %>% select(-conc, -resp)
  8. ├─dplyr::select(., -conc, -resp)
  9. ├─dplyr::mutate(...)
 10. └─dplyr:::mutate.data.frame(...)
ℹ Run `dplyr::last_dplyr_warnings()` to see the 548 remaining warnings.
brown-jason commented 5 months ago

This may be a tcplfit2 ticket consider adding verbose = FALSE as default and supress these messages and user can add verbose = TRUE to show all