Skip to contents

Read a mothur formatted cons_taxonomy file

Usage

read_mothur_cons_taxonomy(taxonomy)

Arguments

taxonomy

file name, a mothur consensus taxonomy file. The cons_taxonomy file is created by classify.otu.

Value

A data.frame containing the bin names, bin abundances and bin taxonomies.

Examples


# You can add the otu assignments and bin taxonomies to the your data set
# using the following:

# read mothur's consensus taxonomy file into a data.frame
otu_data <- read_mothur_cons_taxonomy(strollur_example(
  "final.cons.taxonomy"
))

data <- new_dataset()

# assign abundance only 'otu' bins
assign(data = data, table = otu_data, type = "bins", bin_type = "otu")
#> Assigned 531 otu bins.
#> [1] 531

# assign consensus taxonomies to 'otu' bins
assign(
  data = data, table = otu_data,
  type = "bin_taxonomy", bin_type = "otu"
)
#> Assigned 531 otu bin taxonomies.
#> [1] 531