Hi all, I am attempting to use DESeq2 for data analysis. I got the error below and I am unsure how to resolve this.
library(DESeq2)
file.list <- list.files( path = "./", pattern = "*ReadsPerGene.out.tab$")
counts.files <- lapply(file.list, read.table, skip = 3)
counts <- as.data.frame( sapply( counts.files, function(x) x[ ,2] ) )
colnames(counts) <- file.list
row.names(counts) <- counts.files[[1]]$V1
condition <- c(rep("Kdm5_present",5), rep("Kdm5_absent",5))
sampleTable <- data.frame(sampleName = file.list, condition = condition)
Error in data.frame(sampleName = file.list, condition = condition) :
arguments imply differing number of rows: 4, 10