Get Phyloseq slots from Tibbles
getOtuTableFromTibble(x, rownames = "FeatureID")
getTaxaTableFromTibble(x, rownames = "FeatureID")
getSampleTableFromTibble(x, rownames = NULL)
phyloseq
object
A column in tibble to use are rownames
Convert different tibbles into phyloseq
slots.
getOtuTableFromTibble
Converts OTU tibble obtained using
biomeUtils::getAbundanceTibble
to phyloseq::otu_table
.
getTaxaTableFromTibble
Converts the taxa tibble obtained using
biomeUtils::getTaxaTibble
to phyloseq::tax_table
.
getSampleTableFromTibble
Converts the sample data tibble obtained using
biomeUtils::getSampleTibble
to phyloseq::sample_data
.
Shetty SA (2020). Utilities for microbiome analytics. https://github.com/RIVM-IIV-Microbiome/biomeUtils
library(biomeUtils)
data("FuentesIliGutData")
otu_tib <- getAbundanceTibble(FuentesIliGutData)
otu_table <- getOtuTableFromTibble(otu_tib, rownames="FeatureID")
class(otu_table)
#> [1] "otu_table"
#> attr(,"package")
#> [1] "phyloseq"
tax_tib <- getTaxaTibble(FuentesIliGutData)
taxa_table <- getTaxaTableFromTibble(tax_tib, rownames="FeatureID")
class(tax_table)
#> [1] "standardGeneric"
#> attr(,"package")
#> [1] "methods"
meta_tib <- getSampleTibble(FuentesIliGutData)
sample_table <- getSampleTableFromTibble(meta_tib, rownames="SampleID")
class(sample_table)
#> [1] "sample_data"
#> attr(,"package")
#> [1] "phyloseq"