View source: R/plot_profiles.R
plot_multi_profiles | R Documentation |
This function generates line plots displaying mean expression profiles accross cell types and modules.
plot_multi_profiles(
data = NULL,
ident = NULL,
color_cluster = NULL,
size_text_y = 5,
size_label = 2,
legend_name = "Cell\ntype",
nb_column = NULL,
center = FALSE
)
data |
A ClusterSet object. |
ident |
A named vector containing the cell type identities for each cell. Typically the result from the Idents() function on a Seurat object (see Seurat library). |
size_text_y |
The font size of the y-axis tick labels. |
size_label |
The font size of the cluster labels. |
legend_name |
A name for the legend. |
center |
Whether to center (substract mean) each row. |
color_cell_type |
A named vector of colors (with cell type as names) used to distinguish between different clusters. |
A ggplot object showing the expression profiles of cell type-specific genes.
# Load a Seurat object
load_example_dataset("7871581/files/pbmc3k_medium")
# Load a ClusterSet object
load_example_dataset("7871581/files/pbmc3k_medium_clusters")
plot_multi_profiles(pbmc3k_medium_clusters, ident=Seurat::Idents(pbmc3k_medium))
pal <- discrete_palette(nclust(pbmc3k_medium_clusters))
names(pal) <- names(pbmc3k_medium_clusters@gene_clusters)
plot_multi_profiles(pbmc3k_medium_clusters,
ident=Seurat::Idents(pbmc3k_medium), color_cluster = pal)
plot_multi_profiles(pbmc3k_medium_clusters[2:4,],
ident=Seurat::Idents(pbmc3k_medium),
color_cluster = pal[2:4],
center=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.