Simon-Coetzee / motifBreakR

A Package For Predicting The Disruptiveness Of Single Nucleotide Polymorphisms On Transcription Factor Binding Sites.
27 stars 12 forks source link

Error, whilst attempting to use plotMB #7

Closed Dazcam closed 3 months ago

Dazcam commented 7 years ago

Hello, I'm experiencing the following error when attempting to visualise my results.

Input:

plotMB(results = results_homer, rsid = "rs11039266", effect = "strong")

Error message:

sh: gs: command not found
Error in PostScriptTrace(paste(psfilename, ".ps", sep = ""), paste(psfilename,  : 
sorry, 'gs' cannot be found

Not sure how to remedy this. Worked though the vignette provided with my own data and all previous steps worked as described.

Any help/advice on how to proceed would be greatly appreciated.

Simon-Coetzee commented 7 years ago

You're missing the ghostcript binary required to generate figures. Instructions on ghostscript can be found here: https://github.com/Simon-Coetzee/motifBreakR#install

Dazcam commented 7 years ago

Thanks for your response.

I have installed ghoscript and set the environment to the following binary (I'm using a Mac):

Sys.setenv(R_GSCMD="/usr/local/Cellar/ghostscript/9.20/bin/gs")

However, when trying to run the same plotMB command as above R now spits out the following error:

Error in grid.Call(L_convert, x, as.integer(whatfrom), as.integer(whatto),  : 
family 'sans' not included in postscript() device

I checked my postscript fonts:

names(postscriptFonts())

[1] "serif"                "sans"                 "mono"                
[4] "AvantGarde"           "Bookman"              "Courier"             
[7] "Helvetica"            "Helvetica-Narrow"     "NewCenturySchoolbook"
[10] "Palatino"             "Times"                "URWGothic"           
[13] "URWBookman"           "NimbusMon"            "NimbusSan"           
[16] "URWHelvetica"         "NimbusSanCond"        "CenturySch"          
[19] "URWPalladio"          "NimbusRom"            "URWTimes"            
[22] "ArialMT"              "ComputerModern"       "ComputerModernItalic"
[25] "Japan1"               "Japan1HeiMin"         "Japan1GothicBBB"     
[28] "Japan1Ryumin"         "Korea1"               "Korea1deb"           
[31] "CNS1"                 "GB1"

Sans is there. I made sure the default was set to sans:

ps.options(fonts = 'sans', reset = TRUE)
ps.options()

$onefile
[1] TRUE

$family
[1] "Helvetica"

$title
[1] "R Graphics Output"

$fonts
[1] "sans"     ...

Unsure if this and issue with ghostscript, postscript or the binary I have chosen? I've tried loading in additional fonts with the extrafont package, and using different binaries but no luck.