vmikk / metagMisc

Miscellaneous functions for metagenomic analysis.
MIT License
44 stars 11 forks source link

`dissimilarity_to_distance` - error if number of OTUs > number of samples #15

Open vmikk opened 3 years ago

vmikk commented 3 years ago

It seems that dissimilarity_to_distance function (which transforms non-metric dissimilarity matrix to a weighted Euclidean distance) works only with data where number of samples > number of species. Otherwise, smacof::smacofConstraint returns error "For C diagonal the number of dimensions needs to match the number of covariates!".

This function is based on code from Greenacre 2017 (DOI:10.1002/ecy.1937)