Skip to content
Snippets Groups Projects
Commit 00ec14ba authored by Arnaud Duvermy's avatar Arnaud Duvermy
Browse files

fix message info genes counts bellow_threshold

Former-commit-id: 2ed2a843ffdbbbfa3ec776f680b64d984d2820bb
Former-commit-id: 6b71038e295cdf928de3c50bbf20f662b6a08e86
Former-commit-id: 8b0724d579460dbe992e11c6fba60a693d77da75
parent 3166c450
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ get_messages_sequencing_depth <- function(scaling_factors, threshold_cov_var = 1
warning_too_low_mu_ij_row <- function(mu_ij_matrix, threshold = 1 ){
n_too_low_row <- length(which(detect_row_matx_bellow_threshold(mu_ij_matrix, threshold)))
if (n_too_low_row > 0){
msg <- paste("INFO:", n_too_low_row, "genes have all(mu_ij) < 1, indicating very low counts. Consider removing them for future analysis using prepareData2fit with row_cnt_threshold = 10. To detect them, try increasing sequencing depth.\n",
msg <- paste("INFO:", n_too_low_row, "genes have all(mu_ij) < 1, indicating very low counts. Consider removing them for future analysis using prepareData2fit with row_threshold = 10. To detect them in future experiment, try increasing sequencing depth.\n",
sep = " ")
message(msg)
}
......
......@@ -147,7 +147,7 @@ prepareData2fit <- function(countMatrix, metadata, response_name = "kij",
if (row_threshold > 0){
message(paste("INFO: filtering", response_name, "<", row_threshold, sep = " " ))
idx <- detect_row_matx_bellow_threshold(countMatrix, threshold = row_threshold)
message(paste(length(idx), "genes removed from data.", sep = " "))
message(paste(length(which(idx)), "genes removed from data.", sep = " "))
countMatrix <- countMatrix[ !idx , ]
}
......
......@@ -54,7 +54,7 @@ first_non_null_index <- function(lst) {
#' @return A logical vector indicating rows below the threshold
#' @export
detect_row_matx_bellow_threshold <- function(matrix, threshold) {
apply(matrix, 1, function(row) all(row < threshold))
apply(matrix, 1, function(row) all(row < threshold))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment