Hi,
I tried use DESeq2's PlotMA function and got the following error message -
> plotMA(resKD_fc1)
Error in as.vector(data):
no method for coercing this S4 class to a vector
How do i resolve this issue? And what does it mean?
The sessionInfo is as follows -
> sessionInfo()
R version 3.1.3 (2015-03-09) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: OS X 10.10.3 (Yosemite) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] grid parallel stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] gridExtra_0.9.1 gProfileR_0.5.3 pheatmap_1.0.2 RColorBrewer_1.1-2 [5] gplots_2.17.0 Biobase_2.26.0 edgeR_3.8.6 limma_3.22.7 [9] DESeq2_1.6.3 RcppArmadillo_0.5.100.1.0 Rcpp_0.11.6 GenomicRanges_1.18.4 [13] GenomeInfoDb_1.2.5 IRanges_2.0.1 S4Vectors_0.4.0 BiocGenerics_0.12.1 [17] ggdendro_0.1-15 ggplot2_1.0.1 BiocInstaller_1.16.4 loaded via a namespace (and not attached): [1] acepack_1.3-3.3 annotate_1.44.0 AnnotationDbi_1.28.2 base64enc_0.1-2 BatchJobs_1.6 [6] BBmisc_1.9 BiocParallel_1.0.3 bitops_1.0-6 brew_1.0-6 caTools_1.17.1 [11] checkmate_1.5.2 cluster_2.0.1 codetools_0.2-11 colorspace_1.2-6 DBI_0.3.1 [16] digest_0.6.8 fail_1.2 foreach_1.4.2 foreign_0.8-63 Formula_1.2-1 [21] gdata_2.16.1 genefilter_1.48.1 geneplotter_1.44.0 gtable_0.1.2 gtools_3.4.2 [26] Hmisc_3.16-0 iterators_1.0.7 KernSmooth_2.23-14 labeling_0.3 lattice_0.20-31 [31] latticeExtra_0.6-26 locfit_1.5-9.1 magrittr_1.5 MASS_7.3-40 munsell_0.4.2 [36] nnet_7.3-9 plyr_1.8.2 proto_0.3-10 RCurl_1.95-4.6 reshape2_1.4.1 [41] rpart_4.1-9 RSQLite_1.0.0 scales_0.2.4 sendmailR_1.2-1 splines_3.1.3 [46] stringi_0.4-1 stringr_1.0.0 survival_2.38-1 tools_3.1.3 XML_3.98-1.1 [51] xtable_1.7-4 XVector_0.6.0
Additional information about the dataset are --
> mcols(resKD_fc1, use.names=TRUE) DataFrame with 6 rows and 2 columns type description <character> <character> baseMean intermediate mean of normalized counts for all samples log2FoldChange results log2 fold change (MAP): sampletypeMOV10_knockdown vs sampletypesiRNA lfcSE results standard error: sampletypeMOV10_knockdown vs sampletypesiRNA stat results Wald statistic: sampletypeMOV10_knockdown vs sampletypesiRNA pvalue results Wald test p-value: sampletypeMOV10_knockdown vs sampletypesiRNA padj results BH adjusted p-values > class(resKD) [1] "DESeqResults" attr(,"package") [1] "DESeq2"
hi Jessica,
This is because limma is masking the name which is used by DESeq2 for this function. because limma was loaded after DESeq2, when you type
it goes to the limma function to look for the code for plotting 'x'. You should be able to avoid this with:
Or by loading edgeR before loading DESeq2.