tryAllMotifAlignments: Try all motif alignments and return max score

Description Usage Arguments Details Value References

View source: R/similarity.R

Description

This function tries all offsets of motif1 compared to motif2 and returns the maximal (unnormalized) correlation score.

Usage

1
tryAllMotifAlignments(m1, m2, min.align = 2, exclude.zero = FALSE)

Arguments

m1

frequency matrix of motif 1

m2

frequency matrix of motif 2

min.align

minimal number of basepairs that need to align

exclude.zero

if to exclude offset=0, useful for calculating self-similarity

Details

The correlation score is essentially the sum of correlations of individual aligned columns as described in Pietrokovski (1996).

Value

single maximal score

References

Pietrokovski S. Searching databases of conserved sequence regions by aligning protein multiple-alignments. Nucleic Acids Res 1996;24:3836-3845.


PWMEnrich documentation built on Nov. 8, 2020, 7:45 p.m.