Error in install.packages: unable to install packages
2
0
Entering edit mode
Khawaja • 0
@khawaja-7772
Last seen 6.6 years ago
India

I have deployed an application. I use many bioconductor  R packages. Locally the application works fine but not fine when deployed online (I guess affy and simpleaffy R packages are not working properly). I get a warning message on using


ReadAffy(filename)

Warning in install.packages(cdfname, lib = lib, repos = biocinstallRepos()

followed by an error message

Error in install.packages: unable to install packages

Session information:

* sessionInfo()

R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

locale:
 [1] LC_CTYPE=en_IN.UTF-8       LC_NUMERIC=C               LC_TIME=en_IN.UTF-8        LC_COLLATE=en_IN.UTF-8     LC_MONETARY=en_IN.UTF-8   
 [6] LC_MESSAGES=en_IN.UTF-8    LC_PAPER=en_IN.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_IN.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] hgu133a2cdf_2.18.0    RMySQL_0.9-3          DBI_0.5-1             hwgcod.db_3.4.0       h10kcod.db_3.4.0      h20kcod.db_3.4.0      org.Hs.eg.db_3.4.0   
 [8] AnnotationDbi_1.36.0  lumi_2.26.3           simpleaffy_2.50.0     gcrma_2.46.0          codelink_1.42.0       limma_3.30.3          dplyr_0.5.0          
[15] affy_1.52.0           data.table_1.9.6      plyr_1.8.4            markdown_0.7.7        hgu133plus2cdf_2.18.0 genefilter_1.56.0     zlibbioc_1.20.0      
[22] affyio_1.44.0         preprocessCore_1.36.0 Biostrings_2.42.0     XVector_0.14.0        IRanges_2.8.1         S4Vectors_0.12.0      biomaRt_2.30.0       
[29] BiocParallel_1.8.1    Biobase_2.34.0        BiocGenerics_0.20.0   shiny_0.14.2          BiocInstaller_1.24.0  devtools_1.12.0       rsconnect_0.5        

loaded via a namespace (and not attached):
 [1] nlme_3.1-128               bitops_1.0-6               matrixStats_0.51.0         RColorBrewer_1.1-2         httr_1.2.1                
 [6] GenomeInfoDb_1.10.1        tools_3.3.2                doRNG_1.6                  nor1mix_1.2-2              R6_2.2.0                  
[11] KernSmooth_2.23-15         mgcv_1.8-16                colorspace_1.3-0           methylumi_2.20.0           withr_1.0.2               
[16] base64_2.0                 curl_2.2                   git2r_0.15.0               chron_2.3-47               pkgmaker_0.22             
[21] rtracklayer_1.34.1         quadprog_1.5-5             stringr_1.1.0              digest_0.6.10              Rsamtools_1.26.1          
[26] illuminaio_0.16.0          siggenes_1.48.0            GEOquery_2.40.0            htmltools_0.3.5            RSQLite_1.0.0             
[31] jsonlite_1.1               mclust_5.2                 RCurl_1.95-4.8             magrittr_1.5               Matrix_1.2-7.1            
[36] Rcpp_0.12.7                stringi_1.1.2              nleqslv_3.0.3              MASS_7.3-45                RJSONIO_1.3-0             
[41] SummarizedExperiment_1.4.0 bumphunter_1.14.0          grid_3.3.2                 minfi_1.20.0               lattice_0.20-34           
[46] splines_3.3.2              multtest_2.30.0            GenomicFeatures_1.26.0     annotate_1.52.0            locfit_1.5-9.1            
[51] knitr_1.15                 beanplot_1.2               GenomicRanges_1.26.1       rngtools_1.2.4             codetools_0.2-15          
[56] XML_3.98-1.5               packrat_0.4.8-1            httpuv_1.3.3               foreach_1.4.3              openssl_0.9.5             
[61] reshape_0.8.6              assertthat_0.1             mime_0.5                   xtable_1.8-2               survival_2.40-1           
[66] tibble_1.2                 iterators_1.0.8            GenomicAlignments_1.10.0   registry_0.3               memoise_1.0.0             

* Out-of-date packages
       Package  LibPath                   Installed Built   ReposVer Repository                            
DBI    "DBI"    "/usr/lib/R/site-library" "0.2-7"   "3.0.0" "0.5-1"  "https://cran.rstudio.com/src/contrib"
RMySQL "RMySQL" "/usr/lib/R/site-library" "0.9-3"   "3.0.0" "0.10.9" "https://cran.rstudio.com/src/contrib"

update with biocLite()

Error: 2 package(s) out of date

 

Following are session logs while running application

2016-11-17T06:05:35.808039+00:00 shinyapps[137665]: Attaching package: ‘limma’
2016-11-17T06:05:35.808039+00:00 shinyapps[137665]:
2016-11-17T06:05:35.808774+00:00 shinyapps[137665]: The following object is masked from ‘package:BiocGenerics’:
2016-11-17T06:05:35.808776+00:00 shinyapps[137665]:
2016-11-17T06:05:35.808777+00:00 shinyapps[137665]:     plotMA
2016-11-17T06:05:35.933352+00:00 shinyapps[137665]: Attaching package: ‘codelink’
2016-11-17T06:05:35.933353+00:00 shinyapps[137665]:
2016-11-17T06:05:35.934025+00:00 shinyapps[137665]: The following objects are masked from ‘package:limma’:
2016-11-17T06:05:35.934027+00:00 shinyapps[137665]:     plotDensities, plotMA
2016-11-17T06:05:35.934028+00:00 shinyapps[137665]:
2016-11-17T06:05:35.934784+00:00 shinyapps[137665]: The following object is masked from ‘package:affy’:
2016-11-17T06:05:35.934786+00:00 shinyapps[137665]:
2016-11-17T06:05:35.934786+00:00 shinyapps[137665]:     probeNames
2016-11-17T06:05:35.808777+00:00 shinyapps[137665]:
2016-11-17T06:05:35.936117+00:00 shinyapps[137665]:     plotMA
2016-11-17T06:05:35.933347+00:00 shinyapps[137665]:
2016-11-17T06:05:35.952677+00:00 shinyapps[137665]: Loading required package: gcrma
2016-11-17T06:05:35.934026+00:00 shinyapps[137665]:
2016-11-17T06:05:35.934787+00:00 shinyapps[137665]:
2016-11-17T06:05:35.936115+00:00 shinyapps[137665]: The following object is masked from ‘package:BiocGenerics’:
2016-11-17T06:05:35.936117+00:00 shinyapps[137665]:
2016-11-17T06:05:35.936118+00:00 shinyapps[137665]:
2016-11-17T06:05:36.073857+00:00 shinyapps[137665]:
2016-11-17T06:05:36.073860+00:00 shinyapps[137665]: Attaching package: ‘simpleaffy’
2016-11-17T06:05:36.073861+00:00 shinyapps[137665]:
2016-11-17T06:05:36.074501+00:00 shinyapps[137665]: The following object is masked from ‘package:IRanges’:
2016-11-17T06:05:36.074502+00:00 shinyapps[137665]:
2016-11-17T06:05:36.074503+00:00 shinyapps[137665]:     members
2016-11-17T06:05:36.074504+00:00 shinyapps[137665]:
2016-11-17T06:05:40.002294+00:00 shinyapps[137665]: Setting options('download.file.method.GEOquery'='auto')
2016-11-17T06:05:40.002783+00:00 shinyapps[137665]: Setting options('GEOquery.inmemory.gpl'=FALSE)
2016-11-17T06:05:40.531722+00:00 shinyapps[137665]:
2016-11-17T06:05:40.563135+00:00 shinyapps[137665]: Attaching package: ‘AnnotationDbi’
2016-11-17T06:05:40.531725+00:00 shinyapps[137665]: Attaching package: ‘lumi’
2016-11-17T06:05:40.544974+00:00 shinyapps[137665]: Loading required package: AnnotationDbi
2016-11-17T06:05:40.706571+00:00 shinyapps[137665]:
2016-11-17T06:05:40.531726+00:00 shinyapps[137665]:
2016-11-17T06:05:40.563799+00:00 shinyapps[137665]:     select
2016-11-17T06:05:40.532342+00:00 shinyapps[137665]: The following objects are masked from ‘package:affy’:
2016-11-17T06:05:40.563136+00:00 shinyapps[137665]:
2016-11-17T06:05:40.532344+00:00 shinyapps[137665]:
2016-11-17T06:05:40.563134+00:00 shinyapps[137665]:
2016-11-17T06:05:40.532345+00:00 shinyapps[137665]:     MAplot, plotDensity
2016-11-17T06:05:40.532345+00:00 shinyapps[137665]:
2016-11-17T06:05:40.563797+00:00 shinyapps[137665]: The following object is masked from ‘package:dplyr’:
2016-11-17T06:05:40.563798+00:00 shinyapps[137665]:
2016-11-17T06:05:40.563799+00:00 shinyapps[137665]:
2016-11-17T06:05:40.573071+00:00 shinyapps[137665]: Loading required package: org.Hs.eg.db
2016-11-17T06:05:40.837922+00:00 shinyapps[137665]:
2016-11-17T06:05:40.925381+00:00 shinyapps[137665]:
2016-11-17T06:05:41.040576+00:00 shinyapps[137665]:

 

Session logs with warning and error message:

2016-11-17T06:22:01.329816+00:00 shinyapps[137665]: background correction: mas
2016-11-17T06:22:01.329851+00:00 shinyapps[137665]: PM/MM correction : mas
2016-11-17T06:22:01.329853+00:00 shinyapps[137665]: expression values: mas
2016-11-17T06:22:03.710864+00:00 shinyapps[137665]: background correcting...Warning in install.packages(cdfname, lib = lib, repos = biocinstallRepos(),  :
2016-11-17T06:22:03.710868+00:00 shinyapps[137665]:   'lib = "/usr/local/lib/R/site-library"' is not writable
2016-11-17T06:22:03.714225+00:00 shinyapps[137665]: Warning: Error in install.packages: unable to install packages
2016-11-17T06:22:03.723377+00:00 shinyapps[137665]: Stack trace (innermost first):
2016-11-17T06:22:03.723378+00:00 shinyapps[137665]:     133: install.packages
2016-11-17T06:22:03.723379+00:00 shinyapps[137665]:     132: cdfFromBioC
2016-11-17T06:22:03.723379+00:00 shinyapps[137665]:     131: getCdfInfo
2016-11-17T06:22:03.723380+00:00 shinyapps[137665]:     130: .local
2016-11-17T06:22:03.723380+00:00 shinyapps[137665]:     129: indexProbes
2016-11-17T06:22:03.723380+00:00 shinyapps[137665]:     128: indexProbes
2016-11-17T06:22:03.723381+00:00 shinyapps[137665]:     127: unlist
2016-11-17T06:22:03.723381+00:00 shinyapps[137665]:     126: unique
2016-11-17T06:22:03.723382+00:00 shinyapps[137665]:     125: bg.correct.mas
2016-11-17T06:22:03.723382+00:00 shinyapps[137665]:     124: do.call
2016-11-17T06:22:03.723382+00:00 shinyapps[137665]:     123: <Anonymous>
2016-11-17T06:22:03.723383+00:00 shinyapps[137665]:     122: <Anonymous>
2016-11-17T06:22:03.723383+00:00 shinyapps[137665]:     121: do.call
2016-11-17T06:22:03.723383+00:00 shinyapps[137665]:     120: expresso
2016-11-17T06:22:03.723384+00:00 shinyapps[137665]:     119: mas5
2016-11-17T06:22:03.723384+00:00 shinyapps[137665]:     118: processed_data [/srv/connect/apps/mamged/server.r#114]
2016-11-17T06:22:03.723385+00:00 shinyapps[137665]:     117: eval [/srv/connect/apps/mamged/server.r#1259]
2016-11-17T06:22:03.723385+00:00 shinyapps[137665]:     116: eval
2016-11-17T06:22:03.723385+00:00 shinyapps[137665]:     115: withProgress
2016-11-17T06:22:03.723407+00:00 shinyapps[137665]:     114: eventReactiveHandler [/srv/connect/apps/mamged/server.r#1246]
2016-11-17T06:22:03.723408+00:00 shinyapps[137665]:      94: list_files
2016-11-17T06:22:03.723408+00:00 shinyapps[137665]:      93: renderDataTable [/srv/connect/apps/mamged/server.r#1564]
2016-11-17T06:22:03.723409+00:00 shinyapps[137665]:      92: func
2016-11-17T06:22:03.723409+00:00 shinyapps[137665]:      91: origRenderFunc
2016-11-17T06:22:03.723409+00:00 shinyapps[137665]:      90: output$sourced
2016-11-17T06:22:03.723410+00:00 shinyapps[137665]:      13: runApp
2016-11-17T06:22:03.723410+00:00 shinyapps[137665]:      12: fn
2016-11-17T06:22:03.723411+00:00 shinyapps[137665]:      11: doTryCatch
2016-11-17T06:22:03.723411+00:00 shinyapps[137665]:      10: tryCatchOne
2016-11-17T06:22:03.723412+00:00 shinyapps[137665]:       9: tryCatchList
2016-11-17T06:22:03.723455+00:00 shinyapps[137665]:       8: tryCatch
2016-11-17T06:22:03.723455+00:00 shinyapps[137665]:       7: connect$retry
2016-11-17T06:22:03.723456+00:00 shinyapps[137665]:       6: eval
2016-11-17T06:22:03.723456+00:00 shinyapps[137665]:       5: eval
2016-11-17T06:22:03.723457+00:00 shinyapps[137665]:       4: eval
2016-11-17T06:22:03.723462+00:00 shinyapps[137665]:       3: eval
2016-11-17T06:22:03.723462+00:00 shinyapps[137665]:       2: eval.parent
2016-11-17T06:22:03.723463+00:00 shinyapps[137665]:       1: local
bioconductor affy • 6.7k views
ADD COMMENT
2
Entering edit mode
@agaz-hussain-wani-7620
Last seen 6.6 years ago
India

To be honest, I feel there is no issue with your code (if you do not get any error message). The issue is on the server side i.e shinyapps server. I would like to suggest to have a look on the setting in your account for size of application. For free users, the size is limited to 1 GB. As per your recent comment, the application works fine for many other functionalities. Kindly check if you are using large data files when your application stops. I guess your application stops because of large size. Try by supplying small size data files. I hope it should work.

ADD COMMENT
1
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

The function you're using is trying to use an 'annotation' package describing a microarray chip. The package is currently not installed, so it tries to install it. Unfortunately, the library location where the package is to be installed is not writable, probably because it is an administrative or user account. If this is a web application, then probably this is the right thing to do -- don't let user interactions with the software cause more-or-less arbitrary interactions on the server, including writing to (hence removing!) installed software.

There are several options. You could try to install some or all the 'chip' annotation packages, e.g., from here things like hgu95av2*. You could could log errors like the one above and then as a sufficiently privileged user install the necessary packages manually and tell the user to 'try again'. You could use the environment variable R_LIBS_USER to point to an (existing) world-writable directory, so that when R tries to install the chip packages it installs them at that location; likely you'd monitor the location and periodically update your system-wide installation to include those files.

ADD COMMENT
0
Entering edit mode

Thanks Martin Morgan. Somehow I managed to get rid of the error by installing some other bioconductor packages, but the application gets blur (does not proceed) after processing the first file. As you can see in the below session logs that one file with 54675 ids is processed. 

2016-11-17T16:51:22.347409+00:00 shinyapps[137665]: background correction: mas
2016-11-17T16:51:22.347452+00:00 shinyapps[137665]: PM/MM correction : mas
2016-11-17T16:51:22.347454+00:00 shinyapps[137665]: expression values: mas
2016-11-17T16:51:26.437414+00:00 shinyapps[137665]: background correcting...done.
2016-11-17T16:51:26.769793+00:00 shinyapps[137665]: 54675 ids to be processed
2016-11-17T16:51:26.772923+00:00 shinyapps[137665]: |                    |
2016-11-17T16:51:59.863012+00:00 shinyapps[137665]: |####################|
2016-11-17T16:52:00.031679+00:00 shinyapps[137665]: Getting probe level data...
2016-11-17T16:52:03.734928+00:00 shinyapps[137665]: Computing p-values
2016-11-17T16:52:04.732582+00:00 shinyapps[137665]: Making P/M/A Calls
2016-11-17T16:52:05.425938+00:00 shinyapps[137665]: Affymetrix processing done...
2016-11-17T16:52:05.462065+00:00 shinyapps[137665]: background correction: mas
2016-11-17T16:52:05.462090+00:00 shinyapps[137665]: PM/MM correction : mas
2016-11-17T16:52:05.462091+00:00 shinyapps[137665]: expression values: mas 
ADD REPLY
0
Entering edit mode

the log is not sufficient for me to help.

ADD REPLY
0
Entering edit mode

Again coming back to you. I have many functionalities in my application including processing raw data of different platforms such as Affymetrix, Codelink, Illumina. I can successfully process raw data of Codelink and Illumina. But going through a hard time to make functionality of processing Affymetrix to work. The processing stops before doing anything.

 

2016-12-02T15:08:36.234297+00:00 shinyapps[137665]: Is this a bead array: FALSE
2016-12-02T15:08:36.234725+00:00 shinyapps[137665]: Test for affymetrix DE: FALSE
2016-12-02T15:08:36.234737+00:00 shinyapps[137665]: Test for codelink DE: FALSE
2016-12-02T15:08:36.234770+00:00 shinyapps[137665]: Test for illumina DE: FALSE
2016-12-02T15:08:38.571801+00:00 shinyapps[137665]: Affymetrix Raw data selected
2016-12-02T15:08:38.889893+00:00 shinyapps[137665]: AffyBatch object
2016-12-02T15:08:38.890077+00:00 shinyapps[137665]: size of arrays=1164x1164 features (17 kb)
2016-12-02T15:08:38.890109+00:00 shinyapps[137665]: cdf=HG-U133_Plus_2 (54675 affyids)
2016-12-02T15:08:38.890189+00:00 shinyapps[137665]: number of samples=2
2016-12-02T15:08:39.199606+00:00 shinyapps[137665]: number of genes=54675
2016-12-02T15:08:39.199607+00:00 shinyapps[137665]: annotation=hgu133plus2
2016-12-02T15:08:39.199819+00:00 shinyapps[137665]: notes=
2016-12-02T15:08:39.202830+00:00 shinyapps[137665]: affy.data....
2016-12-02T15:08:39.710232+00:00 shinyapps[137665]: AffyBatch object
2016-12-02T15:08:39.710435+00:00 shinyapps[137665]: size of arrays=1164x1164 features (17 kb)
2016-12-02T15:08:39.710454+00:00 shinyapps[137665]: cdf=HG-U133_Plus_2 (54675 affyids)
2016-12-02T15:08:39.710540+00:00 shinyapps[137665]: number of samples=1
2016-12-02T15:08:40.021079+00:00 shinyapps[137665]: number of genes=54675
2016-12-02T15:08:40.021085+00:00 shinyapps[137665]: annotation=hgu133plus2
2016-12-02T15:08:40.021211+00:00 shinyapps[137665]: notes=
2016-12-02T15:08:40.021299+00:00 shinyapps[137665]: Length: 2
2016-12-02T15:08:40.782424+00:00 shinyapps[137665]: background correction: mas
2016-12-02T15:08:40.782466+00:00 shinyapps[137665]: PM/MM correction : mas
2016-12-02T15:08:40.782469+00:00 shinyapps[137665]: expression values: mas

When I run the application locally, it works smooth. But after deployment on shiny server, the processing of Affymetrix does not work. I wounder If it is a bug or something  seriously is going wrong.

In addition I get warning :

2016-12-02T15:06:43.534867+00:00 shinyapps[137665]: Warning: replacing previous import ‘AnnotationDbi::tail’ by ‘utils::tail’ when loading ‘hgu95acdf’
2016-12-02T15:06:43.535941+00:00 shinyapps[137665]: Warning: replacing previous import ‘AnnotationDbi::head’ by ‘utils::head’ when loading ‘hgu95acdf’
ADD REPLY
0
Entering edit mode

To be honest, I feel there is no issue with your code (if you do not get any error message). The issue is on the server side i.e shinyapps server.

ADD REPLY

Login before adding your answer.

Traffic: 681 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6