Environmental DNA (Jan 2024)

rCRUX: A rapid and versatile tool for generating metabarcoding reference libraries in R

  • Emily E. Curd,
  • Luna Gal,
  • Ramon Gallego,
  • Katherine Silliman,
  • Shaun Nielsen,
  • Zachary Gold

DOI
https://doi.org/10.1002/edn3.489
Journal volume & issue
Vol. 6, no. 1
pp. n/a – n/a

Abstract

Read online

Abstract The sequencing revolution requires accurate taxonomic classification of DNA sequences. The key to making accurate taxonomic assignments is curated, comprehensive reference barcode databases. However, the generation and curation of such databases has remained challenging given the large and continuously growing volumes of both DNA sequence data and novel reference barcode targets. Monitoring and research applications require a greater diversity of specialized gene regions and targeted taxa than are currently curated by professional staff. Thus, there is a growing need for an easy‐to‐implement computational tool that can generate comprehensive metabarcoding reference libraries for any bespoke locus. We address this need by reimagining CRUX from the Anacapa Toolkit and present the rCRUX package in R which, like its predecessor, relies on sequence homology and PCR primer compatibility instead of keyword searches to avoid limitations of user‐defined metadata. The typical workflow involves searching for plausible seed amplicons (get_seeds_local() or get_seeds_remote()) by simulating in silico PCR to acquire a set of sequences analogous to PCR products containing a user‐defined set of primer sequences. Next, these seeds are used to iteratively blast search seed sequences against a local copy of the National Center for Biotechnology Information (NCBI)‐formatted nt database using a taxonomic rank‐based stratified random sampling approach (blast_seeds()). This results in a comprehensive set of sequence matches. This database is dereplicated and cleaned (derep_and_clean_db()) by identifying identical reference sequences and collapsing the taxonomic path to the lowest taxonomic agreement across all matching reads. This results in a curated, comprehensive database of primer‐specific reference barcode sequences from NCBI. Databases can then be compared (compare_db()) to determine read and taxonomic overlap. We demonstrate that rCRUX provides more comprehensive reference databases for the MiFish Universal Teleost 12S, Taberlet trnl, fungal ITS, and Leray CO1 loci than CRABS, MetaCurator, RESCRIPt, and ecoPCR reference databases. We then further demonstrate the utility of rCRUX by generating 24 reference databases for 20 metabarcoding loci, many of which lack dedicated reference database curation efforts. The rCRUX package provides a simple‐to‐use tool for the generation of curated, comprehensive reference databases for user‐defined loci, facilitating accurate and effective taxonomic classification of metabarcoding and DNA sequence efforts broadly.