namep_taxa-deprecated: Add names for missing taxon names in phyloseq objects

namep_taxa-deprecatedR Documentation

Add names for missing taxon names in phyloseq objects

Description

This function adds names for OTUs/ASVs with incomplete taxonomic annotations, i.e. annotation is only available up to a certain taxonomic rank. It replaces NA values with the lowest available taxonomic annotation for an OTU/ASV and a label indicating that the annotation is unknown. Species can be renamed to genus + species if desired. To avoid downstream problem, it numbers taxa with the same taxonomic annotation but different sequences.

Usage

name_taxa(physeq_obj, label = "Unannotated", other_label = NULL, species = FALSE, unique_rank = NULL, unique_sep = " ")

Arguments

physeq_obj

A phyloseq object with a tax_table.

label

Label to prepend the taxon name with (default = "Unknown").

other_label

The label(s) of samples whose names should not be altered.

species

Generate a 'Genus species' (i.e. 'Escherichia Coli') label for the species level?

unique_rank

The taxonomic rank by which to generate unique labels (added number) if desired (default = "Unannotated").

unique_sep

The text character(s) by which to separate the annotation and the unique number (only when !is.null(unique_rank)).

See Also

fantaxtic-deprecated

Examples

data(GlobalPatterns)
name_taxa(GlobalPatterns)
name_taxa(GlobalPatterns, label = "Unannotated")

gmteunisse/Fantaxtic documentation built on June 7, 2024, 8:47 a.m.