plot_gene_set_haystack_raw: Visualizing the detection/expression of a set of genes in a...

Description Usage Arguments Value Examples

View source: R/haystack_visualization.R

Description

Visualizing the detection/expression of a set of genes in a 2D plot

Usage

1
2
3
4
5
6
7
8
9
plot_gene_set_haystack_raw(
  x,
  y,
  genes = NA,
  detection,
  high.resolution = TRUE,
  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

genes

Gene names that are present in the input expression data, or a numerical indeces. If NA, all genes will be used.

detection

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

high.resolution

logical (default: TRUE). If set to FALSE, the density plot will be of a lower 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
 9
10
11
12
13
# 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

# define a set of genes that we want to visualize
# this might be a set of differnentially expressed genes
# predicted by haystack and clustered together by hclust_haystack
gene_set <- c("gene_9", "gene_59", "gene_112", "gene_137", "gene_155",
  "gene_216", "gene_234", "gene_275", "gene_291", "gene_317",
  "gene_339", "gene_340", "gene_351", "gene_400", "gene_424", "gene_479")

# visualize the expression pattern of the set of genes
plot_gene_set_haystack(dat.tsne, detection=dat.detection, genes=gene_set)

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