MyNixOS website logo
Description

Simultaneous Analysis of Multiplexed Metabarcodes.

A comprehensive set of wrapper functions for the analysis of multiplex metabarcode data. It includes robust wrappers for 'Cutadapt' and 'DADA2' to trim primers, filter reads, perform amplicon sequence variant (ASV) inference, and assign taxonomy. The package can handle single metabarcode datasets, datasets with two pooled metabarcodes, or multiple datasets simultaneously. The final output is a matrix per metabarcode, containing both ASV abundance data and associated taxonomic assignments. An optional function converts these matrices into 'phyloseq' and 'taxmap' objects. For more information on 'DADA2', including information on how DADA2 infers samples sequences, see Callahan et al. (2016) <doi:10.1038/nmeth.3869>. For more details on the demulticoder R package see Sudermann et al. (2025) <doi:10.1094/PHYTO-02-25-0043-FI>.

Demulticoder: An R package for the simultaneous analysis of multiplexed metabarcodes

Introduction

The demulticoder package is a Cutadapt and DADA2 wrapper package for metabarcodng analyses. The main commands and outputs are intuitive and comprehensive, which helps to account for the complex and iterative nature of metabarcoding analyses.

Here is a brief schematic of the general workflow:

Key Features

  • It automates the use of DADA2 to analyze data derived from multiple metabarcodes.
  • It reduces the number of manual input steps
  • Handles analysis of two metabarcodes multiplexed into the same sequencing batch
  • Analyze different types of metabarcodes simultaneously
  • Reproducible workflows for oomycetes
  • Supported metabarcodes: 16S rDNA, ITS1, rps10, and up to two additional metabarcodes

Installation

Dependencies:
First install Cutadapt program following the instructions here: https://cutadapt.readthedocs.io/en/stable/installation.html

Let’s locate where the Cutadapt executable is. You must do this from a Terminal window:

#If you installed with pip or pipx, or homebrew, run this command from a Terminal window
which cutadapt
cutadapt --version

If you followed the Cutadapt installation instructions to create a conda environment called cutadapt (change to whatever you named your environment), to install it in, open up a Terminal window and type these commands:

#Run commands from a Terminal window
conda activate cutadapt
which cutadapt
cutadapt --version

Second, make sure the following R packages are installed:

To install the development version of package (while submission to CRAN is in progress):

#Here we install demulticoder (instructions will be updated once available through CRAN)
devtools::install_github("grunwaldlab/demulticoder")
library("demulticoder")

#Let's make sure other packages are loaded:
library("devtools")
library("dada2")
library("phyloseq")
library("metacoder")

Quick start

1. Set-up input directory and files

To demonstrate how to use the package, we have a small test data set that comes loaded with the package. This data set will be used in the workflow example below.

Already loaded in the test data set directory are the following files:

  • PE short read amplification data
    • Files: S1_R1.fastq.gz, S1_R2.fastq.gz, S2_R1.fastq.gz, S2_R1.fastq.gz
    • The files must end in either R1.fastq.gz , or R2.fastq.gz and each sample must have both R1 and R2 files.
  • metadata.csv
    • New row for each unique sample
    • Samples entered twice if samples contain two pooled metabolites, as in the test data template
  • primerinfo_params.csv
    • New row for each unique barcode and associated primer sequence
    • Optional Cutadapt and DADA2 parameters
  • Taxonomy databases
    • UNITE fungal database (abridged version)
    • completed

See Documentation for how to format databases and input files.

For more details on each step, check out the Getting Started tab on the package website

2. Prepare reads

output<-prepare_reads(
  data_directory = system.file("extdata", package = "demulticoder"), # This allows us to use the test directory located within the package
  output_directory = tempdir(), # Change to you preferred location on your local computer (Example: "~/demulticoder_test")
  overwrite_existing = TRUE)

3. Cut and trim reads
User must install Cutadapt on their local machine and append the path to the executable.

cut_trim(
  output,
  cutadapt_path="/usr/bin/cutadapt", # Change to the location on your computer. (Example: "/usr/bin/cutadapt")
  overwrite_existing = TRUE) 

4. Make ASV abundance matrix

make_asv_abund_matrix(
  output,
  overwrite_existing = TRUE)

5. Assign taxonomy

assign_tax(
  output,
  asv_abund_matrix,
  overwrite_existing = TRUE)

6. Convert ASV matrix to taxmap and phyloseq objects

objs<-convert_asv_matrix_to_objs(output)

Check out the website to view the documentation and see more examples

For more information on source code, check out the package repository: https://grunwaldlab.github.io/demulticoder/

For source code:

https://github.com/grunwaldlab/demulticoder/

Citation

The package was developed by Martha Sudermann, Zachary Foster, Samantha Dawson, Hung Phan, Jeff Chang, and Niklaus Grünwald

Sudermann MA, Foster ZSL, Dawson SCL, Phan H, Fieland VJ, Martin FN, Chang JH, Grünwald NJ. Demulticoder: An R Package for the Simultaneous Analysis of Multiplexed Metabarcodes. Phytopathology. 2025. 10.1094/PHYTO-02-25-0043-FI. Epub ahead of print.

Metadata

Version

0.1.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows