plot_gene_haystack_raw: Visualizing the detection/expression of a gene in a 2D plot

Description Usage Arguments Value Examples

View source: R/haystack_visualization.R

Description

Visualizing the detection/expression of a gene in a 2D plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_gene_haystack_raw(
  x,
  y,
  gene,
  expression,
  detection = NULL,
  high.resolution = FALSE,
  point.size = 1,
  order.by.signal = FALSE
)

Arguments

x

x-axis coordinates of cells in a 2D representation (e.g. resulting from PCA or t-SNE)

y

y-axis coordinates of cells in a 2D representation

gene

name of a gene that is present in the input expression data, or a numerical index

expression

a logical/numerical matrix showing detection/expression of genes (rows) in cells (columns)

detection

an optional logical matrix showing detection of genes (rows) in cells (columns). If left as NULL, the density distribution of the gene is not plotted.

high.resolution

logical (default: FALSE). If set to TRUE, the density plot will be of a higher resolution

point.size

numerical value to set size of points in plot. Default is 1.

order.by.signal

If TRUE, cells with higher signal will be put on the foreground in the plot. Default is FALSE.

Value

A plot

Examples

1
2
3
4
5
6
7
8
# using the toy example of the singleCellHaystack package
# define a logical matrix with detection of each gene (rows) in each cell (columns)
dat.detection <- dat.expression > 1
# various was of plotting gene expression patterns
plot_gene_haystack(dat.tsne, expression=dat.expression, gene="gene_242",
 detection = dat.detection, high.resolution = TRUE)
plot_gene_haystack(dat.tsne, expression=dat.expression, gene="gene_242",
 detection = dat.detection, high.resolution = TRUE, point.size = .1)

singleCellHaystack documentation built on March 28, 2021, 9:12 a.m.