PEMA investigating metabarcoding

Looking for PEMA v2.x? See Get PEMA (v2.x).

Get PEMA

PEMA is a Nextflow pipeline: every step runs in its own container, which Nextflow downloads the first time it is needed. So you only need two things on your computer, server or cluster.

1. Nextflow

PEMA needs Nextflow 25.04 or later, which itself needs Java 17 or later. Follow the Nextflow installation instructions, for example:

curl -s https://get.nextflow.io | bash
chmod +x nextflow
mv nextflow ~/bin/      # or any folder in your PATH
nextflow -version

2. A container engine

One of:

Hint!
On Windows and macOS, Docker Desktop has a memory (RAM) limit you might need to raise in its settings, especially for the taxonomy assignment of COI data.

3. PEMA

Get the PEMA code from GitHub:

git clone https://github.com/hariszaf/pema.git
cd pema

To get a specific version, check out its tag, e.g. git checkout v3.0.0; the previous version, PEMA v2.x, has the v2.2.0 tag (see its documentation).

That’s all: the containers (fastp, VSEARCH, Swarm, crest4, RDPClassifier, …) are pulled automatically when you first run PEMA. The reference databases are downloaded the first time they are used, too.

You are ready to set up your analysis; see Basics for running PEMA.

Checking your setup

The PEMA repository includes a sanity check: it downloads a small dataset (16S, 18S, 12S, COI and ITS samples) and runs PEMA on it. It is a good way to check that everything works on your machine, and to see what PEMA returns:

sanity_check/run_sanity_check.sh 16S

Run sanity_check/run_sanity_check.sh --help to see all the tests.