motifIC: Information content for a PWM or PFM

Description Usage Arguments Value Examples

View source: R/pwm.R

Description

Information content for a PWM or PFM

Usage

1
2
3
  motifIC(motif,
    prior.params = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25),
    bycol = FALSE)

Arguments

motif

a matrix of frequencies, or a PWM object

prior.params

the prior parameters to use when a matrix is given (ignored if motif is already a PWM)

bycol

if to return values separately for each column

Value

information content in bits (i.e. log2)

Examples

1
2
3
4
5
6
7
8
9
if(require("PWMEnrich.Dmelanogaster.background")){
    data(MotifDb.Dmel)
    data(MotifDb.Dmel.PFM)

    # the nucleotide distribution is taken from the PWM (in this case genomic background)
    motifIC(MotifDb.Dmel[["ttk"]]) 
    # information content with default uniform background because the input is a matrix, not PWM object
    motifIC(MotifDb.Dmel.PFM[["ttk"]]) 
}

PWMEnrich documentation built on Nov. 1, 2018, 2:25 a.m.