seuratBoxPlot: Boxplot Function:

View source: R/seurat_plot.R

seuratBoxPlotR Documentation

Boxplot Function

Description

This function aims at replacing the VlnPlot function from Seurat with box plots.

Usage

seuratBoxPlot(
  seur,
  features,
  group.by = "ident",
  assay = "RNA",
  slot = "data",
  ncol = 2,
  cols = NULL,
  pt.size = 1,
  pt.alpha = 1,
  remove_legend = FALSE,
  remove_x_text = FALSE
)

Arguments

seur

The Seurat object within which the data will be fetched.

features

Vector of features to use. Can be genes, or any other continuous column accessible by Seurat's FetchData.

group.by

Metadata column used to make the groups in the boxplot. Default to "ident"

assay

Assay used to Fetch the data from. Will replace the Default Assay. Default to "RNA"

slot

Slot used within the assay the fetch data from. Default to "data"

ncol

Number of column in the gridExtra object. Default to 2

pt.size

Size of the points to plot. Either set this to 0 or pt.alpha to 0 to remove points. Default to 1

pt.alpha

Transparency of the points. Either set this to 0 or pt.size to 0 to remove points. Default to 1

remove_legend

Whether to remove the color legend. Default to FALSE

remove_x_text

Whether to remove x-axis legend. Default to FALSE

Value

A gridExtra object containing as much plots as there are elements in the features parameter. If there is only one feature, it will return the ggplot object.


LabexCortexBioinformatics/LxCxUtils documentation built on Aug. 2, 2022, 6:23 a.m.