Uncaught error in expression analysis with stats::t.test
ejmackrell opened this issue · 2 comments
Expected Behavior
Expression analysis with the default stats::t.test
following normalization and imputation should return a tidyproteomics object.
Actual Behavior
Expression analysis with the default stats::t.test
executes unsuccessfully, returning an error after attempting to extracting a p-value from the stats::t.test
output. Requesting a modification of calc_pv
in analysis_expressiondiff_test.R
to handle p-value errors and return 1 or NA in such instances (identical data across groups) if appropriate for this test and others if applicable.
Steps to Reproduce the Problem
The reprex
hela_proteins %>% normalize(.method = "median") %>% impute() %>% expression(control / knockdown)
produces output
ℹ Normalizing quantitative data
✔ ... using median shift [495ms]
✔ Selecting best normalization method ... done
ℹ ... selected median
✔ Imputing by row using the function ::, base, and min [1.8s]
ℹ ... 1838 values imputed
Error indplyr::mutate()
:
! Problem while computingp_value = purrr::map2(x, y, calc_pv, .method, ...)
.
ℹ The error occurred in group 166: identifier = "A0A2R8Y783".
Caused by error int.test.default()
:
! data are essentially constant
Specifications
- Version: tidyproteomics 1.5.5, R 4.2.2
- Platform: Windows
addressed in update 1.5.6 - 2023.09.07, essentially wrapping a try-catch block around the test and reporting 1 on error
Works great. Thanks, Jeff!