Issue with DESeq: when using DESeqDataSet object what to put under argument design when there are 3 variables
Hello!
My ultimate goal is for each locality, see how males and females are differentially expressed during each separate life stage.
Example: In Chicago (locality), how is my plant at the protonema stage, differentially expressed in males compared to females?
When I construct my object dds, I was wondering how can I make my dataset include only 1 locality but also include Sex, and life stages?
I am using the following so far:
dds <- DESeqDataSetFromMatrix(countData = countData, colData = colData, design = ~ Sex + Stage + Locality)
I have 3 replicates for each different locality, as well for each different sex, and life stage.
• 1,654 views
•
link
1 answer
Would this be a solution to this:
dds$group <- factor(paste0(dds$celltype, dds$condition))
design(dds) <- ~ group
dds <- DESeq(dds)
resultsNames(dds)
# e.g. for condition KO cell type 2 vs cell type 1
results(dds, contrast=c("group","2KO","1KO"))
# e.g. for cell type 1 KO vs WT
results(dds, contrast=c("group","1KO","1WT"))
except instead of 2 variables it is 3? Example:
dds$group <- factor(paste0(dds$celltype, dds$condition, dds$place))
• 1 views
•
link
Log in to answer this question.