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_l…¹ label…² kingdom phylum class order family genus
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 Otu0001 OTU 1 Bacteroide… <i>Bac… Bacter… Bacte… Bact… Bact… Bacte… Bact…
#> 2 Otu0003 OTU 3 Porphyromo… <i>Por… Bacter… Bacte… Bact… Bact… Porph… Porp…
#> 3 Otu0004 OTU 4 Porphyromo… <i>Por… Bacter… Bacte… Bact… Bact… Porph… Porp…
#> 4 Otu00008 OTU 8 Enterobact… <i>Ent… Bacter… Prote… Gamm… Ente… Enter… Ente…
#> 5 Otu0044 OTU 44 Bacteria (… <i>Bac… Bacter… Bacte… Bact… Bact… Bacte… Bact…
#> 6 Otu0056 OTU 56 Bacteria (… <i>Bac… Bacter… Bacte… Bact… Bact… Bacte… Bact…
#> # … with abbreviated variable names ¹tax_otu_label, ²label_html