Description Usage Arguments Details Value Examples
View source: R/functions-plotting.R
Takes as input a Phemd object containing either a Monocle2 object or Seurat object (already embedded and ordered) and plots cell embedding plots side by side. Optionally saves to specified folder.
1 2 3 4 5 6 7 8 9 | plotEmbeddings(
obj,
cell_model = c("monocle2", "seurat", "phate"),
cmap = NULL,
w = 4,
h = 5,
pt_sz = 1,
ndims = NULL
)
|
obj |
'Phemd' object containing Monocle 2 object |
cell_model |
Method by which cell state was modeled (either "monocle2", "seurat", or "phate) |
cmap |
User-specified colormap to use to color cell state embedding (optional) |
w |
Width of plot in inches |
h |
Height of plot in inches |
pt_sz |
Scalar factor for point size |
ndims |
Number of dimensions to use for dimensionality reduction in case it hasn't been performed yet (only relevant when using Seurat data as input) |
embedCells
and orderCellsMonocle
need to be called before calling this function. Required additional packages: 'RColorBrewer', 'cowplot'
Colormap (vector of colors) used to color Monocle2 cell state embedding
1 2 3 4 5 6 | 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_monocle <- embedCells(my_phemdObj_lg, data_model='gaussianff', sigma=0.02, maxIter=2)
my_phemdObj_monocle <- orderCellsMonocle(my_phemdObj_monocle)
cmap <- plotEmbeddings(my_phemdObj_monocle)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.