makePWMPvalCutoffBackground: Construct a cutoff background from empirical background

Description Usage Arguments Value Examples

View source: R/background.R

Description

This function takes already calculated empirical background distribution and chooses cutoff for each motif based on P-value cutoff for individual sites.

Usage

1
makePWMPvalCutoffBackground(bg.p, p.value = 0.001, bg.source = "")

Arguments

bg.p

an object of class PWMEmpiricalBackground

p.value

the P-value used to find cuttoffs for each of the motifs

bg.source

textual description of background source

Value

an object of type PWMCutoffBackground

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
if(requireNamespace("PWMEnrich.Dmelanogaster.background")){
   data(MotifDb.Dmel.PFM, package = "PWMEnrich.Dmelanogaster.background")

   # make empirical background - here we use only 100 sequences for illustrative purposes
	  if(requireNamespace("BSgenome.Dmelanogaster.UCSC.dm3")) 
     bg.p = makePWMEmpiricalBackground(Dmelanogaster$upstream2000[1:100], MotifDb.Dmel.PFM)

   # use the empirical background to pick a threshold and make cutoff background
   makePWMPvalCutoffBackground(bg.p, 0.001)
}

## End(Not run)

PWMEnrich documentation built on Nov. 8, 2020, 7:45 p.m.