Created
August 28, 2015 17:14
-
-
Save mikelove/3fb993003ce5389849b7 to your computer and use it in GitHub Desktop.
fast VST
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(DESeq2) | |
# simulate data | |
dds <- makeExampleDESeqDataSet(n=80000,m=100) | |
# this takes 10 seconds on my machine | |
dds <- estimateSizeFactors(dds) | |
baseMean <- rowMeans(counts(dds, normalized=TRUE)) | |
sum(baseMean > 1) | |
idx <- sample(which(baseMean > 5), 1000) | |
dds.sub <- dds[idx, ] | |
dds.sub <- estimateDispersions(dds.sub) | |
dispersionFunction(dds) <- dispersionFunction(dds.sub) | |
vsd <- varianceStabilizingTransformation(dds, blind=FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment