Skip to content

Installation

Robyn Wright edited this page Oct 29, 2024 · 69 revisions

PICRUSt2 is available as a standalone version or as a QIIME 2 plugin (which has less functionality than the standalone). Both versions will work on Linux and Mac OS X (although see the note about installing on a Mac below). To use this program on Windows you would first need to install a Linux emulator.

Please note that placing ASVs with the default pipeline and generating stratified output tables with the PICRUSt2 pipeline (predictions broken down by contributing sequences) requires more computing resources than the PICRUSt1 metagenome prediction steps. You will need at least 16 GB of RAM and the running time may be several hours depending on how many CPUs you can dedicate (and how many samples and sequences are input).

Note that there are fewer options currently available for the QIIME2 plugin, but there are lower memory requirements if a non-default method is used for placing ASVs into a reference tree (which is described in the tutorial). A tutorial on this QIIME2 plugin is available here and the alternative installation instructions for installation and use of PICRUSt2 with this plugin are here.

You can install PICRUSt2 either with conda or from source, which are both shown below. Note that both approaches require that you first install conda. We also recommend that users use the mamba package, which is a reimplementation of conda in C++, which typically increases the installation time substantially (the default conda can sometimes get stuck solving environments for hours at a time, which is a problem facing conda environments in general). You do not need to use mamba though, you can just replace mamba in the below commands with conda to use the standard conda approach.

Install from bioconda

Create a new environment with PICRUSt2 installed and activate the environment. If you receive an error about the default reference files missing when you try to run the program you will need to install from source instead.

mamba create -n picrust2 -c bioconda -c conda-forge picrust2=2.5.3

After installation you need to activate the conda environment:

conda activate picrust2

Install from source

Download the source tarball, untar, and move into directory. You can check that you are downloading the latest release here: https://github.com/picrust/picrust2/releases

wget https://github.com/picrust/picrust2/archive/v2.5.3.tar.gz
tar xvzf  v2.5.3.tar.gz
cd picrust2-2.5.3/

Create and activate the environment (with requirements) and then install PICRUSt2 with pip.

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

Run the tests to verify the installation (note that this wont work if you followed the bioconda install instructions, unless you also downloaded the source code and navigated to the main directory):

pytest

Installing on a Mac

We have heard of several users having issues installing PICRUSt2 on Macs with M1/M2/M3 processors. Installing the r-essentials package within the PICRUSt2 environment seems to fix these issues:

mamba install r-essentials
Clone this wiki locally