affinity: compute transcription factor binding site affinity

Description Usage Arguments Value References Examples

Description

The TRAP method to predict transcription factor binding affinity to DNA sequences (Roider et al 2007). Default is to compute the affinity for the whole region by summing over all sites. If site specific affinities are of interest set slide to true.

Usage

1
2
affinity(pwm, seq, Rmax = NULL, lambda = 0.7, pseudo.count = 1,
  gc.content = 0.5, slide = FALSE, both.strands = TRUE)

Arguments

pwm

position specific count matrix with 4 rows: A, C, G, T

seq

the sequence

Rmax

the maximal affinity times the activity of the factor by default set to exp(0.584 * ncol(pwm) - 5.66)

lambda

scaling parameter for the Berg and von Hippel mismatch energy

pseudo.count

pseudo count to add to the PWM

gc.content

GC content for the background model

slide

if true the affinities for each sequence position will be returned

both.strands

scan on both strands (default is TRUE for DNA) or only on the forward strand (for instance for RNA)

Value

if slide is false, the function returns to overall affinity, otherwise for each of the nchar(seq) - ncol(pwm) + 1 sequence positions the score of the site is returned. If the sequence contains gap characters "-" then the positions will be removed and if slide is true the positions with gaps will be filled with NA. This is usefull if you want to compare polymorphisms in promoter sequences.

References

Roider, H. G.; Kanhere, A.; Manke, T. & Vingron, M. Predicting transcription factor affinities to DNA from a biophysical model. Bioinformatics, 2007, 23, 134-141

Examples

1
2
3
pwm = matrix(c(5, 4, 3, 1, 10, 12, 5, 3, 3, 5, 3, 10), nrow=4)
seq = "ACTGACGTGTGCACACGATGCTAGCTG"
affinity(pwm, seq)

matthuska/tRap documentation built on May 21, 2019, 1:23 p.m.