celdaUmap,celda_G-method {celda} | R Documentation

## umap for celda_G

### Description

Embeds cells in two dimensions using umap based on a 'celda_G' model. umap is run on module probabilities to reduce the number of features instead of using PCA. Module probabilities square-root trasformed before applying tSNE.

### Usage

    ## S4 method for signature 'celda_G'
    celdaUmap(
      counts,
      celdaMod,
      maxCells = NULL,
      minClusterSize = 100,
      modules = NULL,
      seed = 12345,
      nNeighbors = 30,
      minDist = 0.2,
      spread = 1,
      cores = 1,
      ...
    )

### Arguments

`counts` | Integer matrix. Rows represent features and columns represent cells. This matrix should be the same as the one used to generate 'celdaMod'.
`celdaMod` | Celda object of class 'celda_CG'.
`maxCells` | Integer. Maximum number of cells to plot. Cells will be randomly subsampled if ncol(counts) > maxCells. Larger numbers of cells requires more memory. If NULL, no subsampling will be performed. Default NULL.
`minClusterSize` | Integer. Do not subsample cell clusters below this threshold. Default 100.
`modules` | Integer vector. Determines which features modules to use for UMAP. If NULL, all modules will be used. Default NULL.
`seed` | Integer. Passed to with_seed. For reproducibility, a default value of 12345 is used. If NULL, no calls to with_seed are made.
`nNeighbors` | The size of local neighborhood used for manifold approximation. Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. Default 30. See '?uwot::umap' for more information.
`minDist` | The effective minimum distance between embedded points. Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even dispersal of points. Default 0.2. See '?uwot::umap' for more information.
`spread` | The effective scale of embedded points. In combination with ‘min_dist’, this determines how clustered/clumped the embedded points are. Default 1. See '?uwot::umap' for more information.
`cores` | Number of threads to use. Default 1.
`...` | Other parameters to pass to 'uwot::umap'.

### Value

A two column matrix of umap coordinates

### See Also

'celda_G()' for clustering features and cells and 'celdaHeatmap()' for displaying expression

### Examples

    data(celdaGSim, celdaGMod)
    umapRes <- celdaUmap(celdaGSim$counts, celdaGMod)

[Package celda version 1.2.4 Index]