plot_multi_profiles: Plot a summarized view of expression profiles.

View source: R/plot_profiles.R

plot_multi_profilesR Documentation

Plot a summarized view of expression profiles.

Description

This function generates line plots displaying mean expression profiles accross cell types and modules.

Usage

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
)

Arguments

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.

Value

A ggplot object showing the expression profiles of cell type-specific genes.

Examples

# 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)


dputhier/dbfmcl documentation built on April 17, 2025, 4:41 a.m.