Closed
Description
Hi Peter,
I am getting errors when gnuplot is executed on the script generated by plot-bamstats on Linux.
$ plot-bamstats -p ./html/sample2/plot ./html/sample2/plot.stat
end
^
"./html/sample2/plot-quals-hm.gp" line 128: invalid command
The command exited with non-zero status 256:
gnuplot ./html/sample2/plot-quals-hm.gp
at /apps/all/SAMtools/1.9-intel-2017a/bin/plot-bamstats line 51.
main::error('The command exited with non-zero status 256:\x{a}\x{9}gnuplot ./html/...') called at /apps/all/SAMtools/1.9-intel-2017a/bin/plot-bamstats line 317
main::plot('./html/sample2/plot-quals-hm.gp') called at /apps/all/SAMtools/1.9-intel-2017a/bin/plot-bamstats line 818
main::plot_qualities('HASH(0x1b69420)') called at /apps/all/SAMtools/1.9-intel-2017a/bin/plot-bamstats line 33
I tried also samtools-1.6 but it breaks on the same error (extraneous end
commands in two places). It seems they are printed by the perl code due to some missing checks somewhere for some sections.
I see in issue #183 that there is (or used to be) some develop branch, I will test it later.
Metadata
Metadata
Assignees
Labels
No labels
Activity
valeriuo commentedon Jun 17, 2019
I successfully ran gnuplot (5.2) on your file and got the attached image. What version of gnuplot/OS are you using?
mmokrejs commentedon Jun 17, 2019
I am on Centos7 Linux.
pd3 commentedon Jun 18, 2019
Looks like this behavior is specific to the most recent versions of gnuplot. @mmokrejs can you try if the script works after removing the extra
end
? If so, that will be easy to fix :-)mmokrejs commentedon Jun 19, 2019
@pd3 Sorry, I forgot to mention that explicitly, I did that already on the two places and it helped. That is actually why I wrote that supposedly the perl code does not output the
if
part due to failing condition but just always outputs theend
. I do not remember what I saw in the figure, but the crash was gone for sure.pd3 commentedon Jun 24, 2019
Thanks. You don't happen to have the source file that was used to generate the stats by any chance? I failed to reproduce the problem with gnuplot 5.2 patchlevel 6.
mmokrejs commentedon Jun 24, 2019
Right, I do:
plot.stat.txt
pd3 commentedon Jun 25, 2019
I can confirm this is a problem with 5.2.7 but not with 5.2.6.
Unfortunately, versions prior to 5.2.7 require the two
end
statements to finish the matrix data section whereas 5.2.7 requires oneend
.daviesrob commentedon Jun 26, 2019
This is probably related to this fix in 5.2.7 (from the release notes) :
In 5.2.2 I can get it to work by putting a blank line between the end of the matrix and a single
end
, like this:Does that work in 5.2.7 as well?
mmokrejs commentedon Jun 26, 2019
You mean this?
daviesrob commentedon Jun 26, 2019
Try doing the same thing for the second matrix.
mmokrejs commentedon Jun 26, 2019
Right.
Actually that is why I mentioned initially extraneous (or out-of-order)
end
statements.Fix plot-bamstats quality heatmap on newer gnuplot
daviesrob commentedon Jun 27, 2019
@mmokrejs Could you confirm that #1068 fixes this, please?
pd3 commentedon Jun 28, 2019
It works in 5.0.0 and 5.2.7, thanks!