plotTopHVG: Plot highly variable genes

View source: R/plotTopHVG.R

plotTopHVGR Documentation

Plot highly variable genes

Description

Plot highly variable genes

Usage

plotTopHVG(
  inSCE,
  method = "modelGeneVar",
  hvgNumber = 2000,
  useFeatureSubset = NULL,
  labelsCount = 10,
  featureDisplay = metadata(inSCE)$featureDisplay,
  labelSize = 2,
  dotSize = 2,
  textSize = 12
)

Arguments

inSCE

Input SingleCellExperiment object containing the computations.

method

Select either "vst", "mean.var.plot", "dispersion" or "modelGeneVar".

hvgNumber

Specify the number of top genes to highlight in red. Default 2000. See details.

useFeatureSubset

A character string for the rowData variable name to store a logical index of selected features. Default NULL. See details.

labelsCount

Specify the number of data points/genes to label. Should be less than hvgNumber. Default 10. See details.

featureDisplay

A character string for the rowData variable name to indicate what type of feature ID should be displayed. If set by setSCTKDisplayRow, will by default use it. If NULL, will use rownames(inSCE).

labelSize

Numeric, size of the text label on top HVGs. Default 2.

dotSize

Numeric, size of the dots of the features. Default 2.

textSize

Numeric, size of the text of axis title, axis label, etc. Default 12.

Details

When hvgNumber = NULL and useFeature = NULL, only plot the mean VS variance/dispersion scatter plot. When only hvgNumber set, label the top hvgNumber HVGs ranked by the metrics calculated by method. When useFeatureSubset set, label the features in the subset on the scatter plot created with method and ignore hvgNumber.

Value

ggplot of HVG metrics and top HVG labels

See Also

runFeatureSelection, runSeuratFindHVG, runModelGeneVar, getTopHVG

Examples

data("mouseBrainSubsetSCE", package = "singleCellTK")
mouseBrainSubsetSCE <- runModelGeneVar(mouseBrainSubsetSCE)
plotTopHVG(mouseBrainSubsetSCE, method = "modelGeneVar")

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.