How to get normalized counts corrected for variables in the design matrix of DESeq2 as an input for WGCNA
2
0
Entering edit mode
8 months ago
Sara ▴ 30

Hi everyone,

I am analyzing Bulk RNA-Seq data, I generated the counts with HTSeqcount and I analyzed them with DESeq2.

Then, I want to get the normalized counts corrected for the variables in my design matrix (Like age, sex, RIN, ...) to use it as an input for WGCNA.

But I realized when I am using variance normalized counts (vst-counts) from DESeq2 they are not corrected for variables in my design matrix.

I was wondering which normalized counts I can use that can be corrected for variables in my design matrix, therefore it can be used as an input for WGCNA?

I also tried to use "limma::removeBatchEffect" but still, it didn't really correct my count for those variables.

I would be grateful if anyone could provide/recommend any solutions, please!

Here is the code that I used in my DESeq2:

dds <- DESeqDataSetFromHTSeqCount(sampleTable=sampleTable,
                                  directory=folder,
                                  design=~Plate+RIN+Sex+Age+condition+PC3+PC2+PC1)

dds <- estimateSizeFactors(dds)
keep <- rowSums( counts(dds) >= 10 ) >= 20 #filters out genes 
dds <- dds[keep,]

colData(dds)$condition <- relevel(colData(dds)$condition, ref = "Control")

dds<- DESeq(dds)

vsd <- vst(dds, blind = FALSE)

I want to get the normalized counts adjusted for sex, RIN, plate, age, PC1, PC2, PC3

Thank you in advance!

WGCNA vst DESeq2 • 983 views
ADD COMMENT
2
Entering edit mode
8 months ago

vst doesn't perform any batch correction. Check these posts on how to use vst to get the normalized transformed count data for WGCNA: link1;link2.

Regarding WGCNA, you can follow the module-trait relationship analysis to check which modules correlate with RIN, sex, age etc...

ADD COMMENT
0
Entering edit mode

Thanks for your comment. yes, that's my point the vst doesn't perform the batch correction; even after using limma::removeBatchEffect still, the counts are somehow the same. And in WGCNA I see modules that are highly correlated with sex, age, and cell type proportions, ... Are there other methods or normalized counts that can be corrected for the batches that I can use as input for WGCNA?

ADD REPLY
1
Entering edit mode
8 months ago
bk11 ★ 2.4k

Please correct your title there is typo WGCAN for WGCNA. You can get normalized counts as follows-

normalized_counts=counts(dds, normalized=TRUE)
ADD COMMENT

Login before adding your answer.

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