pre_tax_table: Complete a taxonomy table

View source: R/phylogenetic.R

pre_tax_tableR Documentation

Complete a taxonomy table

Description

Complete a taxonomy table

Usage

pre_tax_table(
  tax_table,
  tax_levels = c("k", "p", "c", "o", "f", "g", "s", "st"),
  na_tax = "Unclassified|uncultured|Ambiguous|Unknown|unknown|metagenome|Unassig",
  ignore.case = TRUE,
  na_repalce = "Unknown"
)

Arguments

tax_table

taxonomy table

tax_levels

a vector whose length longer than ncol(taxdf), use to be prefix. Default: c("k", "p", "c", "o", "f", "g","s", "st")

na_tax

grepl some words and turn to na_repalce, default: "Unclassified|uncultured|Ambiguous|Unknown|unknown|metagenome|Unassig"

ignore.case

ignore.case for na_tax

na_repalce

defalut: Unknown

Value

a good taxonomy table

References

MicrobiotaProcess

Examples

taxmat <- matrix(sample("onelevel", 7 * 2, replace = TRUE), nrow = 2, ncol = 7) %>% as.data.frame()
colnames(taxmat) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species")
pre_tax_table(taxmat)

pctax documentation built on May 29, 2024, 10:03 a.m.