computeProportion: Stacked bar plot showing the proportion of cells across...

Description Usage Arguments Value

View source: R/analysis.R

Description

Stacked bar plot showing the proportion of cells across certrain cell groups

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
computeProportion(
  object,
  x = "cellType",
  fill = "condition",
  facet = NULL,
  colors.use = NULL,
  n.colors = 8,
  n.row = 1,
  title.name = NULL,
  legend.title = NULL,
  xlabel = NULL,
  ylabel = "Cellular composition (%)",
  width = 0.8,
  show.legend = TRUE,
  x.lab.rot = TRUE,
  text.size = 10,
  flip = FALSE
)

Arguments

object

Seurat object

x

Name of one metadata column to show on the x-axis

fill

Name of one metadata column to compare the proportion of cells

facet

Name of one metadata column defining faceting groups

colors.use

defining the color of stacked bar plot; either a char vector defining a color for each cell group or a palette name from brewer.pal

n.colors

Number of colors when setting colors.use to be a palette name from brewer.pal

n.row

Number of rows in facet_grid()

title.name

Name of the main title

legend.title

Name of legend

xlabel

Name of x label

ylabel

Name of y label

width

bar width

show.legend

Whether show the legend

x.lab.rot

Whether rorate the xtick labels

text.size

font size

flip

Whether flip the cartesian coordinates so that horizontal becomes vertical

Value

ggplot2 object


amsszlh/scMC documentation built on Jan. 2, 2021, 1:51 p.m.