testNormalizationMethodByMarker: Test a range of normalization options on a marker in a...

View source: R/exportedUtils.R

testNormalizationMethodByMarkerR Documentation

Test a range of normalization options on a marker in a discovrExperiment

Description

This function tests different normalization methods on a marker in a discovrExperiment object. Its purpose is to facilitate selection of the appropriate normalization method for markers where this is not immediately apparent. It can be run on a set of markers and a set of different normalization methods to be tested on each marker. Alternatively, it can be run with a single warpSet normalization method and a set of different random number seeds, to evaluate the effect of the random number seed on the warpSet normalization results. The results can be examined for appropriate distributions across samples, or plotted sequentially using plotDensityNormalizedExprsDiscovrExperiment

Usage

testNormalizationMethodByMarker(
  experiment,
  markers,
  normalizationMethod = c("none", "zScore", "warpSet"),
  seed = 12345
)

Arguments

experiment

A discovrExperiment created using clusterDiscovrExperiment, normalizeDiscovrExperiment, or metaclusterDiscovrExperiment. In order to return metacluster numbers for each cell, its status must be "metaclustered".

markers

a character vector indicating the markers on which to test normalization

normalizationMethod

(default: c("none", "zScore", "warpSet")) a character vector with the normalization methods to be tested. All values should be acceptable inputs for the argument 'normalizationMethod' in normalizeDiscovrExperiment. If seed has length > 1, this must be a single character string, either "warpSet" or "warpSet[#]".

seed

(default: 12345) Numeric, the random number seed(s) for warpSet normalization, passed to normalizeWarpSetMergedExpr. If testing various random number seeds with warpSet normalization, this should be a numeric vector of length > 1, and normalizationMethod should be either "warpSet" or "warpSet[#]"

Value

A reduced discovrExperiment object (or named list of objects), each containing only the marker listed, with normalized values in experiment$mergedExprNormalizedScaled. If markers has length > 1, the function will return a named list, with each element containing a discovrExperiment object normalized using the given method.

Author(s)

Matthew J Dufort, mdufort@benaroyaresearch.org


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