embedCells {phemd} | R Documentation

## Generate cell-state embedding

### Description

Takes as input a Phemd object with aggregated data and returns updated object containing cell-state embedding

### Usage

    embedCells(
      obj,
      cell_model = c("monocle2", "seurat", "phate"),
      data_model = "negbinomial_sz",
      phate_ncluster = 8,
      phate_cluster_seed = NULL,
      ...
    )

### Arguments

`obj` | 'Phemd' object containing aggregated data
`cell_model` | Method to use to generate cell-state embedding. Currently supports "phate" and "monocle2". If using the Seurat to model the cell-state space, please identify cell subtypes as outlined in the Seurat software package and then use the `bindSeuratObj` function.
`data_model` | Only relevant if cell_model = "monocle2". One of the following: 'negbinomial_sz', 'negbinomial', 'tobit', 'uninormal', 'gaussianff'. See "Family Function" table at the following link for more details on selecting the proper one. http://cole-trapnell-lab.github.io/monocle-release/docs/#getting-started-with-monocle
`phate_ncluster` | Only relevant if cell_model = "phate". Number of cell state clusters to return when using PHATE
`phate_cluster_seed` | Only relevant if cell_model = "phate". Seed to use when performing cell state clustering (optional)
`...` | Additional parameters to be passed to `reduceDimension` function for Monocle or `phate` function for PHATE

### Details

`aggregateSamples` needs to be called before running this function.

### Value

Same as input 'Phemd' object containing additional cell-state embedding object

### Examples

    my_phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    my_phemdObj_lg <- removeTinySamples(my_phemdObj, 10)
    my_phemdObj_lg <- aggregateSamples(my_phemdObj_lg, max_cells=1000)
    my_phemdObj_lg <- embedCells(my_phemdObj_lg, cell_model='monocle2', data_model = 'gaussianff', sigma=0.02, maxIter=2)

[Package phemd version 1.8.0 Index]