DESEQ2 blocking design doesn't match expectation !
1
0
Entering edit mode
akp • 0
@akp-8846
Last seen 8.2 years ago

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 • 1.7k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

Does it look better ?

ADD REPLY
1
Entering edit mode
manasishah86 ▴ 30
@manasishah86-11034
Last seen 8.2 years ago

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 689 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6