USEPA/CompTox-ToxCast-tcpl

Investigate level 5 mutate() processing error

Closed this issue · 0 comments

Processing using the tcpl dev/tcplfit2 dev branch fails after writing level 4. Row 1 appears to be DMSO, so could be related to how tcplfit2 parameters are listed/unlisted.

tcplRun(id = 3088, type = "mc", slvl = 4L, elvl = 6L, mc.cores=40)
Loaded L3 AEID3088 (13384 rows; 0.97 secs)
Processed L4 AEID3088 (351 rows; 80.24 secs)
Writing level 4 data for 1 ids...
Completed delete cascade for 1 ids (1.17 secs)
Writing level 4 complete. (273.93 secs)
Loaded L4 AEID3088 (351 rows; 0.75 secs)
Error in mutate():
ℹ In argument: df = list(...).
ℹ In row 1.
Caused by error:
! arguments imply differing number of rows: 1, 0
Run rlang::last_trace() to see where the error occurred.

rlang::last_trace()
<error/dplyr:::mutate_error>
Error in mutate():
ℹ In argument: df = list(...).
ℹ In row 1.
Caused by error:
! arguments imply differing number of rows: 1, 0
Backtrace:

  1. ├─tcpl::tcplRun(id = 3088, type = "mc", slvl = 4L, elvl = 6L, mc.cores = 40)
  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(...)
  11. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  12. │ ├─base::withCallingHandlers(...)
  13. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
  14. │ └─mask$eval_all_mutate(quo)
  15. │ └─dplyr (local) eval()
  16. └─tcplfit2::tcplhit2_core(...)
  17. ├─base::as.data.frame(c(identifiers, mget(name.list)), stringsAsFactors = FALSE)
  18. └─base::as.data.frame.list(c(identifiers, mget(name.list)), stringsAsFactors = FALSE)
  19. ├─base::do.call(data.frame, c(x, alis))
    
  20. └─base (local) `<fn>`(...)
    
  21.   └─base::stop(...)
    

Run rlang::last_trace(drop = FALSE) to see 3 hidden frames.

rlang::last_trace(drop=FALSE)
<error/dplyr:::mutate_error>
Error in mutate():
ℹ In argument: df = list(...).
ℹ In row 1.
Caused by error:
! arguments imply differing number of rows: 1, 0
Backtrace:

  1. ├─tcpl::tcplRun(id = 3088, type = "mc", slvl = 4L, elvl = 6L, mc.cores = 40)
  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(...)
  11. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  12. │ ├─base::withCallingHandlers(...)
  13. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
  14. │ └─mask$eval_all_mutate(quo)
  15. │ └─dplyr (local) eval()
  16. ├─tcplfit2::tcplhit2_core(...)
  17. │ ├─base::as.data.frame(c(identifiers, mget(name.list)), stringsAsFactors = FALSE)
  18. │ └─base::as.data.frame.list(c(identifiers, mget(name.list)), stringsAsFactors = FALSE)
  19. │ ├─base::do.call(data.frame, c(x, alis))
  20. │ └─base (local) <fn>(...)
  21. │ └─base::stop(...)
  22. └─base::.handleSimpleError(...)
  23. └─dplyr (local) h(simpleError(msg, call))
  24. └─rlang::abort(message, class = error_class, parent = parent, call = error_call)