I had a strange problem that I can’t fix in any way, and I was hoping that someone here could better understand what’s wrong,
I cannot use the RWebLogo package - even run the simplest examples due to the same Ghostscript error.
eg. works:
library(RWebLogo) aln <- c('CCAACCCAA', 'CCAACCCTA', 'AAAGCCTGA', 'TGAACCGGA') weblogo(seqs=aln, file.out='mylogo.pdf')
Throws this error:
Traceback (most recent call last): File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogo", line 71, in <module> weblogolib._cli.main() File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/_cli.py", line 82, in main formatter(data, format, opts.fout) File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 757, in pdf_formatter gs = GhostscriptAPI() File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 196, in __init__ raise EnvironmentError("Could not find Ghostscript on path." EnvironmentError: Could not find Ghostscript on path. There should be either a gs executable or a gswin32c.exe on your system path
I installed ghostscript ver 9.15 with the / make / install setting in the terminal, and then added the PATH profile to bash and executed it. When I run gs in the terminal, it works, confirming that it is installed on the system path, but the same error still occurs. Even after a reboot.
I tried adding gs to the environment in R directly:
Sys.setenv(R_GSCMD = "/Applications/ghostscript-9.15/bin/gs")
which also did not help ... Gives exactly the same error. When I search for R environment, it shows that gs is.
Important version information:
MAC: OS Yosemite 10.10.1; R version 3.1.1 (2014-07-10); Platform: x86_64-apple-darwin10.8.0 (64-bit); RWebLogo_1.0.3
Are you aware of any problem that may cause this problem? I am new to programming, so I worry that maybe I missed something basic. I would appreciate any advice. Thanks!