uniqueness | R Documentation |
Microbiota Uniqueness
uniqueness(x, dist_mat, reference_samples = NULL, ...)
x |
A phyloseq object |
dist_mat |
An object of class |
reference_samples |
Vector of samples to use as reference. |
... |
Option to pass biomeUtils::getSampleTibble like column name and columns to be included in the output. |
Extracts the minimum value from a dissimilarity
matrix for each
individual. This is the dissimilarity of an individual from their
nearest neighbor. Here, the option of using a one or more reference
samples is provided.
A data frame with uniqueness and sample information
Sudarshan A. Shetty
Wilmanski T et al. (2021). Gut microbiome pattern reflects healthy ageing and predicts survival in humans. Nature metabolism, 3(2), pp.274-286.
library(biomeUtils)
data("FuentesIliGutData")
# Keep only two groups. controls and L1.
ps <- filterSampleData(FuentesIliGutData, ILI != "L2")
ps <- getProportions(ps)
dist.mat <- phyloseq::distance(ps, "bray")
# Define controls as reference samples
ref_samples <- rownames(meta(subset_samples(ps, ILI == "C")))
muniq <- uniqueness(ps,
dist_mat=dist.mat,
reference_samples = ref_samples)
head(muniq)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.