UmapState

UmapState

This creates a UMAP embedding based on the neighbor index constructed at NeighborIndexState. This wraps runUMAP and related functions from scran.js.

Methods not documented here are not part of the stable API and should not be used by applications.

Classes

UmapState

Methods

animate()

Description:
  • Repeat the animation iterations. It is assumed that setVisualizationAnimate has been set appropriately to process each iteration.

Source:
Returns:

A promise that resolves on successful completion of all iterations.

compute(parameters)

Description:
  • This method should not be called directly by users, but is instead invoked by runAnalysis.

Source:
Parameters:
Name Type Description
parameters object

Parameter object, equivalent to the umap property of the parameters of runAnalysis.

Properties
Name Type Description
num_neighbors number

Number of neighbors to use to construct the simplicial sets.

num_epochs number

Number of epochs to run the algorithm.

min_dist number

Number specifying the minimum distance between points.

animate boolean

Whether to process animation iterations, see setVisualizationAnimate for details.

Returns:

UMAP coordinates are computed in parallel on a separate worker thread. A promise that resolves when the calculations are complete.

fetchParameters() → {object}

Source:
Returns:

Object containing the parameters.

Type
object

(async) fetchResults(optionsopt) → {object}

Source:
Parameters:
Name Type Attributes Default Description
options object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
copy boolean <optional>
true

Whether to create a copy of the coordinates, if the caller might mutate them.

Returns:

Object containing:

  • x: a Float64Array containing the x-coordinate for each cell.
  • y: a Float64Array containing the y-coordinate for each cell.
  • iterations: the number of iterations processed.
Type
object