Description Usage Arguments Details Value Author(s) See Also Examples
This function consumes an OTU table and returns a new OTU table where the taxonomic classifications which are unidentified, unclassified, incertae sedis, or simply missing, are replaced with a more descriptive entry.
1 |
data |
the OTU table to be used. |
downstream |
logical. Should the replacement occur downstream, or upstream? (see Details) |
If downstream == TRUE
, the function will start at the
kingdom level and work its way down. Whenever an invalid group
is
encountered (i.e. one of "unclassified", "unidentified",
"incertae_sedis", or simply missing, ignoring capitalization),
the last known 'good' group will be substituted in the form
"p__belongs_to_k_Fungi
." If downstream == FALSE
,
the function will begin at the species level and work up.
This example should help clarify: given the taxonomy "k__Fungi;
p__unidentified; c__Tremellomycetes", the new taxonomy is as
follows (recall that an OTU table is required as input, and
will be returned as output; this example simply shows the
effect on the taxonomy):
Downstream (Kingdom -> Species): "k__Fungi; p__belongs_to_k_Fungi; c__Tremellomycetes; o__belongs_to_c_Tremellomycetes; f__belongs_to_c_Tremellomycetes; g__belongs_to_c_Tremellomycetes; s__belongs_to_c_Tremellomycetes"
Upstream (Species -> Kingdom): "k__Fungi; p__belongs_to_c_Tremellomycetes; c__Tremellomycetes; o__belongs_to_no_taxonomy; f__belongs_to_no_taxonomy; g__belongs_to_no_taxonomy; s__belongs_to_no_taxonomy"
Usually, downstream = TRUE
will provide a more useful
output, however if the species is often known for your data,
but other ranks are unknown, downstream = FALSE
will
provide a more descriptive taxonomy.
Returns an OTU table as a data frame with the exact same
numerical counts as data
, but an updated taxonomy
column.
Wen Chen and Joshua Simpson.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.