Use option dataScale = log when data is already on a log scale.

Output is a list.

interPlateNorm(
  data_list,
  IPC = TRUE,
  IN = FALSE,
  IPC_wells = NULL,
  NC_wells = NULL,
  IPC_method = "median",
  IN_samples = NULL,
  dataScale = "count",
  scaleFactor = 10^4,
  transformReverse = NULL,
  transformReverse_scaleFactor = 10^4
)

Arguments

data_list

A list of data matrices, one for each plate, to be normalized together.

IPC

Logical TRUE/FALSE indicating whether a IPC normalization should be done. Default is TRUE.

IN

Logical TRUE/FALSE indicating whether intensity normalization should be done. Recommended only when samples are randomized across the plates. If targets do not match across all plates, only the matching targets will be returned in the output. Default is FALSE.

IPC_wells

List of vectors of either the column indices (numeric) or the column names (character string) of the inter-plate control wells for each plate. IPC wells are omitted from the intensity normalization median calculation. Required for IPC normalization and recommended for IN.

NC_wells

Recommended for intensity normalization. List of vectors of either the row indices (numeric) or the row names (character string) of the negative control wells for each plate. NC wells are omitted from intensity normalization.

IPC_method

'median' is the default. Other options include 'mean' (arithmetic mean) and 'geom_mean' (geometric mean). Determines how the counts are summarized across the IPC wells on a given plate.

IN_samples

Optional argument. A list of column names or indices specifying which subset of samples to use for intensity normalization step for each plate in data_list. Will over-ride the IPC_wells and NC_wells arguments for IN.

dataScale

'count' is the default and interplate normalization is multiplicative. Use option 'log' for log-transformed data; normalization is additive on the log scale.

scaleFactor

Optional numeric value used to rescale all data after IPC normalization. Default is 10^4. This shifts the data distribution to larger positive values, and helps prevent negative values after adding 1 and log-transforming. Only useful for count scale data.

transformReverse

A vector of target names that use reverse curve quantification. The reverse curve transformation will be applied to these targets.

transformReverse_scaleFactor

The scaling factor used in the reverse curve transformation. Default is 1e4. Reverse curve transformation is transformReverse_scaleFactor / (IPC normalized count + 1). Then the log2 tranformation is applied to this value, after adding 1, to obtain NPQ.

Value

A list.

interNormData

A list of matrices of normalized count data (not log-transformed, unless input data was log-transformed, which should use `dataScale='log'`).

plate

A vector of integers 1-(number of plates) corresponding to the interNormData matrix columns that indicates which plate samples are from.

normFactors

A list of vectors with the normalization factor for each target in the corresponding plate

scaleFactor

The scale factor that was used in the final scaling step.

Details

Does inter-plate normalization using one of the following methods: inter-plate control (IPC; divides each target by the median IPC count for that target), intensity normalization (IN; sets median of each target on each plate to equal the global median). Default is to do IPC only. Any intensity normalization or bridge normalization steps should typically be done after IPC normalization.

If the IPC median for a target is zero, it is replaced with 1. Similarly, if intensity normalization plate or global target median is zero, it is replaced with 1.

The intensity normalization option can also be used to do bridge sample-based normalization by specifying IN_samples.

Input is a list of data matrices, one for each plate. These would typically be normData matrix from the intraPlateNorm function. Other required input depends on methods used.