extendPwmsFromAlignmentVector: Extend pwms with respect to alignment

Description Usage Arguments Value Author(s) Examples

View source: R/pwmAlignment.R

Description

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

Usage

1
2
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

1
2
3
4
5
6
7
8
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)

DiffLogo documentation built on Nov. 8, 2020, 6:09 p.m.