DESeq2 ANOVADEV giving strange result
1
0
Entering edit mode
szenitha ▴ 20
@szenitha-10863
Last seen 8.1 years ago

Hello All,

I am using DESeq2 to perform something like a one-way ANOVA. When I tried running the code on the datasets I have, it seems to be working fine for all except for one dataset. This dataset is from the organism fly while the others are either mouse or human.When I  run deseq2 with 'LRT' for the fly dataset I get the following result.Below is the code I used. Since there were hidden batch effects for the dataset, I have included it as co-variates in the design.

dds.fc<-DESeqDataSetFromMatrix(data,colData=pheno,design=~ condition)

# if hidden batch is present

#compute null and full model
mod =model.matrix(~condition, data=colData(dds.fc))
mod0 = model.matrix(~1,data=colData(dds.fc))

#Get normalized data
dds.norm <- dds.fc
dds.norm=estimateSizeFactors(dds.norm)
data_normalized <- counts(dds.norm, normalized=TRUE) #normalizing data

n.sv = num.sv(data_normalized,mod,method="be")

#as default remove 3 surrogate variables

rld<-rlogTransformation(dds.fc)

svobj = sva(assay(rld), mod, mod0, n.sv=3)

ddssva <- dds.fc
ddssva$SV1 <- svobj$sv[,1]
ddssva$SV2 <- svobj$sv[,2]
ddssva$SV3 <- svobj$sv[,3]
design(ddssva) <- ~ SV1 + SV2 + SV3 + condition

#execute if no batch effect   dds<-DESeq(dds.fc,test = "LRT",reduced = ~1)

#if hidden batch effect present then

dds<-DESeq(ddssva,test = "LRT",reduced = ~1)

res<-results(dds)

http://imgur.com/DYSR8LZ
 

deseq2 anova • 1.7k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 20 hours ago
United States

Your last likelihood ratio test is testing whether any of the variables (SV1 + SV2 + SV3 + condition) are informative for describing differences in counts across samples, because you used a reduced design of ~1.

The surrogate variables should be included in the reduced design.

The typical use of an LRT would be, e.g., if you had full=~batch + condition, you would have reduced=~batch.

ADD COMMENT
0
Entering edit mode

Thank you Michael. I now included the surrogate variables and I'm still getting the same output.
dds<-DESeq(ddssva,test = "LRT",reduced = ~SV1+SV2+SV3)

ADD REPLY
0
Entering edit mode

"getting the same output"

You should't get the same output if you perform a new LRT with different reduced design. Maybe check over your code.

Also, you'll need to describe in more detail what you are seeing that you think is in error.

ADD REPLY
0
Entering edit mode

Apologies. I went over my code again and realized why I was getting such an output. There was a problem during reading of a file.My code works fine now. Thank you for helping me out.
 

ADD REPLY

Login before adding your answer.

Traffic: 719 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