Deseq2 normalization for WGCNA
2
0
Entering edit mode
jms2520 • 0
@3184ac53
Last seen 8 months ago
United States

Hello all,

I have a large RNA-seq dataset that I am trying to run WGCNA on. The data set has many variables including (including 3 brain regions, 3 ages, sex, 2 genotypes.) I have been advised to use Deseq2 normalization for these samples prior to doing WGCNA.

I am struggling with two aspects. 1) I assume I am not actually doing Deseq2() differential expression on this data, rather just using the normalization method of varianceStabilizingTransformation on the raw counts

2) I am struggling with the "design" aspect of these functions as I think that all three aspects (region, age, sex and genotype) should all play a role in the design. Does the design even matter if I am not using this for differential expression? Is even used for normalization or just for the differential expression?

countData= read.csv("Raw.Counts.csv, sep = ",", rownames=Genes)
colData=read.csv("Sample.info.numerical.csv", sep = ",", rownames=Sample_ID)
dds<- DESeqDataSetFromMatrix(countData, colData, design=???)
dds <- estimateSizeFactors(dds)
vsd <- varianceStabilizingTransformation(dds, blind=T)
normalized_counts <- counts(dds, normalized=TRUE)
RNASeq Deseq2 DESeq2 WGCNA • 1.6k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

There have been a number of posts on DESeq2 + WGCNA, you can google the support site by adding "site:support.bioconductor.org" to normal google search.

ADD COMMENT
0
Entering edit mode
swbarnes2 ★ 1.2k
@swbarnes2-14086
Last seen 3 hours ago
San Diego

I think its more common to call the EstimateSizeFactors step 'normalization', so that might be what you want. Which is what you are doing, since the vsd object you make with varianceStabilisingTranforamtion isn't being used at all after being created. EstimateSizeFactor absolutely does not use the design at all; you can run it with a design of ~1 if you want.

ADD COMMENT
0
Entering edit mode

I specifically was advised to use vsd <- varianceStabilizingTransformation(dds, blind=T) to my counts before moving onto WGCNA. So I would get the counts data from the object created by varianceStabilizingTransformation to use as my input for further analysis using WGCNA

ADD REPLY
0
Entering edit mode

With blind=TRUE, the design isn't used at all, you can set ~1 when creating the object.

With blind=FALSE, the design is used but only to determine the global amount of within-group variation in the dataset. It is not used when applying the transformation to the data. E.g. imagine we compute a function f(x) -- and computing that function involves knowing globally the amount of within-group variation, but then we apply that fixed function to the scaled counts from all samples.

ADD REPLY
0
Entering edit mode

My question really is, if I have a have a counts matrix, can I just read in the table and proceed with varianceStabilizingTransformation() or do I need to turn it into a Deseq object first? Do I need to use EstimateSizeFactor() first and then run varianceStabilizingTransformation()?

ADD REPLY
0
Entering edit mode

I'd recommend:

dds <- DESeqDataSetFromMatrix(counts, colData=data.frame(sample=colnames(counts)), ~1)
vsd <- vst(dds, blind=FALSE)
mat <- assay(vsd)

Then you have VS transformed data where sequencing depth variation is removed.

ADD REPLY
0
Entering edit mode

May I know if set blind=TRUE in vst is equivalent to set design as ~1? Thanks!

ADD REPLY
1
Entering edit mode

Yes this is what blind=TRUE does.

ADD REPLY

Login before adding your answer.

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