Learn R Programming

profileScoreDist (version 1.0.2)

computeScoreDist: Compute exact position weight/count matrix score distribution.

Description

Computes the discretisized score distribution of a position count matrix (PCM) or a position weight matrix (PWM), using the method described by Rahmann et al.

Usage

computeScoreDist(motif, gc, granularity = 0.01, unit = "nat")

Arguments

motif
A matrix representing a PCM or PWM; each column a position and each row a base corresponding to A, C, G, T. This order is assumed, unless the rows are correspondingly named in a different order.
gc
A scalar giving the GC fraction to assume.
granularity
The granularity of the discretization, defaults to 0.01.
unit
The logarithm unit of the score computed from the PCM or PWM, can be "nat" (default, natural logarithm), "bit" (base 2), or "dit" (base 10).

Value

  • a ProfileDist object

References

Rahmann, S., Mueller, T., and Vingron, M. (2003). On the power of profiles for transcription factor binding site detection. Stat Appl Genet Mol Biol 2, Article7.

Examples

Run this code
data(INR)
thedist <- computeScoreDist(regularizeMatrix(INR), 0.5)
plotDist(thedist)

Run the code above in your browser using DataLab