Learn R Programming

DiffLogo (version 1.2.1)

createDiffLogoObject: DiffLogo object

Description

Creates a DiffLogo object

Usage

createDiffLogoObject(pwm1, pwm2, stackHeight = shannonDivergence, baseDistribution = normalizedDifferenceOfProbabilities, alphabet = DNA)

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

Value

DiffLogo object

Examples

Run this code
motif_folder= "extdata/pwm"
motif_names = c("HepG2","MCF7","HUVEC","ProgFib")
motifs = list()
for (name in motif_names) {
  fileName = paste(motif_folder,"/",name,".txt",sep="")
  file = system.file(fileName, package = "DiffLogo")
  motifs[[name]] = as.matrix(read.delim(file,header=FALSE))
}

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

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

Run the code above in your browser using DataLab