peterjc / pico_galaxy

Galaxy tools and wrappers for sequence analysis
17 stars 25 forks source link

Update Mummer to use bioconda #34

Closed Takadonet closed 5 years ago

Takadonet commented 5 years ago

Converted from tool_shed package to use bioconda for mummer. Added libgd to ensure that png and other image are available for gnuplot

peterjc commented 5 years ago

Why do we need to specify libgd? Wouldn't the gnuplot package handle this already?

Takadonet commented 5 years ago

I get following error from gnuplot.

set terminal png tiny size 1400,1400 "/tmp/tmpG1bQhT/ref_qry.gp", line 1: unknown or ambiguous terminal type; type just 'set terminal' for a list

Solution is from stackoverflow with exact same error.

Was testing on ubuntu 18.04

peterjc commented 5 years ago

Yes, but with conda this should be done in the build dependencies of the gnuplot recipe.

The current conda-forge recipe does declare a dependency already:

https://github.com/conda-forge/gnuplot-feedstock/blob/master/recipe/meta.yaml

However, by asking for gnuplot 4.6 since conda-forge does not have this older version, we should get the (since deprecated) bioconda package:

https://github.com/bioconda/bioconda-recipes/pull/5106

It looks like that did not declare the dependency, so that might explain it not having PNG support:

https://github.com/bioconda/bioconda-recipes/blob/be4ec622b4a336567002bff1084da5f9f09efe3e/recipes/gnuplot/4.6.0/meta.yaml

Takadonet commented 5 years ago

Looks like when Galaxy create the environment, it orders the channels with conda-forge first followed by bioconda. However, it is matching to gnuplot 5.2.7 from conda-forge even when it is pinned to 4.6 on the command.

conda create -d -y --quiet --override-channels --channel iuc --channel conda-forge --channel bioconda --channel defaults --name galaxymummer libgd=2.2.5 ghostscript=9.10 mummer=3.23 gnuplot=4.6

gnuplot 5.2.7 h0fb2448_3 conda-forge

peterjc commented 5 years ago

That is very strange - possibly a Galaxy bug. Have you confirmed outside of Galaxy if that version of conda lacks PNG support?

Takadonet commented 5 years ago

I confirmed outside of planemo/Galaxy with the exact command provided above.

However the issue is
--override-channels --channel iuc --channel conda-forge --channel bioconda --channel defaults that causes the issue. Order channels causes things to behavior strangely.

How do you want to process? I can remove libgb from wrapper but I probably have to fix it 'manually' after Galaxy installs it. I just want to remove my dependencies on old tool_shed package. Less duct tape the better!

Takadonet commented 5 years ago

Actually the issue is the order of installation of the packages.

The order on the command line argument does not matter but how conda actually installing.

conda create -y --quiet --name outsidegalaxymummer libgd=2.2.5 ghostscript=9.10 mummer=3.23 gnuplot=4.6

conda activate outsidegalaxymummer

gnuplot

set terminal png Terminal type set to 'unknown'

conda remove -y gnuplot && conda install -y gnuplot

gnuplot set terminal png Terminal type is now 'png' Options are 'nocrop enhanced size 640,480 font "arial,12.0" '

Initial conda create list gnuplot before libgd.

Package Plan

environment location: /home/pmabon/miniconda3/envs/outsidegalaxymummer

added / updated specs:

  • ghostscript=9.10
  • gnuplot=4.6
  • libgd=2.2.5
  • mummer=3.23
peterjc commented 5 years ago

It does look like there is something wrong with the gnuplot 4.6 bioconda package, but that is no longer maintained. We could make a new gnuplot 4.6 conda-forge package (the best way to preserve replicability), but it seems a lot of work for minimal benefit.

Do you want to try the minimal change of bumping the version of gnuplot requested in tools/mummer/mummer.xml and removing tools/mummer/tool_dependencies.xml?

Takadonet commented 5 years ago

Sure thing! Will bump gnuplot version and see what needs to be done.

peterjc commented 5 years ago

Thanks! I guess I should update the README file, and push this to the tool sheds...