get_logo_heights {Logolas} | R Documentation

## Get heights of logos in nlogomaker() under different scoring schemes

### Description

Generates total heights of the stack of logos in the positive and negative scales of the nlogomaker() logo plot along with the proportion of the height distributed between the logos to be plotted in the positive and the negative scales respectively under different scoring schemes.

### Usage

    get_logo_heights(table, ic = FALSE, score = c("diff", "log", "log-odds",
      "probKL", "ratio", "unscaled_log", "wKL"), bg = NULL, epsilon = 0.01,
      opt = 1, symm = TRUE, alpha = 1, hist = FALSE, quant = 0.5)

### Arguments

`table` | The input table (data frame or matrix) of compositional counts or relative frequencies across different logos or symbols (specified along the rows) for different sites or positions or groups (specified along the columns).
`ic` | Boolean, denoting whether information content based scaling is used on top of the scoring scheme used or not. Default is FALSE
`score` | Can take either of the options - `diff`, `log`, `log-odds`, `probKL`, `ratio`, `unscaled_log`, `wKL`. Each option corresponds to a different scoring scheme. The most
`bg` | The background probability, which defaults to NULL, in which case equal probability is assigned to each symbol. The user can however specify a vector (equal to in length to the number of symbols) which specifies the background probability for each symbol and assumes this background probability to be the same across the columns (sites), or a matrix, whose each cell specifies the background probability of the symbols for each position.
`epsilon` | An additive constant added to the PWM before scaling to eliminate log (0) type errors.
`opt` | Option parameter - taking values 1 and 2 - depending on whether median adjustment is done based on background corrected proportions or without background correction.
`symm` | A bool input, which if TRUE, the function uses symmetric KL divergence whereas if FALSE, the function uses non-symmetric KL divergence.
`alpha` | The Renyi entropy tuning parameter which is used in case of scaling of the bar heights by information criterion. The default tuning parameter value is 1, which corresponds to Shannon entropy.
`hist` | Whether to use the hist method or the information criterion method to determine the heights of the logos.
`quant` | The quantile to be adjusted for in computing enrichment and depletion scores. Defaults to 0.5, which corresponds to the median.

### Value

Returns the heights of enrichment and depletion for diff approach to EDLogo.

### Examples

    m = matrix(rep(0,48),4,12)
    m[1,] = c(0,0,2.5,7,0,0,0,0,0,0,1,0)
    m[2,] = c(4,6,3,1,0,0,0,0,0,5,0,5)
    m[3,] = c(0,0,0,0,0,1,8,0,0,1,1,2)
    m[4,] = c(4,2,2.5,0,8,7,0,8,8,2,6,1)
    rownames(m) = c("A", "C", "G", "T")
    colnames(m) = 1:12
    m=m/8
    get_logo_heights(m, score = "log")
    get_logo_heights(m, score = "log", ic = TRUE)
    get_logo_heights(m, score = "wKL")
    get_logo_heights(m, score = "probKL", ic = TRUE)

[Package Logolas version 1.10.0 Index]