
Last chance! 50% off unlimited learning
Sale ends in
"plotPCA"(object, intgroup = "condition", ntop = 500, returnData = FALSE)
DESeqTransform
object, with data in assay(x)
,
produced for example by either rlog
or
varianceStabilizingTransformation
.colData(x)
to use for groupingggplot
, which can be assigned and further customized.
# using rlog transformed data:
dds <- makeExampleDESeqDataSet(betaSD=1)
rld <- rlog(dds)
plotPCA(rld)
# also possible to perform custom transformation:
dds <- estimateSizeFactors(dds)
# shifted log of normalized counts
se <- SummarizedExperiment(log2(counts(dds, normalized=TRUE) + 1),
colData=colData(dds))
# the call to DESeqTransform() is needed to
# trigger our plotPCA method.
plotPCA( DESeqTransform( se ) )
Run the code above in your browser using DataLab