Cryptic error in outlier detection for < 3 replicates
pinin4fjords opened this issue · 0 comments
pinin4fjords commented
Outlier detection fails where replicate numbers are small, as expected, but doesn't do so gracefully. We need skips and errors/ warnings as appropriate.
Error looks like:
[1] "MAD correlation plots..."
[1] "... static"
Error in `geom_text()`:
! Problem while computing position.
ℹ Error occurred in the 2nd layer.
Caused by error in `if (any(params$y != 0)) ...`:
! missing value where TRUE/FALSE needed
Backtrace:
▆
1. ├─base::print(static_madplot)
2. ├─ggplot2:::print.ggplot(static_madplot)
3. │ ├─ggplot2::ggplot_build(x)
4. │ └─ggplot2:::ggplot_build.ggplot(x)
5. │ └─ggplot2:::by_layer(...)
6. │ ├─rlang::try_fetch(...)
7. │ │ ├─base::tryCatch(...)
8. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
9. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
10. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
11. │ │ └─base::withCallingHandlers(...)
12. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
13. │ └─l$compute_position(d, layout)
14. │ └─ggplot2 (local) compute_position(..., self = self)
15. │ └─self$position$compute_layer(data, params, layout)
16. │ └─ggplot2 (local) compute_layer(..., self = self)
17. └─base::.handleSimpleError(...)
18. └─rlang (local) h(simpleError(msg, call))
19. └─handlers[[1L]](cnd)
20. └─cli::cli_abort(...)
21. └─rlang::abort(...)```