PFMtoPWM: Convert frequencies into motifs using PWMUnscaled

Description Usage Arguments Examples

View source: R/pwm.R

Description

Convert frequencies into motifs using PWMUnscaled

Usage

1
2
  PFMtoPWM(motifs, id = names(motifs),
    name = names(motifs), seq.count = NULL, ...)

Arguments

motifs

a list of motifs represented as matrices of frequencies (PFM)

id

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

name

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

seq.count

if frequencies in the motifs are normalized to 1, provides a vector of sequence counts (e.g. for MotifDb motifs)

...

other parameters to PWMUnscaled

Examples

1
2
3
4
5
6
7
8
if(require("PWMEnrich.Dmelanogaster.background")){
   data(MotifDb.Dmel.PFM)

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

   prior = getBackgroundFrequencies("dm3", quick=TRUE) # get background for drosophila (quick mode on a reduced dataset)
   PFMtoPWM(MotifDb.Dmel.PFM, prior.params=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 Nov. 1, 2018, 2:25 a.m.