How to use PICRUSt2 on docker image?

Hi there!

I'm quite new to qiime2 and PICRUSt2. I'm trying to use PICRUSt2 on docker, but can't install the PICRUSt2 on docker image. Any advice would be grately appreciated.

Thanks,
Mami

Hello, and welcome to :qiime2:

The problem description is vague and I cannot advise anything specific. Would you care to provide more detail on what's failing?
Dockerfile? Installation error? Command?

Cheers
V

2 Likes

Sorry for bothering you with it. I have trouble with installation.
I’ve found a tutorial for it Installing Community Plugins in Docker but I got the error below.

Firstly, I run the following:

docker run --platform linux/amd64 --rm -it --name my-custom-container quay.io/qiime2/core:2021.11 /bin/bash
conda install q2-picrust2=2021.11 -c conda-forge -c bioconda -c gavinmdouglas
qiime dev refresh-cache

Secondly, I opened another terminal:

docker ps
CONTAINER ID   IMAGE                         COMMAND       CREATED              STATUS              PORTS     NAMES
2d83a3cc8c30   quay.io/qiime2/core:2021.11   "/bin/bash"   About a minute ago   Up About a minute             my-custom-container
sha256:941105712b44c5f910c1642d01d360b26e4b539ea1e8ff476bcdb9cdff7f21fb

Then, I checked a new image

docker images
REPOSITORY                                    TAG                   IMAGE ID       CREATED          SIZE
thermokarst-qiime2/2021.11-with-q2-picrust2   latest                941105712b44   49 minutes ago   5.75GB

docker run --platform linux/amd64 --rm -it \
    -u $(id -u):$(id -g) \
    -v $(pwd):/data \
    thermokarst-qiime2/2021.11-with-q2-picrust2:latest \
        qiime picrust2
Error: QIIME 2 has no plugin/command named 'picrust2'.

My configuration is:
System versions
Python version: 3.8.12
QIIME 2 release: 2021.11
QIIME 2 version: 2021.11.0
q2cli version: 2021.11.0

Installed plugins
alignment: 2021.11.0
composition: 2021.11.0
cutadapt: 2021.11.0
dada2: 2021.11.0
deblur: 2021.11.0
demux: 2021.11.0
diversity: 2021.11.0
diversity-lib: 2021.11.0
emperor: 2021.11.0
feature-classifier: 2021.11.0
feature-table: 2021.11.0
fragment-insertion: 2021.11.0
gneiss: 2021.11.0
longitudinal: 2021.11.0
metadata: 2021.11.0
phylogeny: 2021.11.0
quality-control: 2021.11.0
quality-filter: 2021.11.0
sample-classifier: 2021.11.0
taxa: 2021.11.0
types: 2021.11.0
vsearch: 2021.11.0

What should I do to fix this problem? Thanks.

1 Like

Hello,

It seems like the installation in the Docker container was not finished.

  1. Try to wait until conda install is finished, run command qiime picrust2 and check what happens then.
  2. If command is executed without errors, commit new changes following this tutorial.

Cheers,
V

1 Like

Hello, thank you for your kind reply!

When I run conda install on Mac with M1 chip, I experienced the same error discussed in picrust2 qiime2-2019.10 install error. Then I tried manual installation from source Installation.

docker run --platform linux/amd64 --rm -it --name my-custom-container quay.io/qiime2/core:2021.11 /bin/bash
wget https://github.com/picrust/picrust2/archive/v2.5.1.tar.gz
tar xvzf v2.5.1.tar.gz
cd picrust2-2.5.1/

conda env create -f picrust2-env.yaml
conda activate picrust2
pip install --editable .

pytest

Then, I installed q2-picrust2:

wget https://github.com/gavinmdouglas/q2-picrust2/archive/2021.11_0.tar.gz
tar xvzf 2021.11_0.tar.gz
cd picrust2-2.5.1/

pip install -e . 

qiime dev refresh-cache

Both installations seem successfully finished, but I can’t find the picrust2 plugin in qiime2.

qiime picrust2 --help
Error: QIIME 2 has no plugin/command named 'picrust2'.

I’d appreciate any advice on how to proceed from here.
Thank you again for your time,
Mami

Hello,

It is a weird error, I tried to install q2-picrust2 and everything works for me. Please, inspect the installation step.

Otherwise, as the plugin was left unmaintained for a while, you can use a standalone version and import files to QIIME2 as FeatureTable[Frequencies] Artifact.

Cheers
V

Thank you for all your support. Before trying to standalone, I’d like to make sure that my environment is OK or not. Do you think I have to clear all these warning messages? If you find any other mistakes, please let me know.



Sorry for bothering you again.
Mami