biobakery / phylophlan

Precise phylogenetic analysis of microbial isolates and genomes from metagenomes
https://huttenhower.sph.harvard.edu/phylophlan
MIT License
128 stars 33 forks source link

Phylophlan searching for DIAMOND in anaconda, not miniconda3 #65

Closed thh32 closed 3 years ago

thh32 commented 3 years ago

Hey,

As you can see below, I have tried installing phylophlan in a fresh environment which works fine;

conda install -c bioconda phylophlan
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 4.10.0
  latest version: 4.10.1

Please update conda by running

    $ conda update -n base -c defaults conda

## Package Plan ##

  environment location: /home/thomashitch/miniconda3/envs/protologger2

  added / updated specs:
    - phylophlan

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    diamond-0.9.14             |       h2e03b76_4         550 KB  bioconda
    ------------------------------------------------------------
                                           Total:         550 KB

The following NEW packages will be INSTALLED:

  biopython          conda-forge/linux-64::biopython-1.79-py37h5e8e339_0
  diamond            bioconda/linux-64::diamond-0.9.14-h2e03b76_4
  iqtree             bioconda/linux-64::iqtree-2.1.2-h56fc30b_0
  mafft              bioconda/linux-64::mafft-7.480-h779adbc_0
  pandas             conda-forge/linux-64::pandas-1.2.4-py37h219a48f_0
  patsy              conda-forge/noarch::patsy-0.5.1-py_0
  phylophlan         bioconda/noarch::phylophlan-3.0.2-py_0
  pytz               conda-forge/noarch::pytz-2021.1-pyhd8ed1ab_0
  raxml              bioconda/linux-64::raxml-8.2.12-h779adbc_3
  seaborn            conda-forge/noarch::seaborn-0.11.1-hd8ed1ab_1
  seaborn-base       conda-forge/noarch::seaborn-base-0.11.1-pyhd8ed1ab_1
  statsmodels        conda-forge/linux-64::statsmodels-0.12.2-py37h902c9e0_0
  trimal             bioconda/linux-64::trimal-1.4.1-h7d875b9_5

Proceed ([y]/n)? y

Downloading and Extracting Packages
diamond-0.9.14       | 550 KB    | ######################################################################################################################################################################## | 100% 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

When I try running phylophlan the issues arise!

phylophlan -i /media/thomashitch/MyDATA/Projects/Protologger-Updates/June-2021-Update2Conda/Example_run/Testing/Genome_Tree -d phylophlan --diversity medium  -f /media/thomashitch/MyDATA/Projects/Protologger-Updates/June-2021-Update2Conda/Protologger-master/bin/Phylophlan/supermatrix_aa.cfg --nproc 20 --output_folder /media/thomashitch/MyDATA/Projects/Protologger-Updates/June-2021-Update2Conda/Example_run/Testing

[e] program not installed or not present in the system path
    command_line: /home/ecoli/anaconda/envs/protologger/bin/diamond version
           stdin: None
          stdout: None
             env: {'GJS_DEBUG_TOPICS': 'JS ERROR;JS LOG', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'CONDA_PROMPT_MODIFIER': '(protologger2) ', 'USER': 'thomashitch', 'LC_TIME': 'de_DE.UTF-8', 'TEXTDOMAIN': 'im-config', 'XDG_SEAT': 'seat0', 'SSH_AGENT_PID': '2669', 'XDG_SESSION_TYPE': 'x11', 'JAVA_HOME_CONDA_BACKUP': '', 'SHLVL': '1', 'CONDA_SHLVL': '3', 'OLDPWD': '/home/thomashitch/Projects/Protologger-Updates/June-2021-Update2Conda/Example_run/Testing', 'QT4_IM_MODULE': 'xim', 'HOME': '/home/thomashitch', 'JAVA_LD_LIBRARY_PATH': '/home/thomashitch/miniconda3/envs/protologger2/lib/server', 'DESKTOP_SESSION': 'ubuntu', 'GNOME_SHELL_SESSION_MODE': 'ubuntu', 'GTK_MODULES': 'gail:atk-bridge', 'LC_MONETARY': 'de_DE.UTF-8', 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1000/bus', 'COLORTERM': 'truecolor', '_CE_M': '', 'MANDATORY_PATH': '/usr/share/gconf/ubuntu.mandatory.path', 'IM_CONFIG_PHASE': '2', 'LOGNAME': 'thomashitch', 'GTK_IM_MODULE': 'ibus', '_': '/home/thomashitch/miniconda3/envs/protologger2/bin/phylophlan', 'DEFAULTS_PATH': '/usr/share/gconf/ubuntu.default.path', 'GTDBTK_DATA_PATH': '/home/thomashitch/miniconda3/envs/protologger2/share/gtdbtk-1.5.0/db/', 'USERNAME': 'thomashitch', 'XDG_SESSION_ID': '2', 'TERM': 'xterm-256color', 'PROTOLOGGER_DATA_DIR': '/home/thomashitch/Projects/Protologger-Updates/June-2021-Update2Conda/Protologger-master', '_CE_CONDA': '', 'GNOME_DESKTOP_SESSION_ID': 'this-is-deprecated', 'WINDOWPATH': '2', 'PATH': '/home/thomashitch/miniconda3/envs/protologger2/bin:/home/thomashitch/anaconda2/condabin:/home/thomashitch/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/thomashitch/Programs/prokka/bin:/home/thomashitch/Programs:/media/thomashitch/SECOND_DATA1/Protologger/Dev/v0.1/phylophlan:/home/thomashitch/Programs/prokka/bin:/home/thomashitch/Programs:/home/thomashitch/Downloads/sbtab-0.9.19/sbtab:/home/thomashitch/Programs/eggnog-mapper:/media/thomashitch/MyDATA/Projects/Consort/consort:/home/thomashitch/Programs/FastANI-master:/home/thomashitch/Programs/prokka/bin:/home/thomashitch/Programs:/home/thomashitch/Downloads/sbtab-0.9.19/sbtab:/home/thomashitch/Programs/eggnog-mapper:/media/thomashitch/MyDATA/Projects/Consort/consort:/home/thomashitch/Programs/FastANI-master', 'SESSION_MANAGER': 'local/Salmonella:@/tmp/.ICE-unix/2573,unix/Salmonella:/tmp/.ICE-unix/2573', 'XDG_MENU_PREFIX': 'gnome-', 'S_COLORS': 'auto', 'GNOME_TERMINAL_SCREEN': '/org/gnome/Terminal/screen/d604601f_6d46_42a2_b1c4_cfee882c2547', 'LC_ADDRESS': 'de_DE.UTF-8', 'XDG_RUNTIME_DIR': '/run/user/1000', 'DISPLAY': ':0', 'LANG': 'en_US.UTF-8', 'CONDA_PREFIX_1': '/home/thomashitch/anaconda2', 'XDG_CURRENT_DESKTOP': 'ubuntu:GNOME', 'LC_TELEPHONE': 'de_DE.UTF-8', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'CONDA_PREFIX_2': '/home/thomashitch/miniconda3', 'XDG_SESSION_DESKTOP': 'ubuntu', 'XMODIFIERS': '@im=ibus', 'GNOME_TERMINAL_SERVICE': ':1.72', 'XAUTHORITY': '/run/user/1000/gdm/Xauthority', 'SSH_AUTH_SOCK': '/run/user/1000/keyring/ssh', 'CONDA_PYTHON_EXE': '/home/thomashitch/miniconda3/bin/python', 'LC_NAME': 'de_DE.UTF-8', 'SHELL': '/bin/bash', 'QT_ACCESSIBILITY': '1', 'GDMSESSION': 'ubuntu', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'CONDA_DEFAULT_ENV': 'protologger2', 'LC_MEASUREMENT': 'de_DE.UTF-8', 'TEXTDOMAINDIR': '/usr/share/locale/', 'GJS_DEBUG_OUTPUT': 'stderr', 'GPG_AGENT_INFO': '/run/user/1000/gnupg/S.gpg-agent:0:1', 'LC_IDENTIFICATION': 'de_DE.UTF-8', 'XDG_VTNR': '2', 'QT_IM_MODULE': 'ibus', 'JAVA_HOME': '/home/thomashitch/miniconda3/envs/protologger2', 'PWD': '/home/thomashitch/Projects/Protologger-Updates/June-2021-Update2Conda/Example_run', 'JAVA_LD_LIBRARY_PATH_BACKUP': '', 'CLUTTER_IM_MODULE': 'xim', 'CONDA_EXE': '/home/thomashitch/miniconda3/bin/conda', 'XDG_DATA_DIRS': '/usr/share/ubuntu:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop', 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/etc/xdg', 'LC_NUMERIC': 'de_DE.UTF-8', 'LC_PAPER': 'de_DE.UTF-8', 'CONDA_PREFIX': '/home/thomashitch/miniconda3/envs/protologger2', 'VTE_VERSION': '5202'}

I have never faced this issue before, but it seems that phylophlan is looking for the anaconda version of diamond instead of the miniconda version I have installed via the previous command as shown below;

/home/thomashitch/miniconda3/envs/protologger2/bin/diamond

Is there something I can do to demand phylophlan uses the conda version?

Thanks, Tom

fasnicar commented 3 years ago

Hi Tom and thanks for reporting this. I think you can very easily fix this by editing (or copying it to a new file and then edit it) the config file /media/thomashitch/MyDATA/Projects/Protologger-Updates/June-2021-Update2Conda/Protologger-master/bin/Phylophlan/supermatrix_aa.cfg. I think the config is the default one generated when you installed PhyloPhlAn, so is likely reporting the path to the diamond installed in the anaconda env. You can open it with any text editor and replace the path to diamond present there (I think you'll find the /home/ecoli/anaconda/envs/protologger/bin/diamond path for the db_aa, map_dna, and map_aa entries) with the path of the one you installed in miniconda (/home/thomashitch/miniconda3/envs/protologger2/bin/diamond).

Please, let me know you should have any other issues.

Many thanks, Francesco

thh32 commented 3 years ago

Thanks Francesco, I forgot these are config files so copied them from one system to another!

Thanks for you help, issue is closed!