strainphlan and conda

690 views
Skip to first unread message

Nicholas Youngblut

unread,
Feb 6, 2018, 7:50:54 AM2/6/18
to MetaPhlAn-users
As far as I can tell, the strianphlan scripts required for the pipeline are not installed via setup.py (eg., sample2markers.py). Thus, these scripts are also not installed into a PATH directory via the conda installation of metaphlan2 (and strainphlan). It would be helpful to alter the package setup so all scripts needed for metaphlan and strainphlan are installed in a location in PATH.

Francesco Asnicar

unread,
Feb 7, 2018, 6:39:09 PM2/7/18
to Nicholas Youngblut, MetaPhlAn-users
Hello Nicholas,

You're right. I updated the conda recipe and the MetaPhlAn2 package in my anaconda profile (https://anaconda.org/fasnicar/metaphlan2) that now includes also all the StrainPhlAn scripts.
Please, note that the suggested command by anaconda ("conda install -c fasnicar metaphlan2") won't work in the case you don't already have all the dependencies satisfied. You should instead issue the following command to also satisfy the other MetaPhlAn2 dependencies:
$ conda install -c fasnicar metaphlan2 -c bioconda

We are also in touch with the bioconda developers to have the latest MetaPhlAn2 package included also there.

Many thanks,
Francesco

On Tue, Feb 6, 2018 at 1:50 PM Nicholas Youngblut <nyou...@gmail.com> wrote:
As far as I can tell, the strianphlan scripts required for the pipeline are not installed via setup.py (eg., sample2markers.py). Thus, these scripts are also not installed into a PATH directory via the conda installation of metaphlan2 (and strainphlan). It would be helpful to alter the package setup so all scripts needed for metaphlan and strainphlan are installed in a location in PATH.

--
You received this message because you are subscribed to the Google Groups "MetaPhlAn-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metaphlan-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicholas Youngblut

unread,
Feb 8, 2018, 2:04:16 AM2/8/18
to MetaPhlAn-users
Awesome! THANKS! That will really help for integrating metaphlan2 & strainphlan into pipelines (eg., snakemake).

Francesco Asnicar

unread,
Feb 19, 2018, 8:59:23 AM2/19/18
to Nicholas Youngblut, MetaPhlAn-users
Hi Nicholas,

I created and tested a conda environment that satisfies the MetaPhlAn2/StrainPhlAn dependencies.
You can find it here: https://anaconda.org/fasnicar/spa
and it can be installed using the following command: conda env create fasnicar/spa

Please, let me know you should find any problem running either MetaPhlAn2 and StrainPhlAn using this environment.

Many thanks,
Francesco

On Thu, Feb 8, 2018 at 8:04 AM Nicholas Youngblut <nyou...@gmail.com> wrote:
Awesome! THANKS! That will really help for integrating metaphlan2 & strainphlan into pipelines (eg., snakemake).

Nicholas Youngblut

unread,
Feb 19, 2018, 11:37:21 AM2/19/18
to MetaPhlAn-users
That's great! Thanks for creating the conda environment.

Nick

Flo

unread,
Feb 20, 2018, 2:34:36 PM2/20/18
to MetaPhlAn-users
Dear all,

Thanks a lot for developping those tools.

I have successfully installed the spa conda environment but I am not sure how to use it actually. I was expecting to find metaphan2 etc binaries in the anaconda3/envs/spa/bin/ directory but I can't find them.

Thanks a lot for your help.

Cheers,

Flo

Francesco Asnicar

unread,
Feb 21, 2018, 5:12:10 AM2/21/18
to Flo, MetaPhlAn-users
Hi Flo,

The "spa" conda environment simply satisfy the dependencies required by MetaPhlAn2/StrainPhlAn. I didn't include the MetaPhlAn2 package in the environment so that one can install MetaPhlAn2 either via the conda package or by cloning the repository, having more flexibility about the version of MetaPhlAn2/StrainPhlAn that the user can run.

So, after having correctly setup the "spa" conda environment, you can clone the MetaPhlAn2 repository (https://bitbucket.org/biobakery/metaphlan2, by using: hg clone https://bitbucket.org/biobakery/metaphlan2) and run it without the need to install anything else.

Many thanks for using our tools and please let me know you should have any problems running MetaPhlAn2 or StrainPhlAn or with the "spa" environment.

Bests,
Francesco

Flo

unread,
Mar 13, 2018, 9:29:22 AM3/13/18
to MetaPhlAn-users
Hi Francesco,

Thanks a lot, it is working perfectly.

Cheers

Flo

Flo

unread,
Mar 13, 2018, 11:23:29 AM3/13/18
to MetaPhlAn-users
I got this error when trying to configure the environment on another marchine :

$ conda env create fasnicar/spa

Using Anaconda API: https://api.anaconda.org
Fetching package metadata ...........

NoPackagesFoundError: Package missing in current linux-64 channels:
- ca-certificates 2017.08.26 h1d4fec5_0


Do you know where this is coming from?

Thanks

Flo

Francesco Asnicar

unread,
Mar 23, 2018, 4:01:54 PM3/23/18
to Flo, MetaPhlAn-users
Hi Flo,

Many thanks for trying the spa conda environment.
I did a couple of tests and the command:
 $ conda env create fasnicar/spa
is working here. The version of conda I'm using is "4.4.10-py36_0".
I briefly checked on the Internet and it seems that the problem you reported is a conda problem. It seems that re-installing anaconda should fix the problem, however, I don't find this a real solution. Can you maybe try to update your conda version?

Please, let me know you should still have problems.

Many thanks,
Francesco

Nicholas Youngblut

unread,
Apr 15, 2019, 6:36:04 AM4/15/19
to MetaPhlAn-users
After updating conda to 4.6.11, trying to create the "spa" environment will cause conda to freeze. I'm guessing that there's now a dependency conflict or a version of specific software is no longer found. @Francesco can you verify this? If yes, what should be modified to the environment?

The conda env yaml file that I'm using:

```
dependencies:
- biom-format
- blast=2.6.0=boost1.61_1
- dendropy=3.12.3=0
- mmtf-python=1.0.2=py27_0
- muscle=3.8.1551=2
- pysam=0.8.3=py27_2
- raxml=8.2.10=0
- samtools=0.1.19=2
- biopython=1.69=np113py27_0
- boost=1.61.0=py27_0
- certifi=2018.1.18=py27_0
- freetype=2.8=hab7d2ae_1
- icu=54.1=0
- intel-openmp=2018.0.0=hc7b2577_8
- jpeg=9b=h024ee3a_2
- libedit=3.1=heed3624_0
- libffi=3.2.1=hd88cf55_4
- libgcc=7.2.0=h69d50b8_2
- libgcc-ng=7.2.0=h7cc24e2_2
- libgfortran-ng=7.2.0=h9f7466a_2
- libpng=1.6.34=hb9fc6fc_0
- libstdcxx-ng=7.2.0=h7a57d05_2
- libtiff=4.0.9=h28f6b97_0
- mkl=2018.0.1=h19d6760_4
- msgpack-python=0.5.1=py27h6bb024c_0
- ncurses=6.0=h9df7e31_2
- numpy=1.13.3=py27h3dfced4_2
- olefile=0.45.1=py27_0
- openssl=1.0.2n=hb7f436b_0
- pandas=0.21.1=py27h38cdd7d_0
- pillow=5.0.0=py27h3deb7b8_0
- pip=9.0.1=py27ha730c48_4
- python=2.7.14=h1571d57_29
- python-dateutil=2.6.1=py27h4ca5741_1
- pytz=2017.3=py27h001bace_0
- readline=7.0=ha6073c6_4
- reportlab=3.4.0=py27_0
- scipy=1.0.0=py27hf5f0f52_0
- setuptools=38.4.0=py27_0
- six=1.11.0=py27h5f960f1_1
- sqlite=3.22.0=h1bed415_0
- tk=8.6.7=hc745277_3
- wheel=0.30.0=py27h2bc6bb2_1
- xz=5.2.3=h55aa19d_2
- zlib=1.2.11=ha838bed_2
- pip:
- cloudpickle==0.2.2
- configparser==3.5.0
- cutadapt==1.12
- cycler==0.10.0
- doit==0.29.0
- functools32==3.2.3.post2
- matplotlib==1.5.3
- pyinotify==0.9.6
- pyparsing==2.2.0
- seaborn==0.7.1
- subprocess32==3.2.7
- virtualenv==15.1.0
- xopen==0.1.1
```
> To unsubscribe from this group and stop receiving emails from it, send an email to metaphl...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages