I just started using DESeq2. One of the really nice features I discovered is I can use the DESeqDataSet object with ReportingTools to generate charts of all of the significant genes. However, I can't figure out how to properly handle multi-factor designs.
With a single factor, it's simple:
This works with multi-factor designs, but outputs charts only with 2 conditions from A.
I tried combining the factors:
I got output with all conditions (2 from A and 2 from B), but all the values were for the 2 from A. It makes sense based on my code (it's just a factor with 4 unique values), but not the answer I was looking for.
I also tried generating a factor matrix, but that yielded an error for charting:
Is it possible to combine factors with ReportingTools?
With a single factor, it's simple:
Code:
publish(dds, Report, factor = colData(dds)$A, ...)
I tried combining the factors:
Code:
f <- factor(c(as.character(colData(dds)$A),as.character(colData(dds)$B))) publish(dds, Report, factor = f, ...)
I also tried generating a factor matrix, but that yielded an error for charting:
Code:
m <- cbind(as.character(colData(dds)$Diet),as.character(colData(dds)$Age)) dm <- as.data.frame(m) dm[,1] <- as.factor(dm[,1]) dm[,2] <- as.factor(dm[,2]) publish(dds, Report, factor = dm, ...)