construct_violin_plot: Generate violin plots of prepared data

View source: R/violin_plot_functions.R

construct_violin_plotR Documentation

Generate violin plots of prepared data

Description

construct_violin_plot Returns a ggplot object of expression profiles for all clusters according to the input genes of interest. Colors and expression profiles of data used for this visualization are prepared in prepare_violin_data_colors.

Usage

construct_violin_plot(my_object, genes_to_investigate, dendrogram_input,
  colors, use_noise = TRUE, scale = "free_x")

Arguments

my_object

S4 object from which expression data should be extracted. Used in generating data in prepare_violin_data_colors.

genes_to_investigate

a vector containing character strings of the genes that the user would like to visualize with violin plots. Used in generating data in prepare_violin_data_colors.

dendrogram_input

an input dendrogram that relates the expression profiles in each cluster. See export_shiny_object for example of generating such a dendrogram. Used in generating data in prepare_violin_data_colors.

colors

an vector of length n_clusters to color the violin plot. The order of colors corresponds to the order of final_cluster_labels. Used in generating data in prepare_violin_data_colors.

use_noise

adds random noise to expression values if TRUE (default). This results in violins being drawn for only clusters that contain at least 25 uses unmodified expression profiles. This results in violins being drawn for all clusters, regardless of the proportion of cells that express the gene

scale

the scale for facet_grid

Examples

## Not run: 
construct_violin_plot(my_object = seurat_obj, genes_to_investigate = c("RHO", "PDE6A"),
dendrogram_input = my_dendrogram, colors = c("red", "green", "orange"))

## End(Not run)


drewvoigt10/cellcuratoR documentation built on May 22, 2023, 4:38 p.m.