Question: Calculating significant variance of gene expression across multiple samples
gravatar for caggtaagtat
2.1 years ago by
caggtaagtat1.3k wrote:


For my experiments, I want to calculate if a gene is significantly variable expressed across 40 biological similar samples in R. Until know, I assigned two random groups of the size of 20 and followed the DSEQ2 protocol for differential expression. However, 99.9% of the genes were asigned with an adjusted p-value of 0.9987168, which does not allow further differenciation. Maybe just looking at the variance of the normalized gene expression could be an alternative solution. So my question is, how would you check for the most variable expressed genes across 40 samples and would you use the DESEQ2 package for that purpose?

dseq2 rna-seq dge R • 1.4k views
ADD COMMENTlink modified 2.1 years ago by ATpoint42k • written 2.1 years ago by caggtaagtat1.3k
gravatar for ATpoint
2.1 years ago by
ATpoint42k wrote:

You can start by transforming your raw counts with either vst or rlog, followed by using the rowVars function to select the most variable genes:

## be dds your DESeq2 object:
vsd <- vst(dds)

rv <- rowVars(assay(vsd))

## say you want the top 500 (ntop=500)
ntop <- 500
select <- order(rv, decreasing = TRUE)[seq_len(min(ntop, length(rv)))]

## get the DESeqTransform object with the top 500 most variable genes
vsd500 <- vsd[select,]

This is pretty much copied from getMethod("plotPCA", "DESeqTransform"), the PCA function of DESeq2 that by default performs the PCA with the 500 most variable genes.

ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by ATpoint42k

Thank you, I will try that!

ADD REPLYlink written 2.1 years ago by caggtaagtat1.3k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1064 users visited in the last hour