diff --git a/Makefile b/Makefile index 479f9a7e..0fd9154a 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ setup_env: @conda install --file requirements-dev.txt --yes @conda install --file requirements.txt --yes @conda install --file requirements-thirdparty.txt --yes + @conda install --file requirements-fastani.txt --yes @conda install --file requirements-pyqt-conda.txt --yes @pip install -r requirements-pip.txt @pre-commit install @@ -55,7 +56,7 @@ walkthrough: clean_walkthrough # pyani report --runs C_blochmannia_ANIb/ --formats html,excel,stdout # pyani report --run_results 2 --formats html,excel,stdout C_blochmannia_ANIb/ # pyani report --run_matrices 2 --formats html,excel,stdout C_blochmannia_ANIb/ - # pyani plot --formats png,pdf --method seaborn C_blochmannia_ANIb 2 + # pyani plot --formats png,pdf --method seaborn C_blochmannia_ANIb 2 uml: pyreverse -o pdf -p pyani pyani diff --git a/README.md b/README.md index 68610afb..64daa92e 100644 --- a/README.md +++ b/README.md @@ -171,12 +171,12 @@ pip3 install pyani ### Third-party tools -Three alignment packages are required, to use all of `pyani`'s methods: `mummer`, `BLAST+`, and legacy `BLAST`. (*Note that it is not necessary to install all three tools to use `pyani`. You need only install the tools that are required for the method you wish to use.*) +Four alignment packages are required, to use all of `pyani`'s methods: `mummer`, `BLAST+`, legacy `BLAST`, and `fastANI`. (*Note that it is not necessary to install all four tools to use `pyani`. You need only install the tools that are required for the method you wish to use.*) The simplest route to obtaining these tools is to use `conda`/`bioconda`: ```bash -conda install mummer blast legacy-blast -y +conda install mummer blast legacy-blast fastani -y ``` But they can also be installed by following instructions from the tools' own websites. @@ -184,6 +184,7 @@ But they can also be installed by following instructions from the tools' own web - **BLAST+** (for `anib`) [ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/](ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/) - **legacy BLAST** (for `aniblastall`) [ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/LATEST/](ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/LATEST/) - **MUMmer** (for `anim`) [http://mummer.sourceforge.net/](ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/LATEST/) +- **fastANI** (for `fastani`) [https://github.com/ParBLiSS/FastANI](https://github.com/ParBLiSS/FastANI) ### NOTE: Installing legacy BLAST @@ -191,6 +192,47 @@ But they can also be installed by following instructions from the tools' own web If you wish to use `pyani blastall` or the `ANIblastall` method with the legacy `pyani` interface, you will require a locally-installed copy of this package. This is one of the packages linked in the `requirements-thirdparty.txt` file. +### Note: Installing fastANI + +**`fastANI` installation (via `conda`) will fail for Python 3.9 on macOS.** + +If you are using Python ≥3.9 to run `pyani` on macOS, `fastANI` will fail to install due to errors in the `conda` recipe (for build `h0a26cfa_0`). 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` + +```bash +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 `/lib`s should be removed. +1. 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`): + +```bash +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. + ----- ## Documentation (v0.3) diff --git a/requirements-fastani.txt b/requirements-fastani.txt new file mode 100644 index 00000000..633a41df --- /dev/null +++ b/requirements-fastani.txt @@ -0,0 +1 @@ +fastani diff --git a/requirements-thirdparty.txt b/requirements-thirdparty.txt index 71f899f0..bfe39e58 100644 --- a/requirements-thirdparty.txt +++ b/requirements-thirdparty.txt @@ -1,4 +1,3 @@ blast blast-legacy mummer -fastani