View source: R/supercell_plot.R
supercell_plot | R Documentation |
Plot metacell NW
supercell_plot(
SC.nw,
group = NULL,
color.use = NULL,
lay.method = c("nicely", "fr", "components", "drl", "graphopt"),
lay = NULL,
alpha = 0,
seed = 12345,
main = NA,
do.frames = TRUE,
do.extra.log.rescale = FALSE,
do.directed = FALSE,
log.base = 2,
do.extra.sqtr.rescale = FALSE,
frame.color = "black",
weights = NULL,
min.cell.size = 0,
return.meta = FALSE
)
SC.nw |
a super-cell (metacell) network (a field |
group |
an assigment of metacells to any group (for ploting in different colors) |
color.use |
colros to use for groups, if |
lay.method |
method to compute layout of the network (for the moment there several available: "nicely" for layout_nicely and "fr" for layout_with_fr, "components" for layout_components, "drl" for layout_with_drl, "graphopt" for layout_with_graphopt). If your dataset has clear clusters, use "components" |
lay |
a particular layout of a graph to plot (in is not |
alpha |
a rotation of the layout (either provided or computed) |
seed |
a random seed used to compute graph layout |
main |
a title of a plot |
do.frames |
whether to keep vertex.frames in the plot |
do.extra.log.rescale |
whether to log-scale node size (to balance plot if some metacells are large and covers smaller metacells) |
do.directed |
whether to plot edge direction |
log.base |
base with thich to log-scale node size |
do.extra.sqtr.rescale |
whether to sqrt-scale node size (to balance plot if some metacells are large and covers smaller metacells) |
frame.color |
color of node frames, black by default |
weights |
edge weights used for some layout algorithms |
min.cell.size |
do not plot cells with smaller size |
return.meta |
whether to return all the meta data |
plot of a super-cell network
data(cell_lines) # list with GE - gene expression matrix (logcounts), meta - cell meta data
GE <- cell_lines$GE
cell.meta <- cell_lines$meta
SC <- SCimplify(GE, # gene expression matrix
gamma = 20) # graining level
# Assign metacell to a cell line
SC2cellline <- supercell_assign(
clusters = cell.meta, # single-cell assignment to cell lines
supercell_membership = SC$membership) # single-cell assignment to metacells
# Plot metacell network colored by cell line
supercell_plot(SC$graph.supercells, # network
group = SC2cellline, # group assignment
main = "Metacell colored by cell line assignment",
lay.method = 'nicely')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.