extendPwmsFromAlignmentVector {DiffLogo} | R Documentation

## Extend pwms with respect to alignment

### Description

Extends pwms by adding base_distribution to both sides, so that they keep aligned, but have equal length.

### Usage

    extendPwmsFromAlignmentVector(pwms, alignment_vector,
      base_distribution = NULL)

### Arguments

`pwms` | is a list of matrixes
`alignment_vector` | is a list of shifts ($shift) and orientations ($direction)
`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

### Value

extended pwms

### Author(s)

Lando Andrey

### Examples

    file1 = system.file("extdata/homer/Max.motif",   package = "DiffLogo")
    file2 = system.file("extdata/homer/c-Myc.motif", package = "DiffLogo")
    pwm1 = getPwmFromFile(file1)
    pwm2 = getPwmFromFile(file2)

    pwms <- list(pwm1, pwm2)
    multiple_pwms_alignment = multipleLocalPwmsAlignment(pwms)
    aligned_pwms = extendPwmsFromAlignmentVector(pwms, multiple_pwms_alignment$alignment$vector)

[Package DiffLogo version 2.4.0 Index]