diff --git a/R/load_matrix.R b/R/load_matrix.R index 9a8dafcb3839b88bd803de3bed552afe94c71bf9..2487c61d82f59c4e9ce2808389a9a02a34729852 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 = ".",