Question: Kmergenie: R script cannot output png files
1
gravatar for dlepp
3.0 years ago by
dlepp10
Canada
dlepp10 wrote:

Just trying this out, and while the plots are generated and best k predicted, the report is not generated.  RScript seems to be working and I have ghostscript v9.05.  Running on Biolinux 7 system (Ubuntu 12.04).

Full error message is:

R cannot output png files; testing if ghostscript is present.. HTML report not generated (Kmergenie is probably running on a cluster): neither R can create png files, nor ghostscript is installed

kmergenie • 1.6k views
ADD COMMENTlink modified 3.0 years ago by ALchEmiXt1.8k • written 3.0 years ago by dlepp10

Hello dlepp!

We believe that this post does not fit the main topic of this site.

This is not really a bioinformatics question but a R installation and support one. You should post this on R forums or StackExchange.

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 3.0 years ago by Istvan Albert ♦♦ 73k

Hi Istvan,

 

I believe this was a kmergenie question, so it does fit the topic of this forum. (the user probably should have mentioned Kmergenie in the title..)

 

dlepp: can you paste the output of the following command? (Maybe ghostscript isn't found on your system when the shell environment is not loaded.)

python -c "import subprocess; subprocess.Popen(['gs','--version'])"

 

ADD REPLYlink written 3.0 years ago by Rayan Chikhi1.2k

actually yes, it is a valid question, apologies for closing it

it just was not clear from the content if this was simply an R question or a script packaged with a bioinformatics tool, I actually missed the kmergenie mention

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by Istvan Albert ♦♦ 73k

no worries!

ADD REPLYlink written 3.0 years ago by Rayan Chikhi1.2k

Can you do:

png(); plot(1:10); dev.off();

bitmap(file="bitmap.png"); plot(1:10); dev.off();

and tell us what the output is? There should be an Rplot.png and a bitmap.png file with a plot.

ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by Michael Dondrup43k
0
gravatar for ALchEmiXt
3.0 years ago by
ALchEmiXt1.8k
The Netherlands
ALchEmiXt1.8k wrote:

Are you on a headless server? If so you should most likely fix output for png for all R scripts. The answer of Michael should help you test that.

This might seem trivial and I may be mistaken.... but isn't kmergenie outputting by default these images as base64 embedded code inside the html output? Then you don't get saved along the html file... as far as I remember.

Look for these tags in the html output:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAeAA blablabla etc">
ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by ALchEmiXt1.8k

Kmergenie checks if R can generate png. If not, it falls back to ghostscript to do the pdf->png conversion. I've noticed that for many clusters R doesn't support png output due to no X server

ADD REPLYlink written 3.0 years ago by Rayan Chikhi1.2k
Please log in to add an answer.

Help
Access

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