toPWM: Convert motifs into PWMs

Description Usage Arguments Examples

View source: R/pwm.R

Description

Convert motifs into PWMs

Usage

1
2
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)

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
if(require("PWMEnrich.Dmelanogaster.background")){
   data(MotifDb.Dmel.PFM)

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

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

Example output

Loading required package: grid
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: Biostrings
Loading required package: S4Vectors
Loading required package: stats4

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package: 'Biostrings'

The following object is masked from 'package:base':

    strsplit

Loading required package: PWMEnrich.Dmelanogaster.background
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called 'PWMEnrich.Dmelanogaster.background'

PWMEnrich documentation built on May 2, 2018, 4:20 a.m.