Question: DESEQ2 blocking design doesn't match expectation !
0
gravatar for akp
3.3 years ago by
akp0
akp0 wrote:

I would like to estimate DE between a gene in a case and control, however, there are two underlying teams (A and B) (the experiment was run in two batches) so I would like to consider them as well. 

the data format is sth like below and I have made sure, "condition" and "team" are factor

gene_in_sample condition team
4.1 control team A
3.1 control team B
4.8 case team A
3.8 case team B

but in reality there are 12 controls and 12 cases, which each are also split into half team A and team B

diagdds = phyloseq_to_deseq2(mydata, ~ condition + team)
diagdds = DESeq(diagdds, test="Wald", fitType="parametric")
res = results(diagdds, cooksCutoff = FALSE, contrast = c("condition", "A", "B"))
sigtab.deseq = res[which(res$padj < 0.05), ]

I wonder if the design should be sth like design = ~ condition + team 

I am not sure, if it is right, since I can see a clear distinction in my PCA between these case/control so I expected to see some significant taxa - but by adding "+ condition", there is nothing significant.

I appreciate your comments,

deseq2 block pca • 637 views
ADD COMMENTlink modified 3.3 years ago • written 3.3 years ago by akp0

Can you edit your question to say how many samples there are in each group/team, and also add column headings to your table?

ADD REPLYlink written 3.3 years ago by Ryan C. Thompson7.4k

Does it look better ?

ADD REPLYlink written 3.3 years ago by akp0
Answer: DESEQ2 blocking design doesn't match expectation !
1
gravatar for manasishah86
3.3 years ago by
manasishah8630
manasishah8630 wrote:

Hi akp, 

Please make sure both the Treatment as well as Condition variables are factor variables (using as.factor)

dds$Treatment <- as.factor(dds$Treatment)

dds$Condition <- as.factor(dds$Condition)

That makes a difference with the results! Also make sure you are calling results correctrly:

deseq2res_comparison = results(DESeq2result, contrast = c("Condition", "case", "control"))

Besides that as Ryan said, reproducible code and proper titles will help. 

Best,

Manasi

 

ADD COMMENTlink written 3.3 years ago by manasishah8630

Thanks, in fact it looks more reasonable - but are you sure, the contract should be like that but not the other way around ? ((I have updated my code with the contrast thing))

ADD REPLYlink written 3.3 years ago by akp0

Swapping "case" and "control" in that contrast will not change the p-values. It will simply switch the sign on the log fold change values.

ADD REPLYlink written 3.3 years ago by Ryan C. Thompson7.4k

Hi akp,

As Ryan said it will change the fold change signs. 

if you do ?results in DESeq2 and look at the contrast section , the syntax is "name of the factor in the design formula, the name of the numerator level for the fold change, and the name of the denominator level for the fold change (simplest case)". So hence I am assuming case would be your numerator?  

Anyhow, if my answer above was helpful, please do mark it as accepted. Would like to build me some point karma. ;)

Thanks,

Manasi

ADD REPLYlink written 3.3 years ago by manasishah8630
Please log in to add an answer.

Help
Access

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