createDiffLogoObject {DiffLogo} | R Documentation

## DiffLogo object

### Description

Creates a DiffLogo object

### Usage

    createDiffLogoObject(pwm1, pwm2, stackHeight = shannonDivergence,
      baseDistribution = normalizedDifferenceOfProbabilities,
      alphabet = DNA, align_pwms = FALSE,
      unaligned_penalty = divergencePenaltyForUnaligned,
      try_reverse_complement = TRUE, base_distribution = NULL,
      length_normalization = FALSE, unaligned_from_left = 0,
      unaligned_from_right = 0)

### Arguments

`pwm1` | representation of the first position weight matrix (PWM) of type pwm, data.frame, or matrix
`pwm2` | representation of the second position weight matrix (PWM) of type pwm, data.frame, or matrix
`stackHeight` | function for the height of a stack at position i
`baseDistribution` | function for the heights of the individual bases
`alphabet` | of type Alphabet
`align_pwms` | if True, will aling and extend pwms.
`unaligned_penalty` | is a function for localPwmAlignment.
`try_reverse_complement` | if True, alignment will try reverse complement pwms
`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.
`unaligned_from_left` | the number of unaligned positions on the left
`unaligned_from_right` | the number of unaligned positions on the right

### Value

DiffLogo object

### Author(s)

Martin Nettling

### Examples

    motif_folder= "extdata/pwm"
    motif_names = c("HepG2","MCF7","HUVEC","ProgFib")
    motifs = list()
    for (name in motif_names) {
      fileName = paste(motif_folder,"/",name,".pwm",sep="")
      file = system.file(fileName, package = "DiffLogo")
      motifs[[name]] = getPwmFromPwmFile(file)
    }

    pwm1 = motifs[[motif_names[[1]]]]
    pwm2 = motifs[[motif_names[[2]]]]

    diffLogoObj = createDiffLogoObject(pwm1 = pwm1, pwm2 = pwm2)
    diffLogo(diffLogoObj)

[Package DiffLogo version 2.12.2 Index]