Read in a taxonomy file and parse it to a wide dataframe
Arguments
- taxonomy_filename
filename of taxonomy file
- sep
Character that separates fields of the taxonomy file. (Default:
\t
).
Value
dataframe of taxonomic labels, formatted by parse_tax()
Examples
taxonomy_filepath <- system.file("extdata",
"test.taxonomy",
package = "schtools"
)
taxonomy_tbl <- read_tax(taxonomy_filepath)
head(taxonomy_tbl)
#> # A tibble: 6 × 10
#> otu otu_label tax_otu_label label_html kingdom phylum class order family
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Otu0001 OTU 1 Bacteroides (… <i>Bacter… Bacter… Bacte… Bact… Bact… Bacte…
#> 2 Otu0003 OTU 3 Porphyromonad… <i>Porphy… Bacter… Bacte… Bact… Bact… Porph…
#> 3 Otu0004 OTU 4 Porphyromonad… <i>Porphy… Bacter… Bacte… Bact… Bact… Porph…
#> 4 Otu00008 OTU 8 Enterobacteri… <i>Entero… Bacter… Prote… Gamm… Ente… Enter…
#> 5 Otu0044 OTU 44 Bacteria (OTU… <i>Bacter… Bacter… Bacte… Bact… Bact… Bacte…
#> 6 Otu0056 OTU 56 Bacteria (OTU… <i>Bacter… Bacter… Bacte… Bact… Bact… Bacte…
#> # ℹ 1 more variable: genus <chr>