buildTree {flowSpy} | R Documentation

## buildTree

### Description

buildTree

### Usage

    buildTree(
      object,
      method = "euclidean",
      dim.type = c("raw", "pca", "tsne", "dc", "umap"),
      dim.use = 1:2,
      verbose = FALSE
    )

### Arguments

`object` | an FSPY object
`method` | character. Mehtod to build MST.
`dim.type` | character. Type of dimensions that will be used to build the tree. Five `dim.type` are provided, 'raw', 'pca', 'tsne', 'dc' and 'umap'. By default is 'raw'.
`dim.use` | numeric. Number of dimensions that will be used to build the tree. For example. If `dim.use` is 'raw', there is no limit for `dim.type`. And if the `dim.use` is 'tsne' or 'umap', the default `dim.use` is 1:2.
`verbose` | logical. Whether to print calculation progress.

### Value

An FSPY object with tree

### Examples

    if (FALSE) {
    # build minimum spanning tree (MST) based on raw expression matrix
    fspy <- buildTree(fspy, dim.type = "raw")

    # build minimum spanning tree (MST) based on tsne
    fspy <- buildTree(fspy, dim.type = "tsne", dim.use = 1:2)

    # Using PCA
    fspy <- buildTree(fspy, dim.type = "pca", dim.use = 1:4)

    # Using UMAP
    fspy <- buildTree(fspy, dim.type = "umap", dim.use = 1:2)

    # Using Diffusion Maps
    fspy <- buildTree(fspy, dim.type = "dc", dim.use = 1:3)
    }

[Package flowSpy version 1.4.0 Index]