computes distance between every pwm in a list or between pwms in one list with pwms in another

pwmDistance(x, y = NULL, min_overlap = 5)

Arguments

x

list of pwms or pfms, see Details

y

list of pwms or pfms, see Details

min_overlap

minimum number of basepairs overlapping between motifs

Value

a list with three matrices- 'dist' has the distance between each pair of motifs, 'strand' has the strand of the motif for the match, and 'offset' has the offset between the motifs.

Details

The format of x and y should be a PWMatrixList or PFMatrixList or a list of matrices with rows corresponding to "A","C","G","T" and columns summing to 1.

Examples

# NOT RUN {
motifs <- getJasparMotifs()
library(TFBSTools)
pwm_dists <- pwmDistance(toPWM(motifs[[1]]), toPWM(motifs[[2]]))
# }