cn2lr: Take vector or matrix of copynumber values, convert to log2ratios
Description
Utility function for converting copynumber units (2 is normal) to log2ratio units (two is normal). If ploidy
is provided lr is log2(cn/ploidy), otherwise log2(cn/2).
Usage
cn2lr(x, ploidy)
## S3 method for class 'numeric':
cn2lr(x, ploidy)
## S3 method for class 'matrix':
cn2lr(x, ploidy)
## S3 method for class 'DataFrame':
cn2lr(x, ploidy)
Arguments
x
numeric vector or matrix, or DataFrame with numeric-like columns (Rle typicaly). Assumed to be in copynumber units.
ploidy
numeric, of length ncol(x). Ploidy of each sample.
Value
data of same type as "x" transformed into log2ratio units