Question: Issue with DESeq: when using DESeqDataSet object what to put under argument design when there are 3 variables
gravatar for catglen012
11 days ago by
catglen0120 wrote:


I have one type of plant collected from 3 different localities (called population), and they are also 2 different sexes, and are at 2 different life stages (called stages).

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.

This is how the some of the first lines in my ColData look like:

gene_id,                  Stage,   Sex,  Population 
rna-seq deseq2 R • 139 views
ADD COMMENTlink modified 11 days ago • written 11 days ago by catglen0120
gravatar for catglen012
11 days ago by
catglen0120 wrote:

Would this be a solution to this:

dds$group <- factor(paste0(dds$celltype, dds$condition))
design(dds) <- ~ group
dds <- DESeq(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))

ADD COMMENTlink written 11 days ago by catglen0120
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1544 users visited in the last hour