stevemussmann / admixturePipeline

A pipeline that accepts a VCF file to run through Admixture
GNU General Public License v3.0
56 stars 19 forks source link

Plotting error #6

Closed scintilla9 closed 3 years ago

scintilla9 commented 3 years ago

Hi, I got the following error messages when plotting corres.png:

" R[write to console]: Error in .External2(C_X11, paste0("png::", filename), g$width, g$height, : unable to start device PNG

R[write to console]: In addition:

R[write to console]: Warning message:

R[write to console]: In (function (filename = "Rplot%03d.png", width = 480, height = 480, : R[write to console]:

R[write to console]: unable to open connection to X11 display ''

Traceback (most recent call last): File "/opt/admixturePipeline/runEvalAdmix.py", line 24, in main() File "/opt/admixturePipeline/runEvalAdmix.py", line 20, in main ea.Rcode(input.args.evalAdmixRcode, input.args.minK, input.args.maxK) File "/opt/admixturePipeline/evaladmix.py", line 170, in Rcode self.grdevices.png(file=output) File "/home/cwl/.local/lib/python3.7/site-packages/rpy2/robjects/functions.py", line 199, in call .call(*args, kwargs)) File "/home/cwl/.local/lib/python3.7/site-packages/rpy2/robjects/functions.py", line 125, in call res = super(Function, self).call(*new_args, *new_kwargs) File "/home/cwl/.local/lib/python3.7/site-packages/rpy2/rinterfacelib/conversion.py", line 45, in cdata = function(args, kwargs) File "/home/cwl/.local/lib/python3.7/site-packages/rpy2/rinterface.py", line 680, in call raise embedded.RRuntimeError(_rinterface._geterrmessage()) rpy2.rinterface_lib.embedded.RRuntimeError: Error in .External2(C_X11, paste0("png::", filename), g$width, g$height, : unable to start device PNG"

Please kindly provide some suggestion of how to fix this problem. Thanks.

stevemussmann commented 3 years ago

Hello, my first guess would be the issue is with your R installation or system configuration, since these are runtime errors from R. My first suggestion would be to determine if R was compiled with cairo enabled - you can test this my running capabilities() in R to see if it is true or false. If false, then you need to have the necessary dependencies (cairo libraries) installed on your system, then recompile R.