rank.factors: Rank transcription factors according to changes in binding...

Description Usage Arguments Details Value References Examples

Description

Rank transcription factors according to changes in binding affinity by sequence polymorphisms like SNPs

Usage

1
2
rank.factors(matrices, seq1, seq2, local = F, gev = T, snp.pos = NULL,
  margins = NULL, empirical.offset = 1, both.strands = TRUE)

Arguments

matrices

list of transfac matrices

seq1

sequence allele 1

seq2

sequence allele 2

local

compute affinities locally in a sliding window or over the whole sequence

gev

use the fitted generalized extreme value distribution for p-values (if FALSE, empirical distribution over the rest of the sequence)

snp.pos

position of the SNP in the sequences (should always be the same and only needed for local or empirical p-values (gev == FALSE)

margins

compute the affinity in a margin around the SNP for empirical p-values and local == FALSE

empirical.offset

when using empirical p-values and local == FALSE the offset can be used to determine the spacing of windows to measure the affinities over regions of same size as the margin

both.strands

compute affinity to both strands

Details

Unify all cases of comparing affinities for a set of pairs of sequence possible design choices are - computing affinities for the two alleles - globally in a region around the SNP - locally in a sliding window of length w (length of each PWM) - computing p-values of the affinities - using gobally fitted GEV distributions - empirical p-values from the surounding sequence

Value

A data.frame with the fields a1, a2, p1, p2, ratio, log.ratio, min.p, min.prod. Each row corresponds to a matrix, the a fields contain the affinities, the p fields the corresponding p-values of the matrix and the two sequences. Further the ratio of the p-values, the log10 ratio, the min and the product of the p-values are given. If local is true, the min is over all positions.

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
4
5
6
data(jaspar)
pwm = jaspar[[1]]
#pwm = matrix(c(5, 4, 3, 1, 10, 12, 5, 3, 3, 5, 3, 10), nrow=4)
seq1 = "actgacgtgtgcaCacgatgctagctg"
seq2 = "actgacgtgtgcaTacgatgctagctg"
rank.factors(list(mypwm=pwm), seq1, seq2)

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