tryAllMotifAlignments {PWMEnrich} | R Documentation

## Try all motif alignments and return max score

### Description

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

### Usage

    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.

[Package PWMEnrich version 4.28.1 Index]