# NextITS

A Nextflow pipeline for metabarcoding fungi and other eukaryotes with full-length ITS from PacBio (Illumina paired-end reads are also supported). Raw reads to a curated OTU table in two steps, with every tool in a container.

[Get started](<https://Next-ITS.github.io/quickstart/index.md>) [Installation](<https://Next-ITS.github.io/installation/index.md>)

[GitHub](<https://github.com/vmikk/NextITS>) [Docker Hub](<https://hub.docker.com/r/vmikk/nextits>) [AI agents](<https://Next-ITS.github.io/agents/index.md>)

![NextITS logo](<https://Next-ITS.github.io/assets/NextITS_logo_square.webp>)

Long reads

Full-length ITS from PacBio HiFi, as BAM or FASTQ, with symmetric, asymmetric or single barcodes.

Homopolymer correction

Fixes indels in homopolymer runs, the main error type in HiFi reads and common in fungal ITS.

Tag-jump removal

The UNCROSS2 algorithm removes cross-sample contamination within each sequencing run.

Chimera detection

Reference-based and *de novo* detection, with rescue of false positives that occur as non-chimeric sequences elsewhere.

Denoising and clustering

UNOISE, DADA2, SWARM, VSEARCH and taxon-aware OptimOTU, followed by LULU-style curation.

Reproducible

Docker, Podman, Singularity or Apptainer, from a laptop to HPC. Every run writes reports, a methods summary and software versions.

## How it works

Step 1 · per sequencing run

Quality control, demultiplexing, primer trimming, ITS extraction, homopolymer correction, chimera detection and tag-jump removal.

[![NextITS workflow, Step-1](<https://Next-ITS.github.io/assets/NextITS_Workflow_Step1.webp>)](<https://Next-ITS.github.io/assets/NextITS_Workflow_Step1.webp>)

Step 2 · across runs

Pooling of Step-1 results from all runs, filtering, optional denoising, clustering into OTUs and curation of the OTU table.

[![NextITS workflow, Step-2](<https://Next-ITS.github.io/assets/NextITS_Workflow_Step2.webp>)](<https://Next-ITS.github.io/assets/NextITS_Workflow_Step2.webp>)

Tag switching happens within a sequencing run, so that is where it is removed. New runs can be added to a project without reprocessing the old ones. Click a figure to enlarge it.

## Citation

Mikryukov V., Anslan S., Tedersoo L. NextITS: a pipeline for metabarcoding fungi and other eukaryotes with full-length ITS sequenced with PacBio. Zenodo. DOI: [10.5281/zenodo.15074881](<https://doi.org/10.5281/zenodo.15074881>)

Please also cite the tools NextITS uses. They are listed, with references, in `pipeline_info/README_Step1_Methods.txt` and `README_Step2_Methods.txt` in your output folder. NextITS is released under the Apache-2.0 license.
