View source: R/Plotting_Statistics.R
Plot_Median_Other | R Documentation |
Plot of median other variable per cell per sample grouped by desired meta data variable.
Plot_Median_Other(
seurat_object,
median_var,
sample_col = "orig.ident",
group_by = NULL,
colors_use = NULL,
dot_size = 1,
plot_title = NULL,
y_axis_label = NULL,
x_axis_label = NULL,
legend_title = NULL,
x_lab_rotate = TRUE,
color_seed = 123
)
seurat_object |
Seurat object name. |
median_var |
Variable in meta.data slot to calculate and plot median values for. |
sample_col |
Specify which column in meta.data specifies sample ID (i.e. orig.ident). |
group_by |
Column in meta.data slot to group results by (i.e. "Treatment"). |
colors_use |
List of colors or color palette to use. Only applicable if |
dot_size |
size of the dots plotted if |
plot_title |
Plot title. |
y_axis_label |
Label for y axis. |
x_axis_label |
Label for x axis. |
legend_title |
Label for plot legend. |
x_lab_rotate |
logical. Whether to rotate the axes labels on the x-axis. Default is FALSE. |
color_seed |
random seed for the "varibow" palette shuffle if |
A ggplot object
## Not run:
library(Seurat)
cd_features <- list(c('CD79B', 'CD79A', 'CD19', 'CD180', 'CD200', 'CD3D', 'CD2','CD3E',
'CD7','CD8A', 'CD14', 'CD1C', 'CD68', 'CD9', 'CD247'))
pbmc_small <- AddModuleScore(object = pbmc_small, features = cd_features, ctrl = 5,
name = 'CD_Features')
Plot_Median_Other(seurat_object = pbmc_small, median_var = "CD_Features1",
sample_col = "orig.ident", group_by = "Treatment")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.