Taking out , vsd <- varianceStabilizingTransformation(dds) from deseq2
1
1
Entering edit mode
7.2 years ago
1769mkc ★ 1.2k

I have five different cell type i m doing both rld and vsd transformation .I want the vsd data to perform other analyiss such as Self organising maps as well as WGCNA . How can i take out the vsd transformed data

Im using this code

vsd <- varianceStabilizingTransformation(dds, blind=FALSE)

To get all my normalised data set im using this code

resOrdered <- res[order(res$padj),]
summary(resOrdered)
resdata <- merge(as.data.frame(res), as.data.frame(counts(dds, normalized=TRUE)), by="row.names", sort=FALSE)
names(resdata)[1] <- "Gene"

head(resdata)
dim(resdata)
## Write results
write.csv(resdata, file="Primary_cell_line__normalised_data.csv",row.names = FALSE,quote = F)

But this is for the rlog transformation what i saw in the manual if im not wrong , how can i do the same for vsd transformed data ?Any suggestion or help would be highly appreciated

rna-seq R • 6.0k views
ADD COMMENT
3
Entering edit mode
7.2 years ago

Your second chunk of code is not for rlog transformed data but for the normalised counts. If you want the data in the same shape as the normalised counts but for rlog or vst transformed data then you need something along the lines of:

vsd <- assay(varianceStabilizingTransformation(dds, blind=FALSE))
rlog <- assay(rlogTransformation(dds, blind=FALSE))
ADD COMMENT
0
Entering edit mode

so i have to do use your code then for rlog or vst ,but is it after normalisation ?

ADD REPLY
0
Entering edit mode

Have a look at ?varianceStabilizingTransformation

This function calculates a variance stabilizing transformation (VST) from the fitted dispersion-mean relation(s) and then transforms the count data (normalized by division by the size factors or normalization factors), yielding a matrix of values which are now approximately homoskedastic (having constant variance along the range of mean values). The transformation also normalizes with respect to library size. The rlog is less sensitive to size factors, which can be an issue when size factors vary widely. These transformations are useful when checking for outliers or as input for machine learning techniques such as clustering or linear discriminant analysis.

ADD REPLY
0
Entering edit mode

yes i looked into the function my question is the way im getting a normalised data set for all the sample and gene can i get the same for vst or rlog

i using this code

rld <- rlog(dds, blind=FALSE)
vsd <- varianceStabilizingTransformation(dds, blind=FALSE)

am i doing it correctly or there is some error?

ADD REPLY

Login before adding your answer.

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