davidemms / OrthoFinder

Phylogenetic orthology inference for comparative genomics
https://davidemms.github.io/
GNU General Public License v3.0
703 stars 188 forks source link

Orthofinder cannot find iqtree while in path #152

Closed setarehi closed 6 years ago

setarehi commented 6 years ago

Hi,

First of all: thank you very much for making orthofinder! It is great! I have a little trouble running it with iqtree. Although I can run iqtree immediatly from my commandline and it is present in my PATH orthofinder doesn't seem to be able to find it. I am getting the following error:

ERROR: Cannot run user-configured tree method 'iqtree' Please check program is installed and that it is correctly configured in the ~/.orthofinder.config file

when I open the ~/.orthofinder.config file it seems empty....

Could you please help me with solving this?

My best Setareh

davidemms commented 6 years ago

Hi Setareh

The configuration file should be called 'config.json' and should be in the same directory as orthofinder. I see now that the orthofinder prints an error message that refers to '~/.orthofinder.config', that's incorrect, apologies, I'll correct that.

Could you show me the commands you use and the output you get when you run iqtree and then when you try to run orthofinder using iqtree?

Thanks David

setarehi commented 6 years ago

Hi David,

Thanks for your quick response!

When I use iqtree I use the following command and get the following output:

biosys3@emma:~/Users/Setareh/OrthFinderPrograms/OrthoFinder-2.2.1$ iqtree IQ-TREE multicore version 1.5.6 for Linux 64-bit built Dec 4 2017 Copyright (c) 2011-2017 by Bui Quang Minh, Nguyen Lam Tung, Olga Chernomor, Heiko Schmidt, and Arndt von Haeseler.

Command-line examples (replace 'iqtree ...' by actual path to executable):

  1. Infer maximum-likelihood tree from a sequence alignment (example.phy) with the best-fit model automatically selected by ModelFinder: iqtree -s example.phy

  2. Perform ModelFinder without subsequent tree inference: iqtree -s example.phy -m MF (use '-m TEST' to resemble jModelTest/ProtTest)

  3. Combine ModelFinder, tree search, ultrafast bootstrap and SH-aLRT test: iqtree -s example.phy -alrt 1000 -bb 1000

  4. Perform edge-linked proportional partition model (example.nex): iqtree -s example.phy -spp example.nex (replace '-spp' by '-sp' for edge-unlinked model)

  5. Find best partition scheme by possibly merging partitions: iqtree -s example.phy -sp example.nex -m MF+MERGE (use '-m TESTMERGEONLY' to resemble PartitionFinder)

  6. Find best partition scheme followed by tree inference and bootstrap: iqtree -s example.phy -spp example.nex -m MFP+MERGE -bb 1000

  7. Use 4 CPU cores to speed up computation: add '-nt 4' option

To show all available options: run 'iqtree -h'

Have a look at the tutorial and manual for more information: http://www.iqtree.org

And when I use it with orthofinder:

biosys3@emma:~/Users/Setareh/OrthFinderPrograms/OrthoFinder-2.2.1/Sequences$ time ~/Users/Setareh/OrthFinderPrograms/OrthoFinder-2.2.1/orthofinder -T iqtree -M msa -f ~/Users/Setareh/OrthFinderPrograms/OrthoFinder-2.2.1/ExampleData/

OrthoFinder version 2.2.1 Copyright (C) 2014 David Emms

16 thread(s) for highly parallel tasks (BLAST searches etc.) 1 thread(s) for OrthoFinder algorithm

Checking required programs are installed

Test can run "makeblastdb -help" - ok Test can run "blastp -help" - ok Test can run "mcl -h" - ok Test can run "mafft /home/biosys3/Users/Setareh/OrthFinderPrograms/OrthoFinder-2.2.1/ExampleData//_dependencies_check/SimpleTest.fa"

ERROR: Please specify number of cores via -nt option. Use '-nt AUTO' to automatically determine the best number of cores

ERROR: Cannot run user-configured tree method 'iqtree' Please check program is installed and that it is correctly configured in the ~/.orthofinder.config file

Dependencies have been met for inference of orthogroups but not for the subsequent orthologue inference. Either install the required dependencies or use the option '-og' to stop the analysis after the inference of orthogroups.

ERROR: An error occurred, please review error messages for more information.

real 0m0.848s user 0m0.552s sys 0m0.324s

any idea why this might go wrong?

My best, Setareh

On Thu, Apr 5, 2018 at 10:43 AM, davidemms notifications@github.com wrote:

Hi Setareh

The configuration file should be called 'config.json' and should be in the same directory as orthofinder. I see now that the orthofinder prints an error message that refers to '~/.orthofinder.config', that's incorrect, apologies, I'll correct that.

Could you show me the commands you use and the output you get when you run iqtree and then when you try to run orthofinder using iqtree?

Thanks David

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/davidemms/OrthoFinder/issues/152#issuecomment-378863045, or mute the thread https://github.com/notifications/unsubscribe-auth/AkVJlLEJuN0HfazStXM8uTWC6B0jdS2qks5tldkTgaJpZM4TH6ug .

davidemms commented 6 years ago

Hi Setareh

I think the problem is that you're using the multicore version of iqtree instead of the single core version. The multicore versions has different command line options (it requires an '-nt' argument) and so it fails when OrthoFinder tries to run it since OrthoFinder expects the serial version. I will add some documentation to give instructions for this.

By way of explanation: Instead of running iqtree in parallel on individual multiple sequence alignments (MSA), OrthoFinder runs (in parallel) multiple instances of the serial version of iqtree on multiple MSA at once. This is done since this is more computationally efficient (it is an Embarrassingly parallel task).

You can resolve the issue by putting the serial version of iqtree in your path instead (an alternative solution would be to edit the config.json file to add '-nt 1' to the iqtree arguments).

All the best David