Clean up the taxonomic table to make taxonomic assignments consistent.
tidy_taxonomy(
taxonomy_table,
column = "all",
pattern = c(".*uncultur.*", ".*unknown.*", ".*unidentif.*", ".*unclassified.*",
".*No blast hit.*", ".*sp\\.$", ".*metagenome.*", ".*cultivar.*", ".*archaeon$",
"__synthetic.*", ".*\\sbacterium$", ".*bacterium\\s.*", ".*Incertae.sedis.*"),
replacement = "",
ignore.case = TRUE,
na_fill = ""
)
taxonomic table.
data.frame
object.
a data.frame with taxonomic information.
default "all"; "all" or a number; 'all' represents cleaning up all the columns; a number represents cleaning up this column.
default see the function parameter; the characters (regular expression) to be cleaned up or replaced; cleaned up when parameter replacement = "", replaced when parameter replacement has something; Note that the capital and small letters are not distinguished.
default ""; the characters used to replace the character in pattern parameter.
default TRUE; if FALSE, the pattern matching is case sensitive and if TRUE, case is ignored during matching.
default ""; used to replace the NA.
data("taxonomy_table_16S")
tidy_taxonomy(taxonomy_table_16S)
Run the code above in your browser using DataLab