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)
data (required) Data list as loaded with amp_load
.
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
)
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"
)
Whether to rename any unmatched sequences or not. (default: TRUE
)
An ampvis2 class object