makePWMGEVBackground: Make a GEV background distribution

Description Usage Arguments Examples

View source: R/background.R

Description

Construct a lognormal background distribution for a set of sequences. Sequences concatenated are binned in 'bg.len' chunks and lognormal distribution fitted to them.

Usage

1
2
3
4
5
6
7
8
9
makePWMGEVBackground(
  bg.seq,
  motifs,
  bg.pseudo.count = 1,
  bg.len = seq(200, 2000, 200),
  bg.source = "",
  verbose = TRUE,
  fit.log = TRUE
)

Arguments

bg.seq

a set of background sequences, either a list of DNAString object or DNAStringSet object

motifs

a set of motifs, either a list of frequency matrices, or a list of PWM objects. If frequency matrices are given, the background distribution is fitted from bg.seq.

bg.pseudo.count

the pseudo count which is shared between nucleotides when frequency matrices are given

bg.len

the length range of background chunks

bg.source

a free-form textual description of how the background was generated

verbose

if to produce verbose output

fit.log

if to fit log odds (instead of odds)

Examples

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

   # make background for MotifDb motifs using 2kb promoters of all D. melanogaster transcripts 
	  if(requireNamespace("BSgenome.Dmelanogaster.UCSC.dm3")) 
     makePWMGEVBackground(Dmelanogaster$upstream2000, MotifDb.Dmel.PFM)
}

## End(Not run)

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