Question: error in drawing PCA plot
0
gravatar for hassanlou110
15 months ago by
hassanlou11010
hassanlou11010 wrote:

Hi, I can't draw PCA plot by this command. The following error massage appeared. I appreciated for any one help.

mydata <- ReadAffy()
eset <- rma(mydata)
plotPCA(eset, groups=as.numeric(pData(mydata)[,2]), groupnames=levels(pData(mydata)[,2]))

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘plotPCA’ for signature ‘"ExpressionSet"’

R • 1.1k views
ADD COMMENTlink written 15 months ago by hassanlou11010

Try library("affy") first.

ADD REPLYlink written 15 months ago by Devon Ryan89k

I previously install and load affy packages, however I see that error!

ADD REPLYlink written 15 months ago by hassanlou11010

You need to load the library in every R session you start.

Please add the result of sessionInfo()

ADD REPLYlink written 15 months ago by WouterDeCoster38k

These are the result of sessionInfo()

> library(affycoretools)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘Rcpp’
Error: package or namespace load failed for ‘affycoretools’
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets 
[7] methods   base     

other attached packages:
[1] cluster_2.0.3       limma_3.26.9        affy_1.48.0        
[4] Biobase_2.30.0      BiocGenerics_0.16.1

loaded via a namespace (and not attached):
[1] zlibbioc_1.16.0       BiocInstaller_1.20.3 
[3] DBI_0.7               tools_3.2.3          
[5] affyio_1.40.0         preprocessCore_1.32.0
[7] stats4_3.2.3
ADD REPLYlink modified 15 months ago by Devon Ryan89k • written 15 months ago by hassanlou11010
1

Don't use plotPCA(). Use base R code: A: PCA plot from read count matrix from RNA-Seq

ADD REPLYlink written 15 months ago by Kevin Blighe41k

Your affycoretools installation is broken. That's where the plotPCA() function that you're trying to use should be coming from. If you fix that then it'll work.

ADD REPLYlink written 15 months ago by Devon Ryan89k

Thank you Ryan, do you know how can I fix that? maybe I should install this package as computer administrator?!

ADD REPLYlink written 15 months ago by hassanlou11010

I assume it's installed as your user, so try uninstalling and reinstalling (also as your user). Presumably you'll get an error message upon reinstallation that's informative.

ADD REPLYlink written 15 months ago by Devon Ryan89k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1456 users visited in the last hour