Last data update: 2014.03.03

R: Compute exact position weight/count matrix score...
computeScoreDistR Documentation

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(profileScoreDist)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/profileScoreDist/computeScoreDist.Rd_%03d_medium.png", width=480, height=480)
> ### Name: computeScoreDist
> ### Title: Compute exact position weight/count matrix score distribution.
> ### Aliases: computeScoreDist
> 
> ### ** Examples
> 
> data(INR)
> thedist <- computeScoreDist(regularizeMatrix(INR), 0.5)
> plotDist(thedist)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>