How to change the design DESeqDataSet to calculate log2foldChange in different way?
How to change the design DESeqDataSet to calculate log2foldChange in different way? for example the log fold change condition: Normal vs Mutated, How to make it Mutated vs Normal?
countdata2<- subset(countdata, select=c("WM793_rep1","WM793_rep2","NHEM_rep1", "NHEM_rep2"))
coldata2<data.frame("condition"=as.factor(c(rep("Mutated",2),rep("Normal",2))),row.names=colnames(countdata2))
dds2 <- DESeqDataSetFromMatrix(countData = countdata2, colData =coldata2,design = ~condition )
dds2 <- DESeq(dds2)
Thanks in advance
• 954 views
•
link
1 answer
The answer is to add contrast parameter and add the desired ordering :
results(dds3,contrast = c("condition","Mutated","Normal"))
• 0 views
•
link
Log in to answer this question.