QC_barplot: Plot features as barplot

View source: R/seurat_plot.R

QC_barplotR Documentation

Plot features as barplot

Description

Does the same as Violin or Box plots, but as an histogram.

Usage

QC_barplot(
  seur,
  features,
  group.by = "orig.ident",
  cols = NULL,
  wrap = FALSE,
  assay = "RNA",
  slot = "data",
  bins = 100,
  ncol = 2
)

Arguments

seur

Seurat object to fetch data from.

features

Features to use. Use nFeature_RNA, nCount_RNA, percent.mt or percent.ribo for QCs.

group.by

Which variable to group by. Default to "orig.ident"

cols

Which colors to use. NULL will use hue_pal. Default to NULL

wrap

Whether or not to use the facet_wrap from ggplot on the group.by groups. Default to FALSE

assay

Which assay to get data from, if features are genes. Default to "RNA"

slot

Which slot in the assay to get data from, if features are genes. Default to "data"

bins

Number of bins to use. A high number will have better precision. Default to 100

ncol

Number of column if several features. Default to 2

Value

A gridExtra object if several features, or a ggplot object if only one feature.


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