plot_markers: Plot marker genes

Description Usage Arguments Value Examples

View source: R/plot_markers.R

Description

This function is to plot a heatmap showing the cluster-specific marker genes. Only the top 10 marker genes for each cluster are shown.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
plot_markers(
  sginfo,
  label,
  N.marker,
  sN.cluster,
  filename,
  filetype,
  nratio,
  n.cores,
  width = 900,
  height = 900,
  ...
)

Arguments

sginfo

the info matrix of selected marker genes, including their correspnding cluster, p-value and AUROC (areas under the curve of the Receiver Operating Characteristic) value.

label

the clustering labels, either using ground-truth labels or predicted clustering results.

N.marker

the maximum number of marker genes selected for each cluster. The default value is 10.

filename

the output file name to save the heatmap figure. By default ,the filename is "markers_heatmap.pdf".

filetype

the type of the output file. Suggested file types are PDF or PNG, while other common types (e.g., JPEG or TIFF) are also acceptable. If not given, the type will be determined as follows: when the number of single cells is less than 5000, the type will be PDF; otherwise, it will be PNG.

scExp

the original expression matrix

Value

The heatmap of cell-type-specific marker gene expression will be saved into a file (by default the file will be named as "markers_heatmap.pdf" or "markers_heatmap.png", depending on the number of cells). Besides, all of the cluser-specific marker genes and their associated information will be returned.

Examples

1
2
3
y = SHARP(scExp)
sginfo = get_marker_genes(scExp, y)
sortmarker = plot_markers(sginfo)

shibiaowan/SHARP documentation built on April 28, 2021, 1:56 p.m.