50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

DiffLogo (version 1.2.1)

sumOfAbsProbabilityDifferences: sum of absolute probability differences

Description

the sum of absolute probability differences for the given pair of probability vectors

Usage

sumOfAbsProbabilityDifferences(p1, p2)

Arguments

p1
probability vector representing the first symbol distribution
p2
probability vector representing the second symbol distribution

Value

an object consisting of height and ylab

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]]]]

diffLogoFromPwm(pwm1 = pwm1, pwm2 = pwm2, stackHeight = sumOfAbsProbabilityDifferences)

Run the code above in your browser using DataLab