Learn R Programming

motifStack (version 1.16.0)

pcm-methods: "pcm" methods

Description

methods for pcm objects.

Usage

"addBlank"(x,n,b) "getIC"(x,p="missing") "matrixReverseComplement"(x) "plot"(x,y="missing",...) "pcm2pfm"(x,background="missing") "pcm2pfm"(x,background="missing") "pcm2pfm"(x,background) "pcm2pfm"(x,background="missing") "pcm2pfm"(x,background) "trimMotif"(x,t)

Arguments

x
An object of class pcm. For getIC, if parameter p is followed, x should be an object of matrix. For pcm2pfm, x also could be an object of matrix.
y
Not use.
p
p is the background frequency.
n
how many spaces should be added.
b
logical value to indicate where the space should be added.
background
a "numeric" vector. The background frequency.
t
numeric value of information content threshold for trimming.
...
Further potential arguments passed to plotMotifLogo.

Methods

addBlank
signature(x="pcm", n="numeric", b="logical") add space into the position count matrix for alignment. b is a bool value, if TRUE, add space to the 3' end, else add space to the 5' end. n indicates how many spaces should be added.
coerce
signature(from = "pcm", to = "matrix"): convert object pcm to matrix
getIC
signature(x = "pcm",) Calculate information content profile for position frequency matrix.
matrixReverseComplement
signature(x = "pcm") get the reverse complement of position frequency matrix.
plot
signature(x = "pcm") Plots the sequence logo of the position count matrix.
trimMotif
signature(x = "pcm", t= "numeric") trim motif by information content.
$, $<-
Get or set the slot of pcm

Examples

Run this code
pcm <- read.table(file.path(find.package("motifStack"), "extdata", "bin_SOLEXA.pcm"))
pcm <- pcm[,3:ncol(pcm)]
rownames(pcm) <- c("A","C","G","T")
motif <- new("pcm", mat=as.matrix(pcm), name="bin_SOLEXA")
getIC(motif)
matrixReverseComplement(motif)
as(motif,"matrix")
pcm2pfm(motif)

Run the code above in your browser using DataLab