Question: Adjusting for known covariates before coexpression analysis with WGCNA
0
4 weeks ago by
mikhael.manurung70 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)

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 • 95 views
modified 4 weeks ago by Peter Langfelder2.1k • written 4 weeks ago by mikhael.manurung70
1
4 weeks 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).


Dear Peter,

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

Best, Mikhael