pwm-class: An S4 class to represent a PWM matrix.

Description Usage Arguments Value Functions Slots Author(s) Examples

Description

An object of class 'pwm' represents the alphabet*width position weight matrix of a sequence motif. In case of DNA sequence motif, the entry in row i, column j gives the probability of observing nucleotide c('A','C','G','T')[i] in position j of the motif.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S4 method for signature 'pwm'
show(object)

## S4 method for signature 'pwm'
summary(object, ...)

## S4 method for signature 'pwm,ANY'
plot(x, y = "missing", ...)

## S4 method for signature 'pwm'
pwm(pwm)

## S4 method for signature 'pwm'
ic(pwm)

## S4 method for signature 'pwm'
consensus(pwm)

Arguments

object

object of pwm-class

...

additional parameters for plot function

x

object of pwm-class

y

default (missing) for plot function

pwm

object of pwm-class

Value

pwm-class object with slots: pwm, width, ic and alphabet.

Functions

Slots

pwm

matrix. The position weight matrix.

width

numeric. The width of the motif.

ic

numeric. The information content (IC).

alphabet

character. The sequence alphabet. Currently, only 'DNA' and 'RNA' is supported.

consensus

character. The consensus sequence.

Author(s)

Oliver Bembom

Examples

1
2
3
4
5
6
7
8
mFile <- system.file("extdata/pwm1", package = "seqLogo")
m <- read.table(mFile)
p <- makePWM(m)
#
# slot access
pwm(p)
ic(p)
consensus(p)

Example output

Loading required package: grid
    1   2   3   4   5   6   7   8
A 0.0 0.0 0.0 0.3 0.2 0.0 0.0 0.0
C 0.8 0.2 0.8 0.3 0.4 0.2 0.8 0.2
G 0.2 0.8 0.2 0.4 0.3 0.8 0.2 0.8
T 0.0 0.0 0.0 0.0 0.1 0.0 0.0 0.0
[1] 1.2780719 1.2780719 1.2780719 0.4290494 0.1535607 1.2780719 1.2780719
[8] 1.2780719
[1] "CGCGCGCG"

seqLogo documentation built on Nov. 8, 2020, 8:20 p.m.