enrichDiffLogoObjectWithPvalues: Enriches a difflogo object with p-values

Description Usage Arguments Value Examples

View source: R/diffSeqLogoSupport.R

Description

Enriches a difflogo object with p-values which quantifies the probability that two PWM-positions are from the same distribution

Usage

1
2
enrichDiffLogoObjectWithPvalues(diffLogoObj, n1, n2,
  stackHeight = shannonDivergence, numberOfPermutations = 100)

Arguments

diffLogoObj

matrix of difflogo objects

n1

the number of sequences behind the first pwm behind the given difflogo object

n2

the number of sequences behind the second pwm behind the given difflogo object

stackHeight

function for the calculation of a divergence measure for two probability vectors

numberOfPermutations

the number of permutations to perform for the calculation of stackHeights

Value

enriched difflogo object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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]]]]
n1 <- 100
n2 <- 100
diffLogoObj = createDiffLogoObject(pwm1 = pwm1, pwm2 = pwm2)
diffLogoObj = enrichDiffLogoObjectWithPvalues(diffLogoObj, n1, n2)

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