Commit e698d45e authored by Holger Brandl's avatar Holger Brandl

fixed output prefixing in limma workflow

parent f62cfeac
...@@ -48,7 +48,7 @@ designFormula = opts$design ...@@ -48,7 +48,7 @@ designFormula = opts$design
assert(str_detect(designFormula, ".*condition$")) assert(str_detect(designFormula, ".*condition$"))
results_prefix = if (str_length(opts$out) > 0) paste0(opts$out, ".") else "" # used by add_prefix results_prefix = if (str_length(opts$out) > 0) opts$out else "" # used by add_prefix
pcutoff = if (is.null(opts$pcutoff))NULL else as.numeric(opts$pcutoff) pcutoff = if (is.null(opts$pcutoff))NULL else as.numeric(opts$pcutoff)
qcutoff = if (is.numeric(pcutoff))NULL else as.numeric(opts$qcutoff) qcutoff = if (is.numeric(pcutoff))NULL else as.numeric(opts$qcutoff)
...@@ -68,14 +68,22 @@ vec_as_df(unlist(opts)) %>% ...@@ -68,14 +68,22 @@ vec_as_df(unlist(opts)) %>%
#' The working directory of the analysis was: `r getwd()` #' The working directory of the analysis was: `r getwd()`
## both batches combines ## both batches combines
contrasts = read_tsv(contrasts_file) %T>% { print(kable(.))}
expDesign = read_tsv(design_matrix_file) %T>% glimpse expDesign = read_tsv(design_matrix_file) %T>% glimpse
# countData = read_tsv(interp_from_env("../logms_inten_matrix_acc.txt")) %T>% glimpse # countData = read_tsv(interp_from_env("../logms_inten_matrix_acc.txt")) %T>% glimpse
countData = read_tsv(count_matrix_file) %T>% glimpse countData = read_tsv(count_matrix_file) %T>% glimpse
names(countData)[1] = "gene_id" names(countData)[1] = "gene_id"
if (! is.null(contrasts_file)) {
contrasts = read_tsv(contrasts_file) %T>% { print(kable(.))}
}else {
contrasts = select(expDesign, condition) %>% distinct %>%
merge(., ., suffixes = c("_1", "_2"), by = NULL) %>%
filter(ac(condition_1) > ac(condition_2))
# write_tsv(contrasts, paste(resultsBase, "contrasts.txt"))
}
# zero-imputation is disabled here because this should be better implement per experiment # zero-imputation is disabled here because this should be better implement per experiment
# countData %<>% mutate_if(is.numeric, funs(replace(., is.na(.), 0))) # countData %<>% mutate_if(is.numeric, funs(replace(., is.na(.), 0)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment