Hello, I used plotPCA function in DESeq2.
Thanks in advance for great help!
Best,
Yue
> plotPCA(vsd, intgroup=c("condition"))
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function 'exprs' for signature '"DESeqTransform"'
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] affycoretools_1.58.4 RColorBrewer_1.1-2 pheatmap_1.0.12
[4] vsn_3.54.0 ggplot2_3.3.1 DESeq_1.38.0
[7] lattice_0.20-41 locfit_1.5-9.4 data.table_1.12.8
[10] IHW_1.14.0 airway_1.6.0 pasilla_1.14.0
[13] tximeta_1.4.5 DESeq2_1.26.0 SummarizedExperiment_1.16.1
[16] DelayedArray_0.12.3 BiocParallel_1.20.1 matrixStats_0.56.0
[19] Biobase_2.46.0 GenomicRanges_1.38.0 GenomeInfoDb_1.22.1
[22] IRanges_2.20.2 S4Vectors_0.24.4 BiocGenerics_0.32.0
[25] tximportData_1.14.0 readr_1.3.1 tximport_1.14.2
[28] limma_3.42.2
loaded via a namespace (and not attached):
[1] R.utils_2.9.2 tidyselect_1.1.0 RSQLite_2.2.0 AnnotationDbi_1.48.0
[5] htmlwidgets_1.5.1 grid_3.6.1 munsell_0.5.0 codetools_0.2-16
[9] preprocessCore_1.48.0 withr_2.2.0 colorspace_1.4-1 Category_2.52.1
[13] OrganismDbi_1.28.0 knitr_1.28 rstudioapi_0.11 labeling_0.3
[17] slam_0.1-47 bbmle_1.0.23.1 GenomeInfoDbData_1.2.2 lpsymphony_1.14.0
[21] mixsqp_0.3-43 hwriter_1.3.2 bit64_0.9-7 farver_2.0.3
[25] coda_0.19-3 vctrs_0.3.1 generics_0.0.2 xfun_0.14
[29] biovizBase_1.34.1 BiocFileCache_1.10.2 R6_2.4.1 Glimma_1.14.0
[33] apeglm_1.8.0 invgamma_1.1 AnnotationFilter_1.10.0 bitops_1.0-6
[37] reshape_0.8.8 assertthat_0.2.1 scales_1.1.1 nnet_7.3-14
[41] gtable_0.3.0 affy_1.64.0 ggbio_1.34.0 ensembldb_2.10.2
[45] rlang_0.4.6 genefilter_1.68.0 splines_3.6.1 rtracklayer_1.46.0
[49] lazyeval_0.2.2 acepack_1.4.1 dichromat_2.0-0 hexbin_1.28.1
[53] checkmate_2.0.0 BiocManager_1.30.10 reshape2_1.4.4 GenomicFeatures_1.38.2
[57] backports_1.1.7 Hmisc_4.4-0 RBGL_1.62.1 tools_3.6.1
[61] affyio_1.56.0 ellipsis_0.3.1 gplots_3.0.3 ff_2.2-14.2
[65] Rcpp_1.0.4.6 plyr_1.8.6 base64enc_0.1-3 progress_1.2.2
[69] zlibbioc_1.32.0 purrr_0.3.4 RCurl_1.98-1.2 prettyunits_1.1.1
[73] rpart_4.1-15 openssl_1.4.1 ashr_2.2-47 cluster_2.1.0
[77] magrittr_1.5 truncnorm_1.0-8 mvtnorm_1.1-1 SQUAREM_2020.3
[81] ProtGenerics_1.18.0 hms_0.5.3 xtable_1.8-4 XML_3.99-0.3
[85] emdbook_1.3.12 jpeg_0.1-8.1 gcrma_2.58.0 gridExtra_2.3
[89] compiler_3.6.1 biomaRt_2.42.1 bdsmatrix_1.3-4 tibble_3.0.1
[93] KernSmooth_2.23-17 crayon_1.3.4 ReportingTools_2.26.0 R.oo_1.23.0
[97] htmltools_0.5.0 GOstats_2.52.0 Formula_1.2-3 geneplotter_1.64.0
[101] DBI_1.1.0 dbplyr_1.4.4 MASS_7.3-51.6 rappdirs_0.3.1
[105] Matrix_1.2-17 R.methodsS3_1.8.0 gdata_2.18.0 pkgconfig_2.0.3
[109] GenomicAlignments_1.22.1 numDeriv_2016.8-1.1 foreign_0.8-76 foreach_1.5.0
[113] annotate_1.64.0 XVector_0.26.0 AnnotationForge_1.28.0 stringr_1.4.0
[117] VariantAnnotation_1.32.0 digest_0.6.25 graph_1.64.0 Biostrings_2.54.0
[121] htmlTable_1.13.3 edgeR_3.28.1 GSEABase_1.48.0 curl_4.3
[125] Rsamtools_2.2.3 gtools_3.8.2 lifecycle_0.2.0 jsonlite_1.6.1
[129] PFAM.db_3.10.0 askpass_1.1 BSgenome_1.54.0 pillar_1.4.4
[133] GGally_2.0.0 httr_1.4.1 survival_3.2-3 GO.db_3.10.0
[137] glue_1.4.1 fdrtool_1.2.15 iterators_1.0.12 png_0.1-7
[141] bit_1.1-15.2 Rgraphviz_2.30.0 stringi_1.4.6 blob_1.2.1
[145] oligoClasses_1.48.0 latticeExtra_0.6-29 caTools_1.18.0 memoise_1.1.0
[149] dplyr_1.0.0 irlba_2.3.3
> sessionInfo
function (package = NULL)
{
z <- list()
z$R.version <- R.Version()
z$platform <- z$R.version$platform
if (nzchar(.Platform$r_arch))
z$platform <- paste(z$platform, .Platform$r_arch, sep = "/")
z$platform <- paste0(z$platform, " (", 8 * .Machine$sizeof.pointer,
"-bit)")
z$locale <- Sys.getlocale()
z$running <- osVersion
z$RNGkind <- RNGkind()
if (is.null(package)) {
package <- grep("^package:", search(), value = TRUE)
keep <- vapply(package, function(x) x == "package:base" ||
!is.null(attr(as.environment(x), "path")), NA)
package <- .rmpkg(package[keep])
}
pkgDesc <- lapply(package, packageDescription, encoding = NA)
if (length(package) == 0)
stop("no valid packages were specified")
basePkgs <- sapply(pkgDesc, function(x) !is.null(x$Priority) &&
x$Priority == "base")
z$basePkgs <- package[basePkgs]
if (any(!basePkgs)) {
z$otherPkgs <- pkgDesc[!basePkgs]
names(z$otherPkgs) <- package[!basePkgs]
}
loadedOnly <- loadedNamespaces()
loadedOnly <- loadedOnly[!(loadedOnly %in% package)]
if (length(loadedOnly)) {
names(loadedOnly) <- loadedOnly
pkgDesc <- c(pkgDesc, lapply(loadedOnly, packageDescription))
z$loadedOnly <- pkgDesc[loadedOnly]
}
z$matprod <- as.character(options("matprod"))
es <- extSoftVersion()
z$BLAS <- as.character(es["BLAS"])
z$LAPACK <- La_library()
class(z) <- "sessionInfo"
z
}
<bytecode: 0x55cc2a8c1198>
<environment: namespace:utils>
> plotPCA
nonstandardGenericFunction for "plotPCA" defined from package "BiocGenerics"
function (object, ...)
{
standardGeneric("plotPCA")
}
<bytecode: 0x55cbfa16ddc0>
<environment: 0x55cbfa166f00>
Methods may be defined for arguments: object
Use showMethods("plotPCA") for currently available ones.
vsd
is supposed to be aDESeqTransform
object. From the manual:So, something like:
I guess the function is masked by any package for microarray analysis because it tries to call
exprs()
onvsd
.Could be - moved back to comment. plotPCA is overloaded between DESeq2 and affycoretools
One note (more for developers than users) is that if a method masks plotPCA or other function names that are listed as generics here, they can avoid this by exporting a method for those generics.
Thank you all of yours' great help! Best,
Yue
Try to avoid loading DESeq. This version is official deprecated.
Hello Kevin Blighe, Thank you so much for your great help! Best, Yue
Hello Kevin Blighe, Thank you so much for your great help! Best, Yue