(group <- factor(c("treated1","treated1","treated2","treated2","treated3","treated3","treated4","treated4","control1","control1","control2","control2")))
(coldata <- data.frame(row.names=colnames(txi.g), group))
dds <- DESeqDataSetFromTximport(txi.g, colData=coldata, design=~group)
dds <- DESeq(dds)
res <- DESeq2::results(dds,
contrast = list(c("treated1","treated2","treated3"),c("control1","control2")),
listValues = c(3,-3/5)
This gives me this error, this is because deseq created already the contrasts ie. "condition_treated1_vs_control1" ,With two sample comparison I used to do like this contrast=c("condition","treated1","control1").
Error in checkContrast(contrast, resNames) :
all elements of the contrast as a list of length 2 should be elements of 'resultsNames(object)'