plot_hexbin_fc: Plot of fold change of selected gene in single cell data...

Description Usage Arguments Details Value Examples

View source: R/plot_hexbin_fc.R

Description

Plot of fold change of selected gene in single cell data using bivariate hexagon cells.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plot_hexbin_fc(
  sce,
  col,
  mod = "RNA",
  type,
  feature,
  title = NULL,
  xlab = NULL,
  ylab = NULL,
  colors
)

Arguments

sce

A SingleCellExperiment or Seurat-class object.

col

A string referring to the name of one column in the meta data of sce by which to compare. Note this factor can only contain two levels.

mod

A string referring to the name of one column in the meta data of sce by which to compare. Note this factor can only contain two levels.

type

A string referring to the name of one column in the meta data of sce by which to compare. Note this factor can only contain two levels.

feature

A string referring to the name of one feature.

title

A string containing the title of the plot.

xlab

A string containing the title of the x axis.

ylab

A string containing the title of the y axis.

colors

A vector of strings specifying which colors to use for plotting the different levels in the selected column of the meta data.

Details

This function plots fold change within each hexagon, which are calculated with make_hexbin. Note that the fold change is only accurate if the condition investigated is within the same individual. For conditions across different individuals different methods that account for individual-specific effects are required.

Value

A ggplot2{ggplot} object.

Examples

1
2
3
4
5
6
7
#' # For Seurat object
library(Seurat)
data("pbmc_small")
pbmc_small <- make_hexbin(pbmc_small, 10, dimension_reduction = "PCA")
pbmc_small$test <- as.factor(sample(1:2, dim(pbmc_small)[2], replace=TRUE))
plot_hexbin_fc(pbmc_small, col="test", 
feature="CA2", type="scale.data")

schex documentation built on Nov. 8, 2020, 5:56 p.m.