How to correct for known and surrogate variables in DESeq2?
Entering edit mode
Crystal571 • 0
Last seen 6 months ago
United States

Dear all, We have RNA-seq data of 9 High force versus 9 Low force scallop adductors along with known covariates like Height, Length, Width, Weight (I have cut() them )and Strain. So in DESeq2 I could correct for these covariates as follows:

#We only chose Height, Weight and Strain as covariates because of their higher Pearson correlation with Force.
dds <- DESeqDataSetFromMatrix( countData = expr, colData = subt, design =~Height+Weight+Strain+Group)
dds <- DESeq(dds)
dat  <- counts(dds, normalized = TRUE)
keep  <- rowMeans(dat) > 1
dat  <- dat[keep, ]
mod  <- model.matrix(~Height+Weight+Strain+Group, colData(dds))
mod0 <- model.matrix(~Height+Weight+Strain, colData(dds))
svseq <- svaseq(dat, mod, mod0)
dds$SV1 <- svseq$sv[,1]
dds$SV2 <- svseq$sv[,2]
dds$SV3 <- svseq$sv[,3]

My questions are:

1.The design that corrects for both known and unknown surrogate variables, which one is correct and what leads to the difference of DEGs?

(1) gained 850 DEGs

design(dds) <-~SV1+SV2+SV3+Height+Weight+Strain+Group


(2) gained 214 DEGs

design(dds) <-~SV1+SV2+SV3+Group

2.Which one is a better choice for svaseq?


mod  <- model.matrix(~Height+Weight+Strain+Group, colData(dds))
mod0 <- model.matrix(~Height+Weight+Strain, colData(dds))



mod  <- model.matrix(~Group, colData(dds))
mod0 <- model.matrix(~1, colData(dds))

3.How should I correct the design if I decide the second mod mod0 for svaseq? just like that?

design(dds) <-~SV+Height+Weight+Strain+Group # gained 1187 DEGs

4.If I want to remove batch effect for downstream analysis, did I encode right?

vsd<-vst(dds,blind = F)
covariates = colData(dds)[,c("SV1",'SV2',"SV3")]
assay(vsd) <- limma::removeBatchEffect(assay(vsd), batch1=subt$Height,batch2=subt$Batch,batch3=subt$Strain,covariates = 
covariates,design=model.matrix(~Group, data=subt))

Appreciate for all responses and advice.

Best regards, Crystal571

DESeq2 BatchEffect sva limma • 641 views
Entering edit mode

Hey Crystal, did you end up getting advice? I am facing the exact same questions that you are having right now. Would be very grateful if you could share your experience!

Entering edit mode

To question 3: if you model technical variation using only ~group vs ~1, then it will be correlated with known technical variables, which you would then exclude.

Entering edit mode
Last seen 14 minutes ago
United States

Your questions are off-topic for this site, which is intended to help people with technical issues rather than statistical questions. You could always ask over on, but I would caution against asking for analysis advice from people who know nothing about your data. If you are unsure, it is much better to find someone local who can help.

Entering edit mode

OK, thanks a lot for your advice.


Login before adding your answer.

Traffic: 680 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6