mummer: mummerplot error message: "Inappropriate ioctl for device"
Hi all,
I am trying to run mummerplot on the command line to generate a png that shows how my two fasta sequences align. I am getting the following error message:
mummerplot -p atcc_vs_wt --png atcc_vs_wt.delta
gnuplot 4.6 patchlevel 6
Reading delta file atcc_vs_wt.delta
Writing plot files atcc_vs_wt.fplot, atcc_vs_wt.rplot
Writing gnuplot script atcc_vs_wt.gp
Rendering plot atcc_vs_wt.png
WARNING: Unable to run 'false atcc_vs_wt.gp', Inappropriate ioctl for device
Some other information
$ mummerplot --version
mummerplot 3.5
$ gnuplot --version
gnuplot 4.6 patchlevel 6
Any advice is appreciated!
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 2
- Comments: 24
After a few hours test, I solved this issue. I think the people who got
WARNING: Unable to run 'false out.gp', Inappropriate ioctl for deviceis that when they installed mummer, the gnuplot was NOT in the environment path. The solution is simply, change the line 27 in mummerplotto
If your gnuplot is in your environment path, just set “gnuplot”, if not, put the path there, like what “$LIB_DIR” and “$BIN_DIR” did.
The point why mummer 3x worked but not mummer 4x is that in mummer 3x, they did not have the “$GNUPLOT_EXE” variable, they directly used “gnuplot”. But in mummer 4x, they use “$GNUPLOT_EXE” to try to hardcode the path of gnuplot (I guess).
I also had this error. I strongly recommend people don’t bother to troubleshoot this. I wasted 1.5 days on this. Get the matching coordinates and use this R package (https://github.com/tpoorten/dotPlotly) to plot. It is so much better with both the static and interactive plots!!!
I followed asdcid’s instruction above. The “false xxx.gp” clearly should be “gnuplot xxx.gp”. It took me a whole day to solve this. Another thing to realize is the mummer4 only works with gnuplot 4.6, NOT 5.0 or higher. Here is what I did from the beginning:
Install Anaconda3 sudo wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh Anaconda3-2019.07-Linux-x86_64.sh conda init
source ~/.bashrc conda config --add channels bioconda # add channel unset PYTHONPATH # this solve an error: AttributeError: module ‘enum’ has no attribute ‘IntFlag’
Install Gnuplot 4.6, I had error with the most recent version of gnuplot sudo conda install -c bioconda gnuplot=4.6.0
Install mummer4 sudo ./conda install -c bioconda mummer4
Solve an error: “Can’t find PostScript prologue file prologue.ps” export GNUPLOT_PS_DIR=/home/YOURNAME/anaconda3/share/gnuplot/4.6/
This works for me. But I hope the developer or someone else could define a Docker container or Anaconda environment that solves this issue by including both Gnuplot and Mummer4 in the same environment.
Update: if you are struggling with gnuplot, there are ways to go around it completely by using R based plotting scripts like: https://jmonlong.github.io/Hippocamplus/2017/09/19/mummerplots-with-ggplot2/ https://github.com/tpoorten/dotPlotly
Install the dependencies first:
conda install -c conda-forge fig2dev xfig gnuplot -yThen install mummer4 from bioconda:conda install -c bioconda mummer4Finally, editing the mummerplot script as suggested above, formmy $GNUPLOT_EXE = "false"tomy $GNUPLOT_EXE = "gnuplot"These works for me.
In my case commenting out the single line of the code mentioned by girum89 was not enough. I had to comment out the 3 lines of “$P_FORMAT” (lines 1153, 1154, 1155 of mummerplot file). In the last version of mummer the problem persists:
mummer, 4.0.0rc1 GnuPlot, gnuplot 5.2 patchlevel 8
I had this problem**** gnuplot 5.2 patchlevel 2 Reading mummer file mummer.mums (use mummer -c) Writing plot files mummer.fplot, mummer.rplot Writing gnuplot script mummer.gp Rendering plot mummer.ps
set mouse clipboardformat “[%.0f, %.0f]” ^ “mummer.gp”, line 18: wrong option
WARNING: Unable to run ‘gnuplot mummer.gp’, Inappropriate ioctl for device
Problem gone after removing the “$P_FORMAT .= “\nset mouse clipboardformat "$MFORMAT"”;” in line 1154 of mummerplot
I had the similar problem I realized that i had installed gnuplot (using sudo apt-get install gnuplot) after mummer installation. So i uninstalled mummer and re-installed it. and it worked perfectly for me
Installing the previous version of mummer,
3.9.4alphaworked!Although, it does say that the
mummerplotversion is the same as before, which is odd: