hbc / bcbioRNASeq

R package for bcbio RNA-seq analysis.
https://bioinformatics.sph.harvard.edu/bcbioRNASeq
GNU Affero General Public License v3.0
58 stars 21 forks source link

error with plotDEGHeatmap and plotDEGPCA #112

Closed mistrm82 closed 6 years ago

mistrm82 commented 6 years ago

this was working just fine but now I get this error:

> plotDEGPCA(
+     results = res,
+     counts = counts(bcbDE, normalized = "vst"),
+     label = TRUE, interestingGroups="Genotype") +
+     ggtitle("PCA Plot") +
+     theme(plot.title=element_text(hjust=0.5))
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function 'plotDEGPCA' for signature '"DESeqResults", "matrix"'

I have a DESq results object as input so not sure why it's complaining

mjsteinbaugh commented 6 years ago

That error is an S4 message telling you that the signature (results, counts) doesn't support a DESeqResults and a matrix. Instead, both plotDEGHeatmap() and plotDEGPCA() require a SummarizedExperiment object for the counts argument. You can pass in a DESeqTransform (recommended), DESeqDataSet (which will plot the normalized counts), or a bcbioRNASeq object. We are using SummarizedExperiment instead of a matrix here because they contain necessary sample metadata in colData() that we use for visualization in these functions.