Installing Community Plugins (https://library.qiime2.org) is a breeze with Docker!
First, let’s launch an interactive Docker container:
docker run --rm -it --name my-custom-container qiime2/core:2018.11 /bin/bash
Next, pick a plugin to install: I will try out @cduvallet’s q2-perc-norm. Running the current install command:
# This plugin is just an example, please follow the directions for
# the plugin (or plugins) you wish to install!
conda install -c cduvallet q2_perc_norm -y
qiime dev refresh-cache
Then, in another terminal, I will run the following:
docker ps
Which should return:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
59a4d6df8220 qiime2/core:2018.11 "/usr/bin/tini -- /b…" 5 seconds ago Up 4 seconds my-custom-container
We want to make a note of the CONTAINER ID
for the container named my-custom-container
, we want to use that in the next command:
docker commit 59a4d6df8220 thermokarst-qiime2/2018.11-with-q2-perc-norm:latest
Now we should have a new image registered locally:
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
thermokarst-qiime2/2018.11-with-q2-perc-norm latest c6818a93b556 5 seconds ago 7.16GB
qiime2/core 2018.11 3980460694d5 6 days ago 6.94GB
qiime2/core latest 3980460694d5 6 days ago 6.94GB
continuumio/miniconda3 latest d3c252f8727b 7 weeks ago 422MB
qiime2/core 2018.8 a1717e0e9bd7 2 months ago 6.31GB
Cool! Now if we run our new container, instead of the official QIIME 2 docker container we will have our new plugin available to us:
docker run --rm -it \
-u $(id -u):$(id -g) \
-v $(pwd):/data \
thermokarst-qiime2/2018.11-with-q2-perc-norm:latest \
qiime perc-norm
Usage: qiime perc-norm [OPTIONS] COMMAND [ARGS]...
Description: This QIIME 2 plugin performs a model-free normalization
procedure where features (i.e. bacterial taxa) in case samples are
converted to percentiles of the equivalent features in control samples
within a study prior to pooling data across studies.
Plugin website: http://www.github.com/cduvallet/q2-perc-norm
Getting user support: Raise an issue on the github repo:
https://github.com/cduvallet/q2-perc-norm
Options:
--version Show the version and exit.
--citations Show citations and exit.
--help Show this message and exit.
Commands:
percentile-normalize Percentile normalization
Woohoo!!