uniqueness: Microbiota Uniqueness

View source: R/uniqueness.R

uniquenessR Documentation

Microbiota Uniqueness

Description

Microbiota Uniqueness

Usage

uniqueness(x, dist_mat, reference_samples = NULL, ...)

Arguments

x

A phyloseq object

dist_mat

An object of class dist

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.

Details

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.

Value

A data frame with uniqueness and sample information

Author(s)

Sudarshan A. Shetty

References

  • Wilmanski T et al. (2021). Gut microbiome pattern reflects healthy ageing and predicts survival in humans. Nature metabolism, 3(2), pp.274-286.

Examples

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)

RIVM-IIV-Microbiome/biomeUtils documentation built on July 20, 2023, 10:29 a.m.