Calculate the principal coordinates of the samples in an ftmsData object. Uses vegdist to calculate pairwise distances between samples, and pcoa to calculate the principal coordinates.

getPrincipalCoordinates(ftmsObj, dist_metric = "bray", n_dims = 5)

Arguments

ftmsObj

object of type ftmsData

dist_metric

distance metric for computing pairwise distances between all samples. See vegdist for options. Default is "bray".

n_dims

number of dimensions to return, default is 5. Must be less than the number of samples in ftmsObj

Value

data.frame of coordinates where each sample is a row

See also

vegdist, pcoa

Examples

coords <- getPrincipalCoordinates(exampleProcessedPeakData, dist_metric="jaccard", n_dims=7)