plotDensityNormalizedExprsDiscovrExperiment: Plot normalized vs. pre-normalization marker level...

View source: R/exportedUtils.R

plotDensityNormalizedExprsDiscovrExperimentR Documentation

Plot normalized vs. pre-normalization marker level distributions for a discovrExperiment object

Description

This function generates a set of density plots of the pre- and post-normalization expression values from a discovrExperiment object. If the object has status "normalized" or "metaclustered", the normalized values will be used. If the object has status "clustered", normalization will be attempted using information provided, passed to normalizeDiscovrExperiment. The function returns a list of plots as ggplot2 objects, and can optionally output plots to a single file containing a separate page for each marker. The purpose of this function is to evaluate potential normalization methods for each marker, based on distributions of the marker levels before and after normalization.

Usage

plotDensityNormalizedExprsDiscovrExperiment(
  experiment,
  clusteringMarkersOnly = TRUE,
  normalizationInfo = NULL,
  filenameOut = NULL,
  width = 12,
  height = 6,
  ...
)

Arguments

experiment

A discovrExperiment created using clusterDiscovrExperiment, normalizeDiscovrExperiment, metaclusterDiscovrExperiment. Must have status "clustered", "normalized", or "metaclustered".

clusteringMarkersOnly

(default: NULL)

normalizationInfo

(default: NULL) Optional object containing information on how to normalize, passed to normalizeDiscovrExperiment (see documentation of that function for usage details). If this argument is non-null, normalization will be performed prior to plotting, even if the 'experiment' object has already been normalized. This allows for testing a range of normalization approaches on a discovrExperiment object. A non-null value must be provided if experiment has status "clustered" or does not contain the element mergedExprNormalizedScaled which is generated by normalizeDiscovrExperiment.

filenameOut

(default: NULL) Path for outputing a file with plots. If null, no file is generated. The extension is used to determine plot type, which can be "pdf", "png", or "svg".

width

(default: 12) Numeric, width of output plot device in inches

height

(default: 6) Numeric, height of output plot device in inches

...

optional arguments passed to normalizeDiscovrExperiment

Value

A list of ggplot objects, one for each marker. Plots will be output to file if filenameOut is specified. To suppress output to the default plotting device, assign the result to an object, or run the function with invisible()

Author(s)

Matthew J Dufort, mdufort@benaroyaresearch.org


BenaroyaResearch/briDiscovr documentation built on July 16, 2025, 7:13 p.m.