Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions R/sample_filtering.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
}
Expand Down Expand Up @@ -869,4 +872,4 @@ factor_sample_filter = function(expr,
warning("No z-cutoff specified, thus no filtering results returned.")
return(NA)
}
}
}