get_logo_heights: Get heights of logos in nlogomaker() under different scoring...

Description Usage Arguments Value Examples

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

1
2
3
4
get_logo_heights(table, ic = FALSE, score = c("diff", "log",
  "log-odds", "probKL", "ratio", "unscaled_log", "wKL", "preclog"),
  llambda = NULL, bg = NULL, tol = 0, opt = 1, symm = TRUE,
  alpha = 1, hist = FALSE, quant = 0.5, quant_strategy = "lower")

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

llambda

The log lambda matrix computed after stabilization step (if used in logomaker function). Used for computing the heights when not NULL.

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.

tol

The tolerance for the KL-divergence of the positional weight data and background probabilities.

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.

quant_strategy

Strategy used for quantile computation. For the default, quant_strategy = "center", the normal quantile is taken, which would correspond to the middle point of the quantile interval. If quant_strategy = "lower", the lower limit of the quantile interval is taken and if quant_strategy = "upper", the upper limit of the quantile interval is considered.

Value

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

Examples

1
2
3
4
5
6
7
8
9
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")

kkdey/Logolas documentation built on May 20, 2019, 10:30 a.m.