Renames sequences loaded in an ampvis2 object based on exact matches (100% identity and exact same length) in a FASTA file. This is useful for enabling direct cross-study/cross-dataset comparison of OTU/ASV names. This function is also used internally in amp_merge_ampvis2.

matchOTUs(data, fasta, unmatched_prefix = "unmatched", rename_unmatched = TRUE)

Arguments

data

data (required) Data list as loaded with amp_load.

fasta

Path to a FASTA file or a DNAbin class object with sequences whose names will be used as OTU names by exact matches (i.e. same length, 100% sequence identity). (default: NULL)

unmatched_prefix

Prefix used to name any unmatched sequences in the FASTA file. An integer counting from 1 will be appended to this prefix, so for example the 123th unmatched sequence will be named unmatched123, and so on. (default: "unmatched")

rename_unmatched

Whether to rename any unmatched sequences or not. (default: TRUE)

Value

An ampvis2 class object