read.pwm: Read PWM object

Description Usage Arguments Value Examples

View source: R/tfbs.R

Description

Read and log transform Position Weight Matrices (PWMs) from file. Each position weight matrix represents a Transcription Factor motif that is being searched for. Files may contain one or more motifs. Only MEME Text formated files are supported. Look in the examples below to find an example PWM file.

Usage

1
read.pwm(filename)

Arguments

filename

Full Path to file of MEME Text format

Value

Matrix object containing the Position Weight Matrix read from the file. If the file contains more than one PWM, a list of Matrix objects are returned, one for each PWM. The returned PWMs are log transformed, so that entry [i,j] of the matrix represents the log probability of observing the base from column j in the i'th position of a transcription factor binding site.

Examples

1
2
3
4
5
6
7
8
9
require("rtfbs")
exampleArchive <- system.file("extdata", "NRSF.zip", package="rtfbs")
pwmFile <- "pwm.meme"
unzip(exampleArchive, pwmFile)
# Read in Position Weight Matrix (PWM) from MEME file from
#  the examples into a Matrix object
pwm <- read.pwm(pwmFile)
# Print PWM as an R matrix
print(pwm)

rtfbs documentation built on May 19, 2017, 1:53 p.m.

Search within the rtfbs package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.