plot_marker_express_List: Plot a nested list of genes as a multi-page pdf

View source: R/plot_marker_express_List.R

plot_marker_express_ListR Documentation

Plot a nested list of genes as a multi-page pdf

Description

This function plots a nested list of genes as a multi-page PDF, one for each sub list. A use case is plotting known marker genes for multiple cell types over cell type clusters with unknown identities.

Usage

plot_marker_express_List(
  sce,
  gene_list,
  pdf_fn = "marker_expression.pdf",
  cellType_col = "cellType",
  gene_name_col = "Symbol",
  color_pal = NULL,
  plot_points = FALSE
)

Arguments

sce

SummarizedExperiment-class object

gene_list

A named list containing the names of genes to plot

pdf_fn

A character() of the pdf file name to plot to

cellType_col

The character() name of colData column containing cell type for sce data

gene_name_col

The character() name of rowData matching the gene name from gene_list

color_pal

A named character(1) vector that contains a color pallet matching the values in cellType_col.

plot_points

A logical indicating whether to plot points over the violin, defaults to FALSE as these often become over plotted and quite large (especially when saved as PDF)

Value

A pdf with violin plots for the expression of top marker genes for all cell types

See Also

Other expression plotting functions: plot_gene_express(), plot_marker_express(), plot_marker_express_ALL()

Examples

marker_list <- list(Oligo = c("RNF220", "CLIC4"), Astro = c("PRDM16", "F3"))
# plot_marker_express_List(sce.test, gene_list = marker_list, pdf_fn = "./plots/test_marker_expression_List.pdf")
# plot_marker_express_List(sce.test, gene_list = marker_list, cellType_col = "cellType.Broad", pdf_fn = "./plots/test_marker_expression_List.pdf")
# plot_marker_express_List(sce.test, gene_list = marker_list, pdf_fn = "./plots/test_marker_expression_List.pdf", plot_points = TRUE)


lahuuki/DeconvoBuddies documentation built on May 5, 2024, 9:35 a.m.