Question: RnBeads set ghost script environment variable
gravatar for Kathrin.Klee
5 weeks ago by
Kathrin.Klee0 wrote:

I'm trying to run the quality control function of RnBeads:, reportDir)

but it results in the following error:

Error in logger.error(em) : Could not create file. GhostScript was not found

I'm using RStudio under Windows. So I installed GhostScript and set the environment variable for R:

Sys.setenv(GS_CMD="C:/Program Files/gs/gs9.50/bin/gswin64c.exe")

But it seems it doesn't work. I still get the same error that GhostScript was not found. If I use Sys.getenv() GhostScript is there on the list of environment variables, but tools::find_gs_cmd("gswin64c.exe") results in:


Any suggestions what is going wrong here?

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

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

other attached packages:
 [1] RnBeads.hg19_1.16.0                     RnBeads_2.2.0                           plyr_1.8.4                             
 [4] methylumi_2.30.0                        minfi_1.30.0                            bumphunter_1.26.0                      
 [7] locfit_1.5-9.1                          iterators_1.0.12                        foreach_1.4.7                          
[10] Biostrings_2.52.0                       XVector_0.24.0                          SummarizedExperiment_1.14.1            
[13] DelayedArray_0.10.0                     BiocParallel_1.18.1                     FDb.InfiniumMethylation.hg19_2.2.0     
[16]                      TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 GenomicFeatures_1.36.4                 
[19] AnnotationDbi_1.46.1                    reshape2_1.4.3                          scales_1.0.0                           
[22] Biobase_2.44.0                          illuminaio_0.26.0                       matrixStats_0.54.0                     
[25] limma_3.40.6                            gridExtra_2.3                           gplots_3.0.1.1                         
[28] ggplot2_3.2.1                           fields_9.9                              maps_3.3.0                             
[31] spam_2.3-0                              dotCall64_1.0-0                         ff_2.2-14                              
[34] bit_1.1-14                              cluster_2.0.8                           MASS_7.3-51.4                          
[37] GenomicRanges_1.36.0                    GenomeInfoDb_1.20.0                     IRanges_2.18.2                         
[40] S4Vectors_0.22.0                        BiocGenerics_0.30.0                     knitr_1.24                             
[43] getopt_1.20.3                          

loaded via a namespace (and not attached):
 [1] colorspace_1.4-1         siggenes_1.58.0          mclust_5.4.5             base64_2.0               rstudioapi_0.10         
 [6] remotes_2.1.0            bit64_0.9-7              xml2_1.2.2               codetools_0.2-16         splines_3.6.0           
[11] scrime_1.3.5             zeallot_0.1.0            Rsamtools_2.0.0          annotate_1.62.0          HDF5Array_1.12.2        
[16] readr_1.3.1              compiler_3.6.0           httr_1.4.1               backports_1.1.4          assertthat_0.2.1        
[21] Matrix_1.2-17            lazyeval_0.2.2           prettyunits_1.0.2        tools_3.6.0              gtable_0.3.0            
[26] glue_1.3.1               GenomeInfoDbData_1.2.1   dplyr_0.8.3              doRNG_1.7.1              Rcpp_1.0.2              
[31] vctrs_0.2.0              multtest_2.40.0          nlme_3.1-139             preprocessCore_1.46.0    gdata_2.18.0            
[36] rtracklayer_1.44.3       DelayedMatrixStats_1.6.0 xfun_0.9                 stringr_1.4.0            rngtools_1.4            
[41] gtools_3.8.1             XML_3.98-1.20            beanplot_1.2             zlibbioc_1.30.0          hms_0.5.1               
[46] GEOquery_2.52.0          rhdf5_2.28.0             RColorBrewer_1.1-2       memoise_1.1.0            pkgmaker_0.27           
[51] biomaRt_2.40.4           reshape_0.8.8            stringi_1.4.3            RSQLite_2.1.2            genefilter_1.66.0       
[56] caTools_1.17.1.2         bibtex_0.4.2             rlang_0.4.0              pkgconfig_2.0.2          bitops_1.0-6            
[61] nor1mix_1.3-0            lattice_0.20-38          purrr_0.3.2              Rhdf5lib_1.6.0           labeling_0.3            
[66] GenomicAlignments_1.20.1 tidyselect_0.2.5         magrittr_1.5             R6_2.4.0                 DBI_1.0.0               
[71] pillar_1.4.2             withr_2.1.2              survival_2.44-1.1        RCurl_1.95-4.12          tibble_2.1.3            
[76] crayon_1.3.4             KernSmooth_2.23-15       progress_1.2.2           data.table_1.12.2        blob_1.2.0              
[81] digest_0.6.20            xtable_1.8-4             tidyr_0.8.3              openssl_1.4.1            munsell_0.5.0           
[86] registry_0.5-1           quadprog_1.5-7           askpass_1.1
rnbeads ghostscript • 69 views
ADD COMMENTlink written 5 weeks ago by Kathrin.Klee0

Dear Kathrin,

You'll also have to add the path to the Ghostscript executable to your PATH environment variable as described in the RnBeads FAQ under Under Windows 7, for instance, you can specify that in the Control Panel in the Systems properties.

I hope that helps,


ADD REPLYlink written 4 weeks ago by mscherer10

Dear Michael,

thanks a lot for your answer and help! That was it.

Best & thanks Kathrin

ADD REPLYlink written 4 weeks ago by Kathrin.Klee0
Please log in to add an answer.


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