Skip to content

Known issues with third party tools

Bailey Harrington edited this page May 16, 2022 · 1 revision

nucmer mummer fails with bad interpreter error

Issue

pyani may sometimes fail to run ANIm jobs on macOS because of an issue with the installed version of mummer. This problem may show up in several ways, e.g.:

  • A failed pytest run:
% pytest -v                                                                                                                                                                               
================================== test session starts ==================================
platform darwin -- Python 3.9.12, pytest-7.1.2, pluggy-1.0.0 -- /Users/lpritc/opt/anaconda3/envs/pyani_py310/bin/python
[...]
tests/test_dependencies.py::test_run_nucmer FAILED
  • An error when attempting to run nucmer, or another mummer tool, at the command-line
% nucmer                                                                                                                                                           [1:25:38]
zsh: /Users/<USER>/opt/anaconda3/envs/pyani_py310/bin/nucmer: bad interpreter: /usr/local/bin/perl: no such file or directory

Cause

This issue arises because the specific conda build of mummer (h770b8ee_9) has a problem

% conda search mummer                                                                                                                                              [1:27:05]
Loading channels: done
# Name                       Version           Build  Channel
[...]
mummer                          3.23     h6de7cb9_11  bioconda
mummer                          3.23      h770b8ee_9  bioconda

Fix

To resolve this issue, revert to build h6de7cb9_11:

% conda install mummer=3.23=h6de7cb9_11 -y
[...]
The following packages will be DOWNGRADED:

  mummer                                   3.23-h589c0e0_12 --> 3.23-h6de7cb9_11
[...]
% nucmer

  USAGE: nucmer  [options]  <Reference>  <Query>

Try '/Users/<USER>/opt/anaconda3/envs/pyani_py310/bin/nucmer -h' for more information.

This problem has been noted on the bioconda-recipes issues page (#28209)


fastANI installation (via conda) will fail for Python 3.9 on macOS

The issue

fastANI may fail to install

If you are using Python ≥3.9 to run pyani on macOS, fastANI will fail to install.

The cause

There are errors in the conda recipe for fastANI (for build h0a26cfa_0).

The fix

Using an earlier version of Python may be the simplest solution. However, you can also install fastANI yourself—via conda—using a slightly altered version of the command produced from the conda recipe, as shown below.

N.B. We have placed the fastANI requirement in its own requirements-fastani.txt file so that this will not also cause other installations to fail.

Bypassing conda

c++ -O3 -DNDEBUG -std=c++11 -Isrc \
-I ${ENV_DIR}/lib/include -mmacosx-version-min=10.7 \
-stdlib=libc++ -Xpreprocessor -fopenmp -lomp \
-DUSE_BOOST src/cgi/core_genome_identity.cpp -o fastANI \
${ENV_DIR}/lib/lib/libboost_math_c99.a \
-lstdc++ -lz -lm

Two alterations need to be made to the file name specified in the fifth line here:

  1. One of the /libs should be removed.
  2. The file extension should be changed from .a, to .dylib.

The resultant command ought to look something like this (with ${ENV_DIR} being wherever you're installing fastANI):

c++ -O3 -DNDEBUG -std=c++11 -Isrc \
-I ${ENV_DIR}/lib/include -mmacosx-version-min=10.7 \
-stdlib=libc++ -Xpreprocessor -fopenmp -lomp \
-DUSE_BOOST src/cgi/core_genome_identity.cpp -o fastANI \
${ENV_DIR}/lib/libboost_math_c99.dylib \
-lstdc++ -lz -lm

For a more technical overview of the issue, and other solutions that may be shared there, please see https://github.com/widdowquinn/pyani/issues/377.

Troubleshooting

This solution is how one of our developers managed to solve the problem. We hope it works for you, but can not guarantee this. Unfortunately, if this does not work for you, we will also not be able to troubleshoot the issue. In this instance, please file an issue at https://github.com/bioconda/bioconda-recipes.