Implementation

The heavy lifting of sequence analyses are done by the following third party programs. They should be installed on your computer:

vtamR has been tested using the above mentioned versions, but it should work with later versions. vtamR was tested on Windows and Linux, and should work in all operating systems.

  • Help is available for all vtamR functions via ?function_name.
  • Most functions accept either a data frame or a CSV file as input, and return a data frame (optionally saved to a CSV file if a filename is provided).

Install vtamR

pkg_install will handle conveniently the R dependencies of vtamR.

if(!requireNamespace("pak", quietly = TRUE)) install.packages("pak")
pak::pkg_install("meglecz/vtamR@develop")

Read the Manual on how to construct a full metabarcoding pipeline.

Install third party programs

Option 1: Install third party programs using conda environment

In R, find the full path to the YAML environment file:

environment_vtamR_yml_path <- system.file("environment_vtamR.yml", package = "vtamR")
cat(environment_vtamR_yml_path)

In a terminal, replace PATH_TO_YML with the path you just printed:

conda env create -f PATH_TO_YML
conda activate vtamRenv

This creates a Conda environment vtamRenv with all required tools.

If using RStudio, you must manually set the paths to these tools in your R session or scripts. See the Set up section of the tutorial for details.

Get paths to third-party programs:

conda activate vtamRenv

which vsearch
which blastn
which cutadapt
which swarm

Option 2: Install third party programs manually

Windows

Download binaries and save it a convenient place on your computer (path without space, e.g. C:/Users/Public/)

vsearch

cutadapt

swarm

BLAST

  • Detailed instructions: https://www.ncbi.nlm.nih.gov/books/NBK52637/
  • Download executable (ncbi-blast-x.xx.x+-win64.exe) from https://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/
  • Double click on the .exe file, accept the license agreement and specify the install location when prompted. Attention! Do not accept the standard location (C:/Program Files/…) since it contains a space. Chose a directory with a path without space (e.g. C:/Users/Public/).
  • The executable are found in blast-x.xx.x+/bin/

TaxAssign reference data base

A ready-to-use COI database is available from OSF OSF, (Meglécz, 2023).

Download and extract using:


download_db(filename = "COInr_for_vtam_2025_05_23_dbV5.tar.gz",
    url = "https://osf.io/download/jyhz6/",
    dest_dir = "COInr_db",
    untar = TRUE,
    quiet = FALSE
    )

To check for newer versions:

Alternatively, you can also create a custom version from the TSV format database available at Zenodo and make a custom version using mkCOInr (Meglécz, 2023).

For other markers you will need a database formatted to BLAST, containing taxIDs and a taxonomy file. If all sequences are extracted from NCBI-nt. The taxonomy file provided in OSF can be used without modification.