Utility to join otu_table and tax_table to tibble.

join_otu_tax(x, column_id = "OTUID")

Arguments

x

phyloseq-class object

column_id

Provide name for the column which will hold the rownames of slot.

Value

A tibble

Examples

library(microbiomeutilities)
data("zackular2014")
p0 <- zackular2014
otu_tax <- join_otu_tax(p0,column_id = "OTUID")
head(otu_tax)
#> # A tibble: 6 × 96
#>   OTUID   Domain Phylum Class Order Family Genus Species Adeno…¹ Adeno…² Adeno…³
#>   <chr>   <chr>  <chr>  <chr> <chr> <chr>  <chr> <chr>     <int>   <int>   <int>
#> 1 d__den… k__Ba… p__Ba… c__B… o__B… f__Ba… g__B… s__           0       0       0
#> 2 d__den… k__Ba… p__Ba… c__B… o__B… f__Ba… g__B… s__           0       0       0
#> 3 d__den… k__Ba… p__Fi… c__C… o__C… f__Ru… g__   s__           0       0       3
#> 4 d__den… k__Ba… p__Ba… c__B… o__B… f__Ba… g__B… s__           0       0       0
#> 5 d__den… k__Ba… p__Fi… c__C… o__C… f__La… g__B… s__           1       0       1
#> 6 d__den… k__Ba… p__Ba… c__B… o__B… f__Ba… g__B… s__           0       1       0
#> # … with 85 more variables: `Adenoma14-2817` <int>, `Adenoma15-2847` <int>,
#> #   `Adenoma16-2873` <int>, `Adenoma17-2937` <int>, `Adenoma18-2967` <int>,
#> #   `Adenoma19-2971` <int>, `Adenoma20-2995` <int>, `Adenoma21-3129` <int>,
#> #   `Adenoma2-2113` <int>, `Adenoma22-3133` <int>, `Adenoma23-3141` <int>,
#> #   `Adenoma24-3217` <int>, `Adenoma25-3273` <int>, `Adenoma26-3373` <int>,
#> #   `Adenoma27-3379` <int>, `Adenoma28-3391` <int>, `Adenoma29-3399` <int>,
#> #   `Adenoma30-3509` <int>, `Adenoma3-2123` <int>, `Adenoma4-2143` <int>, …