cn2lr {genoset} | R Documentation

## 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)

    ## S4 method for signature 'numeric'
    cn2lr(x, ploidy)

    ## S4 method for signature 'matrix'
    cn2lr(x, ploidy)

    ## S4 method for signature '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

### See Also

lr2cn

[Package genoset version 1.42.0 Index]