Error when running q2-picrust2 in qiime2-2019.10

Hi everyone
I am trying to use PICRUSt for the first time. I have installed PICRUSt and the qiime plugin. I started following the tutorial in https://github.com/picrust/picrust2/wiki/q2-picrust2-Tutorial
The first time I ran the full pipeline command (copied and pasted from the tutorial) I got the followin notification:

Missing the following tools from your $PATH variable: epa-ng and gappa. Note that this QIIME2 command is for running the default PICRUSt2 pipeline, which includes steps for running sequence placement with EPA-NG. If you do not want to install the missing programs you can run sequence placement with q2-fragment-insertion and input this tree to the “qiime picrust2 custom_tree_pipeline” command

I have then tried to installed epa-ng using the following code:

#Epa-ng
tar -xzf epa-ng-0.2.1-beta-dev.tar.gz
cd epa-ng-0.2.1-beta-dev
make
ln -s $PWD/bin/epa-ng /usr/local/bin

And this is what I got back:

5 warnings and 2 errors generated.

make[3]: *** [libs/genesis/lib/genesis/CMakeFiles/genesis_lib_static.dir/build.make:63: libs/genesis/lib/genesis/CMakeFiles/genesis_lib_static.dir/////genesis_unity_sources/lib/all.cpp.o] Error 1

make[3]: Leaving directory ‘/Users/cota/picrust2-2.0.3-b/placement_tools/epa-ng-0.2.1-beta-dev/build’

make[2]: *** [CMakeFiles/Makefile2:956: libs/genesis/lib/genesis/CMakeFiles/genesis_lib_static.dir/all] Error 2

make[2]: Leaving directory ‘/Users/cota/picrust2-2.0.3-b/placement_tools/epa-ng-0.2.1-beta-dev/build’

make[1]: *** [Makefile:95: all] Error 2

make[1]: Leaving directory ‘/Users/cota/picrust2-2.0.3-b/placement_tools/epa-ng-0.2.1-beta-dev/build’

make: *** [Makefile:12: run_make] Error 2

I assume that the problem is with the genesis lib. I was not able to solve this issue so I decided to do a conda installation for both epa-ng and grappa:

conda install -c bioconda epa-ng
conda install -c bioconda grappa

After the installation, I ran again the picrust pipeline command:

qiime picrust2 full-pipeline --i-table mammal_biom.qza --i-seq mammal_seqs.qza --output-dir q2-picrust2_output --p-threads 1 --p-hsp-method pic --p-max-nsti 2 --verbose

Initially was looking good but I ended up with the following:

gappa - Genesis Applications for Phylogenetic Placement Analysis
INFO Converting given FASTA file to BFAST format…
INFO Resulting bfast file was written to: /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out/study_seqs_hmmalign.fasta.bfast
INFO Selected: Output dir: /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out/
INFO Selected: Query file: /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out/study_seqs_hmmalign.fasta.bfast
INFO Selected: Tree file: /Users/cota/picrust2-2.0.3-b/default_files/prokaryotic/reference.tre
INFO Selected: Reference MSA: /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/ref_seqs_hmmalign.fasta
INFO Selected: Automatic switching of use of per rate scalers
INFO Selected: Preserving the root of the input tree
INFO Selected: Specified model: GTR+G
INFO Rate heterogeneity: GAMMA (4 cats, mean), alpha: 1 (ML), weights&rates: (0.25,0.136954) (0.25,0.476752) (0.25,1) (0.25,2.38629)
Base frequencies (ML): 0.25 0.25 0.25 0.25
Substitution rates (ML): 0.5 0.5 0.5 0.5 0.5 1
INFO Selected: Reading queries in chunks of: 5000
INFO Selected: Using threads: 1
INFO

INFO Output file: /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out/epa_result.jplace

INFO 371 Sequences done!

INFO Time spent placing: 165s

INFO Elapsed Time: 172s

The following arguments were not expected: /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out --out-dir --fully-resolve /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out/epa_result.jplace --jplace-path

Run with --help for more information.

Error running this command:

gappa analyze graft --jplace-path /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out/epa_result.jplace --fully-resolve --out-dir /var/folders/0s/wsp9m4k901z87rljn7xs6p340000gv/T/tmplwxhia78/picrust2_out/intermediate/place_seqs/epa_out

Could some help me to understand why am I getting the unexpected argument and the error at the end? Thanks!

1 Like

Hi @Cotissima,
I am cc:ing @gmdouglas to see if he can help troubleshoot this issue with q2-picrust. Thanks for your patience!

Hey @Cotissima,

The issue is that specific versions of EPA-NG (v0.3.5) and GAPPA (v0.4.0) are required for the current version of PICRUSt2. These are meant to be installed automatically with conda - how did you install PICRUSt2 and did you run into any particular errors when doing so?

You could also check to see what versions of EPA-NG and gappa you installed to see if the version numbers match what I posted above - it’s possible that installing the appropriate versions with separate conda commands like you did before would resolve the problem.

Best,

Gavin

1 Like

Hi @gmdouglas
Thanks for your response. I installed PICRUST with this command:

wget https://github.com/picrust/picrust2/releases/download/v2.0.3-b/picrust2-2.0.3-b.zip
unzip picrust2-2.0.3-b.zip
cd picrust2-2.0.3-b
conda-env update -n qiime2-2019.10 -f picrust2-env.yaml
pip install --editable .

The versions I’ve got are: Gappa v.0.5.0 and EPA-ng v.0.3.5

I didn’t run into errors when installing PICRUST. I did Create another environment installing PICRUST with conda

conda create -n picrust2 -c bioconda -c conda-forge picrust2=2.2.0_b
conda activate picrust2

And followed the tutorial https://github.com/picrust/picrust2/wiki/PICRUSt2-Tutorial-(v2.2.0-beta), which went ok however I got once more stuck trying to install STAMP (maybe I can use the same files in qiime?

Hey @Cotissima,

I’m glad that installing the latest version of PICRUSt2 worked for you!

You can certainly read the prediction tables into QIIME as Frequency Tables (similar to standard BIOM files).

What issue are you running into with STAMP? I’m not a developer of that tool, but I’ve troubleshooted STAMP install problems before. By the way, STAMP is a useful tool for quickly plotting your data, but I wouldn’t recommend it for statistical analyses since it doesn’t take data compositionality into account.

Best,

Gavin

1 Like

Thanks! I will try qiime with those files! Stamp installation is not that easy for macs. I had to create another environment for Python2, installed numpy and then pip install STAMP. But I get a message at the end saying this:

File “/Users/cota/miniconda3/envs/python2env/bin/STAMP”, line 32, in
from stamp import STAMP
File “/Users/cota/miniconda3/envs/python2env/lib/python2.7/site-packages/stamp/STAMP.py”, line 38, in
from stamp.GUI.plotDlg import PlotDlg # forward reference so py2app recognizes this file is required
File “/Users/cota/miniconda3/envs/python2env/lib/python2.7/site-packages/stamp/GUI/plotDlg.py”, line 24, in
from PyQt4 import QtGui, QtCore
ImportError: No module named PyQt4

Then, I began the challenge of installing PyQt4 until my patience and positivism disappear, as you constantly are missing something for the previous something.

Anyways, will try to look at those file in qiime and let you know ho it works!

2 Likes

In case others are trying to troubleshoot installing STAMP too, note that you can install it with conda (see: https://anaconda.org/bioconda/stamp) or alternatively there are instructions on using pip and other tools here: http://kiwi.cs.dal.ca/Software/Quick_installation_instructions_for_STAMP

Edit: Note that both of the approaches listed above are supposed to work for Macs.

Best,

Gavin