Skip to content
Snippets Groups Projects
Commit fdd3cac3 authored by Jeffrey Pullin's avatar Jeffrey Pullin
Browse files

Add log fold-change

parent 7dfe8aad
No related branches found
No related tags found
No related merge requests found
Pipeline #9870 passed
......@@ -73,11 +73,11 @@ random_pars <- expand_grid(
) %>%
mutate(file_name = paste0(method))
difference_pars <- expand_grid(
method = "difference",
summary = c("log_fc")
logfc_pars <- expand_grid(
method = "logfc",
rankby = c("abs", "raw")
) %>%
mutate(file_name = paste0(method, "_", summary))
mutate(file_name = paste0(method, "_", rankby))
glmgampoi_pars <- expand_grid(
method = "glmgampoi",
......@@ -109,7 +109,7 @@ method_pars_data <- list(
presto_pars,
rankcorr_pars,
random_pars,
difference_pars,
logfc_pars,
glmgampoi_pars,
#smash_pars,
nsforest_pars,
......
......@@ -6,11 +6,9 @@
#' @return A list containing the time of the computation and results of the
#' method.
#'
run_difference <- function(sce, pars) {
run_logfc <- function(sce, pars) {
if (pars$summary != "log_fc") {
stop("Invalid summary parameter", call. = FALSE)
}
stopifnot(pars$rankby %in% c("raw", "abs"))
times <- system.time({
......@@ -39,7 +37,13 @@ run_difference <- function(sce, pars) {
gene = rownames(sce),
cluster = group
)
group_df <- dplyr::arrange(group_df, desc(abs(log_fc)))
if (pars$rankby == "abs") {
group_df <- dplyr::arrange(group_df, desc(abs(log_fc)))
} else if (pars$rankby == "raw") {
group_df <- dplyr::arrange(group_df, desc(log_fc))
}
out[[i]] <- group_df
}
......
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