pl_dotplot: Use dotplot/bubbleplot to visualize average/median and...

Description Usage Arguments Value

View source: R/pl.R

Description

Use dotplot/bubbleplot to visualize average/median and percentage expression of features (eg. genes) in groups

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
pl_dotplot(
  data,
  features,
  group_by,
  groups = NULL,
  method = base::mean,
  by_log = F,
  log_base = base::exp(1),
  exclude_zero = F,
  outlier_cutoff = 1,
  cap_value = NULL,
  swap_axes = F,
  do_scale = F,
  plot_gene_force = F,
  duplicate_features = T,
  gradientn_colors = c("grey90", "grey", "orange", "red", "brown"),
  title = NULL
)

Arguments

data

expression matrix of feature by cell, ususally normalized (in log scale) but not feature scaled.

features

features to be visualized

group_by

a vector including cell annotations

groups

only these selected groups to be visualized

method

using base::mean or stats::median or your custom function for each feature vector;

by_log

calculate by log scale ; If TRUE log_base will be ignored.

log_base

base::exp(1) or 2 or other else, depends on your normalization method.

exclude_zero

exclude zeros when calculate average/median feature value. Note exclude_zero first, outlier_cutoff second.

outlier_cutoff

sometimes outliers (several extremely high cells) should be excluded when do summarise. Set 0.99 to exclude top 1 percent cells. (default: 1)

cap_value

the max value to show in dotplot. Any value larger than it will be capped to this value. (default: NA)

swap_axes

swap x-axis and y-axis or not. (default: False)

do_scale

scale the mean value across groups. Useful to demonstrate the differences among groups.

plot_gene_force

Force plot gene, which is missing in data.

duplicate_features

whether display duplicate features or not.

gradientn_colors

the color vector for visualization.

title

title to display in the top.

Value

a ggplot object


zzwch/convgene documentation built on July 11, 2021, 9:41 a.m.