Count2Distance: Calculating the dissimilarity matrix for metagenomic count...

Description Usage Arguments Value Author(s) See Also Examples

Description

This function quantifies the dissimilarity between samples or taxa. Given a N \times k matrix of metagenomic counts where N equals the number of samples and k is the number of taxa/OTUs, this function returns a N \times N matrix whose (i,j)^{th} element gives a measure of dissimilarity between the i^{th} and j^{th} samples. If Kendall's τ-distance is specified as the measure of dissimilarity, this function also has the capability to compute dissimilarity between taxa, resulting in a k \times k matrix.

Usage

1
2
Count2Distance(Data, Distance, Penalty = NULL, PhyTree = NULL,
 UnifOpts = NULL, Adjust = TRUE)

Arguments

Data

An N \times k matrix comprising the metagenomic counts, whose rows correspond to the distinct samples.

Distance

Measure of dissimilarity to be used for calculating distance matrix. Possible values are c(“Kendall's tau-distance”, “UniFrac”).

Penalty

Penalty to be used for ties when calculating the Kendall's tau-distance. It takes values between 0 and 1.

PhyTree

Rooted phylogenetic tree of R class “phylo”. To be provided only when the Distance == "UniFrac".

UnifOpts

Options to calculate the generalized UniFrac distance. This is a list containing two items c(Weight, Type), where Weight takes values between 0 and 1, and Type takes values in c(“Unweighted”, “Variance Adjusted”, “Generalized”).

Adjust

A logical variable. When TRUE, an infinitesimal constant (equal to .Machine$double.eps) to off-diagonal elements which are equal to zero. This is to facilitate construction of metric multidimensional models.

Value

A N \times N symmetric matrix with all zeroes along the diagonal, where N is the number of samples in the data. If the transpose of the counts is provided, the function returns a k \times k symmetric matrix.

Author(s)

Deepak Nag Ayyala <deepaknagayyala@gmail.com>

See Also

KenDist

Examples

1
2
3
data(metagencounts)
Distance <- Count2Distance(Data = metagencounts$Counts, Distance = "Kendall's tau-distance", 
 Penalty = 0.5);

GrammR documentation built on May 1, 2019, 8:46 p.m.