galaxyproject / tools-devteam

Contains a set of Galaxy Tools mostly written by the Galaxy Team.
37 stars 92 forks source link

Megablast /conda issue #594

Closed nagoue closed 2 years ago

nagoue commented 3 years ago

Hi, I am recently facing problem with megablast from 2 Galaxy instances v20.5:

1/ Conda Error is:

File "lib/galaxy/tool_util/deps/resolvers/conda.py", line 466, in build_environment
    raise DependencyException("Conda dependency seemingly installed but failed to build job environment.")
galaxy.tool_util.deps.resolvers.DependencyException: Conda dependency seemingly installed but failed to build job environment.

Dependency error is (same log):

conda.exceptions.CondaValueError: invalid package specification: blast=2.2.26+    
...    
File "/xxx/dependencies/_conda/lib/python3.6/site-packages/conda/resolve.py", line 288, in verify_specs
    raise ResolvePackageNotFound(bad_deps)
conda.exceptions.ResolvePackageNotFound:    
  bx-python==0.7.1=pypi_0   
  blas==1.0=mkl   

I tried several things like updating and cleaning conda (I am using conda 4.10.1). Blast2.2.26+ and bx-python 0.7.1 doesn't seem to be available in bioconda repo. So I tried modifying the megablast_wrapper.xml accordingly.

<tool id="megablast_wrapper" name="Megablast" version="1.2.0">
    <description> compare short reads against htgs, nt, and wgs databases</description>
    <requirements>
        <!--requirement type="package" version="2.2.26+">blast+</requirement-->
        <requirement type="package" version="2.2.26+">blast-legacy</requirement>
        <!--requirement type="package" version="0.7.1">bx-python</requirement-->
        <requirement type="package" version="0.8.11">bx-python</requirement>
    </requirements>

But then changing bx-python version makes tool disappearing from Tool Galaxy Interface ...

2/ Another conda error with the same tool (from another Galaxy instance):

galaxy.tool_util.output_checker DEBUG 2021-06-14 18:56:16,210 [p:124390,w:0,m:2] [SlurmRunner.work_thread-1] job failed, detected state generic_error, standard error is - [  File "/xxx/shed_tools/toolshed.g2.bx.psu.edu/repos/devteam/megablast_wrapper/fb2e0e1dac89/megablast_wrapper/megablast_wrapper.py", line 68
    print megablast_command
                          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(megablast_command)?
]

It's like conda doesn't call the right python interpreter.

Have you already encounter this kind of problems and would you have any suggestions ?

Thanks,

nsoranzo commented 3 years ago

Hi @nagoue, this tool was never ported to use conda to resolve the tool dependencies, it still uses ToolShed packages. It's basically abandoned, most people I think use the "NCBI BLAST+ blastn" tool (from https://toolshed.g2.bx.psu.edu/view/devteam/ncbi_blast_plus/) and select "megablast" in "Type of BLAST".

nagoue commented 3 years ago

@nsoranzo, thank you for your reply and suggestion, passing by NCBI BLAST is a nice option. Cheers,