Description Usage Arguments Value Author(s)

Finds best local alignment for two PWMs.

1 2 3 4 | ```
localPwmAlignment(pwm_left, pwm_right, divergence = shannonDivergence,
unaligned_penalty = divergencePenaltyForUnaligned,
try_reverse_complement = TRUE, base_distribution = NULL,
length_normalization = FALSE)
``` |

`pwm_left` |
first PWM, a matrix of type matrix |

`pwm_right` |
first PWM, a matrix of type matrix |

`divergence` |
is a measure of difference between two pwm columns. Smaller is more similar. If you want to use non-uniform background distribution, provide your own function. |

`unaligned_penalty` |
distance for unaligned columns at edges of matrixes. See divergencePenaltyForUnaligned as an example for providing your own function |

`try_reverse_complement` |
If false the alignment will not be performed on reverse complements. If true, the input pwms should have column order of ACTG/ACGU. |

`base_distribution` |
is a vector of length nrow(pwm) that is added to unaligned columns of pwms for comparing. If NULL, uniform distribution is used |

`length_normalization` |
If true, will minimize the average divergence between PWMs. Otherwise will minimize the sum of divergences between positions. In both cases unalignes positions are compared to base_distribution and are counted when computing the alignment length. |

list of length two containing the alignment and the divergence

Lando Andrey

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.