View source: R/meltDistanceToTable.R
meltDistanceToTable | R Documentation |
Convert Distance matrix to Data Frame
meltDistanceToTable(x, dist_mat = NULL, name_dist_column = "value", ...)
x |
A phyloseq object |
dist_mat |
An object of class |
name_dist_column |
A specific name for column where distance values are stored. Default="value" |
... |
Option to pass biomeUtils::getSampleTibble like column name and columns to be included in the output. |
Converts dist
object from phyloseq::distance()
to a data frame combined with sample data
A data frame with pairwise distance and sample information
Sudarshan A. Shetty
library(biomeUtils)
data("FuentesIliGutData")
ps <- filterSampleData(FuentesIliGutData, ILI != "L2")
ps <- phyloseq::rarefy_even_depth(ps)
dist.mat <- phyloseq::distance(ps, "bray")
dist.melt.sample <- meltDistanceToTable(ps,
dist_mat = dist.mat,
name_dist_column = "Bray-Curtis",
select_cols = c("participant_id", "ILI"))
head(dist.melt.sample)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.