Calculates CV for the specified sample replicates on a given plate.

intraCV(
  data_matrix,
  samples,
  aboveLOD = NULL,
  exclude_targets = NULL,
  method = "count"
)

Arguments

data_matrix

The Data matrix output from readNULISAseq.R or normalized data from normalization functions.

samples

A vector of length equal to ncol(data_matrix) which encodes the sets of sample replicates that will be used to calculate intra-plate CVs. Can be either a numeric or a character vector, where matching entries represent replicates for a given sample. Any NAs will be excluded (it may be desirable to exclude negative controls or inter-plate controls, for example). Entries of this vector will be used to identify unique sample replicate sets in the results output.

aboveLOD

Logical TRUE/FALSE matrix output by the NULISAseqR::lod() function. Indicates which values to include / exclude in the CV calculation. Default is NULL, which includes all values in CV calculation.

exclude_targets

A vector of row names or row indices representing the targets that should be excluded from intra-plate CV calculation. For example, one might want to exclude internal controls. Default is NULL, which includes all targets in the data_matrix.

method

Use "count" (default) for unnormalized or normalized count data. Calculates CV using the formula cv = sd / mean. Use "log2" for log2 transformed data. Calculates CV using the formula sigma = sd(x) log(2) and cv = 100 sqrt(exp(sigma^2)-1).

cv_matrix

matrix with multiple-replicate sample.

Value

A list.