Question: Adjusting for known covariates before coexpression analysis with WGCNA
0
gravatar for mikhael.manurung
3 months ago by
mikhael.manurung160 wrote:

Dear all,

I would like to adjust my whole-blood RNA-Seq count data matrix for cell type composition (obtained from hematological analysis & flow cytometry) before doing a coexpression network analysis with WGCNA.

So far, I did the following:

# I use DESeq2's vst to remove mean-variance relationship in the data
dds <- DESeq2::DESeqDataSetFromMatrix(counts, colData, design = ~ group)
dds <- DESeq2::vst(dds, blind = TRUE)
vst <- assay(dds)

# adjust for confounding variables
vst_adjusted <- limma::removeBatchEffect(
  x = vst,
  covariates = c(cellA, cellB, cellC) # numeric vectors containing scaled cell proportion
)

However, according to this link from other forum I can apparently insert the covariates into the design matrix when making the DESeqDataSet and then set blind = FALSE during the variance-stabilizing transformation.

There are also those who recommend using ComBat from sva by inserting my covariates to the mod parameter.

Which one is the best way for my goal?

Thank you for your kind response.

Best regards, Mikhael

sva wgcna coexpression • 143 views
ADD COMMENTlink modified 3 months ago by Peter Langfelder2.1k • written 3 months ago by mikhael.manurung160
Answer: Adjusting for known covariates before coexpression analysis with WGCNA
1
gravatar for Peter Langfelder
3 months ago by
United States
Peter Langfelder2.1k wrote:

It is my understanding that ComBat cannot handle continuous nuisance variables (i.e., variables you want to remove). It can handle continuous covariates which in this case means variables whose effect you want to keep; these are supplied in the 'mod' argument for ComBat.

For removing the effect of continuous covariates, I personally use WGCNA's empiricalBayesLM but removeBatchEffect should work as well. Just check your code, I would expect that you will need

covariates = cbind(cellA, cellB, cellC)

not

covariates = c(cellA, cellB, cellC).
ADD COMMENTlink written 3 months ago by Peter Langfelder2.1k

Dear Peter,

Thank you for your prompt response. For empiricalBayesLM, would you advise feeding the group variables into the retainedCovariates argument?

Best, Mikhael

ADD REPLYlink written 3 months ago by mikhael.manurung160

Retained covariates are those whose effect you want to preserve. My understanding is that you want to remove the cell type abundance/composition information, not retain it; removed variables should go into the removedCovariates argument.

ADD REPLYlink written 3 months ago by Peter Langfelder2.1k
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: 239 users visited in the last hour