From 07fb22d64414e9ed8af2ffcfcf5c827652e82440 Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Wed, 5 Jul 2023 09:53:22 +0200 Subject: [PATCH] fix load_matrix function --- R/load_matrix.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/load_matrix.R b/R/load_matrix.R index 9a8dafc..2487c61 100644 --- a/R/load_matrix.R +++ b/R/load_matrix.R @@ -36,6 +36,7 @@ load_matrix <- function(design_table, path, my_formula) { path = path )) design_table$count_files <- selected_files + design_table <- design_table[, !names(design_table) %in% c("prefix")] sample_table <- dplyr::rename(design_table, sampleName = sample, fileName = count_files @@ -49,6 +50,7 @@ load_matrix <- function(design_table, path, my_formula) { sample_table[[my_col]] <- as.factor(sample_table[[my_col]]) } sample_table <- sample_table[, c("sampleName", "fileName", "condition")] + sample_table$condition <- as.factor(sample_table$condition) dds_input <- DESeq2::DESeqDataSetFromHTSeqCount( sampleTable = as.data.frame(sample_table), directory = ".", -- GitLab