I am going through the manual of DESeq2, there are some places I still don't understand:
dds <- DESeqDataSetFromMatrix(countData =countdata, colData = coldata, design = ~ cell +dex)
in the design the cell are cell type and dex contains untreat and treat. in the results extraction part, the example in the manual is
results(dds, contrast=c("cell", "N061011", "N61311)
My understanding: this is the results from differential expression between 2 cell types: N061011 and N61311, no matter treat or untreat?
puzzle1 :if I want to compare the differential expresssion between treat and untreat in a certain cell type, say, N061011 what should I do?
With this, I was guided to the page of results function in detail at here But it raised me more questions :
- what is the difference between design = ~ genotype + condition + genotype:condition and design = ~ genotype + condition
take 2 genotypes and 2 conditons for example; in the manual it is:
dds <- makeExampleDESeqDataSet(n=100,m=12)
dds$genotype <- factor(rep(rep(c("I","II"),each=3),2))
design(dds) <- ~ genotype + condition + genotype:condition
dds <- DESeq(dds)
resultsNames(dds)
# the condition effect for genotype I (the main effect)
results(dds, contrast=c("condition","B","A"))
# the condition effect for genotype II
# this is, by definition, the main effect *plus* the interaction term
# (the extra condition effect in genotype II compared to genotype I).
results(dds, list( c("condition_B_vs_A","genotypeII.conditionB") ))
# the interaction term, answering: is the condition effect *different* across genotypes?
results(dds, name="genotypeII.conditionB")
After reading this I still have some questions to make it through:
2.How can I know in my real experiments which is the main effects? 3.why the command for condition effect on genotype I and genotype II is so different?
the last command results(dds, name="genotypeII.conditionB), it only mentions genotypeII and conditionB, in he comments it was explained as the condition effect "differences"across genotypes, I am a little bit confused. So my next question is:
4.how to interpret the meaning of resultsNames(dds)?
Too many questions. Thanks for your time! Any advice on these questions or how I can go through it better will be greatly appreciated.
Greatly appreciated! Will practice your advice.