valid.taxonomy: Validate And Reformat The OTU Taxonomy Column

Description Usage Arguments Author(s) See Also Examples

Description

A properly formatted taxonomy column of an otu table is critical for RAM functions to run properly. The taxonomy column of an otu table is composed of taxonomic lineages for otuIDs. RAM accept 7 ranks, including kingdom, phylum, class, order, family, genus and species, sub ranks are not supported. Taxa names at each rank should have prefix as "k__", "p__", "c__", "o__", __", "g__", and "s__", each rank should be separated by "; ", i.e. a semi colon and a white space, NOT just ";". This function will check the format of the taxonomy column of the input otu table and give suggetions that whether or not it needs to be reformatted using reformat.taxonomy of RAM. However, RAM does accept missing ranks in lineages, as long as each rank is separated by "; " with proper prefix.

Usage

1
2
valid.taxonomy(data)
reformat.taxonomy(data, input.ranks, sep="; ")

Arguments

data

a list of otu tables, see RAM.input.formatting.

input.ranks

the ranks of the taxonomic lineages in the input otu tables.

sep

the separator between each taxonomic rank in the lineage.

Author(s)

Wen Chen.

See Also

get.rank, tax.abund

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(ITS1)
## Not run: 
# for demonstration purpose only
# the ITS1 dataset missing species rank, but it's ok
# the problematic taxonomy lineages are those missing proper 
# prefix at each rank
# see ?RAM.rank.formatting
valid.taxonomy(data=list(ITS1=ITS1))
input.ranks <- c("kingdom", "phylum", "class", "order", 
                 "family", "genus")
reform.ITS1 <- reformat.taxonomy(list(ITS1=ITS1),
                                 input.ranks=input.ranks,
                                 sep="; ")[[1]]

## End(Not run)

Example output

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-3
Loading required package: ggplot2
sh: 1: cannot create /dev/null: Permission denied
sh: 1: cannot create /dev/null: Permission denied
Warning message:
In valid.taxonomy(data = list(ITS1 = ITS1)) :
  For ITS1: missing prefix or missing taxonomy ranks in the lineages; 1) if missing prefix, consider reformatting the taxonomy; 2) if missing ranks only, it's probably ok
Consider reformatting the OTU table's taxonomy, check ?RAM::reformat.taxonomy; 
Warning message:
In valid.taxonomy(data = ls) :
  For ITS1: missing prefix or missing taxonomy ranks in the lineages; 1) if missing prefix, consider reformatting the taxonomy; 2) if missing ranks only, it's probably ok
Consider reformatting the OTU table's taxonomy, check ?RAM::reformat.taxonomy; 

RAM documentation built on May 2, 2019, 3:04 p.m.