diff --git a/R/sample_filtering.R b/R/sample_filtering.R index 9f3f76d..07363a4 100644 --- a/R/sample_filtering.R +++ b/R/sample_filtering.R @@ -56,10 +56,13 @@ simple_FNR_params = function(expr, pos_controls, fn_tresh = 0.01) { # Median log-expression in positive observations mu_obs = log(rowMedians(pos_expr, na.rm = TRUE)) if (any(is.na(mu_obs))) { + na_rows <- (1:nrow(expr))[pos_controls][which(is.na(mu_obs))] + na_rowsm <- paste(na_rows, sep=", ") stop( paste0( "Median log-expression in positive ", - "observations NA for some positive control gene/s" + "observations NA for some positive control gene/s in rows: ", + na_rowsm ) ) } @@ -869,4 +872,4 @@ factor_sample_filter = function(expr, warning("No z-cutoff specified, thus no filtering results returned.") return(NA) } -} \ No newline at end of file +}