lca: Find the last common ancestor of assignSpecies taxonomic...

View source: R/lca.R

lcaR Documentation

Find the last common ancestor of assignSpecies taxonomic assignments

Description

The output of the assignSpecies_mod function is a two-column dataframe of ASVs and their taxonomic assignments based on exact matching to reference sequences: if multiple sequences are matched, the ASV will be repeated across rows, one per match. This function collapses each ASV to a single row labeled with the last common ancestor of all its matched taxa (*e.g.*, an ASV matching to an ASV matching to both wheat [Triticum aestivum] and rye [Secale cereale] was relabeled as Poaceae, the family shared by both genera).

Usage

lca(assignment)

Arguments

assignment

The output of assignSpecies_mod (*i.e.* matches of ASVs to sequences in a metabarcoding reference database).

Value

A taxonomy table with taxonomic assignment per ASV, compatible for use in a phyloseq object.


ammararuby/MButils documentation built on Jan. 29, 2023, 11:13 a.m.