toPWM: Convert motifs into PWMs

Description Usage Arguments Examples

View source: R/pwm.R

Description

Convert motifs into PWMs

Usage

1
2
3
4
5
6
7
8
toPWM(
  motifs,
  ids = names(motifs),
  targets = names(motifs),
  seq.count = 50,
  prior = c(A = 0.25, C = 0.25, G = 0.25, T = 0.25),
  ...
)

Arguments

motifs

a list of motifs either as position probability matrices (PPM) or frequency matirces (PFMs)

ids

the set of IDs for the motifs (defaults to names of the 'motifs' list)

targets

the set of target TF names for the motifs (defaults to names of the 'motifs' list)

seq.count

provides a vector of sequence counts for probability matrices (PPMs). Default it 50.

prior

frequencies of the four letters in the genome. Default is uniform background.

...

other parameters to PWMUnscaled

Examples

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

   toPWM(MotifDb.Dmel.PFM) # convert to PWM with uniform background

   # get background for drosophila (quick mode on a reduced dataset)
   prior = getBackgroundFrequencies("dm3", quick=TRUE)
   toPWM(MotifDb.Dmel.PFM, prior=prior) # convert with genomic background 
}

## End(Not run)

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