Subsample any objects in "distance space" to reduce the effect of sample-clustering. This function was originally designed to subsample genomes in "phylogenetic distance space", a clear case of strong clustering bias in sampling, by Luis M. Rodriguez-R and Michael R Weigand.
enve.tribs(
dist,
selection = labels(dist),
replicates = 1000,
summary.fx = median,
dist.method = "euclidean",
subsamples = seq(0, 1, by = 0.01),
dimensions = ceiling(length(selection) * 0.05),
metaMDS.opts = list(),
threads = 2,
verbosity = 1,
points,
pre.tribs
)Returns an enve.TRIBS object.
Distances as a dist object.
Objects to include in the subsample. By default, all objects are selected.
Number of replications per point.
Function to summarize the distance distributions in a given replicate. By default, the median distance is estimated.
Distance method between random points and samples in the transformed
space. See dist.
Subsampling fractions.
Dimensions to use in the NMDS. By default, 5% of the selection length.
Any additional options to pass to metaMDS, as list.
Number of threads to use.
Verbosity. Use 0 to run quietly, increase for additional information.
Optional. If passed, the MDS step is skipped and this object is used
instead. It can be the $points slot of class metaMDS
(from vegan).
It must be a matrix or matrix-coercible object, with samples as rows and
dimensions as columns.
Optional. If passed, the points are recovered from this object (except if
points is also passed. This should be an enve.TRIBS
object estimated on the same objects (the selection is unimportant).
Luis M. Rodriguez-R [aut, cre]