Learn R Programming

motifStack (version 1.16.2)

pcm-methods: "pcm" methods

Description

methods for pcm objects.

Usage

## S3 method for class 'pcm,numeric,logical':
addBlank(x,n,b)
	## S3 method for class 'pcm,ANY':
getIC(x,p="missing")
	## S3 method for class 'pcm':
matrixReverseComplement(x)
	## S3 method for class 'pcm,ANY':
plot(x,y="missing",\dots)
	## S3 method for class 'pcm,ANY':
pcm2pfm(x,background="missing")
	## S3 method for class 'matrix,ANY':
pcm2pfm(x,background="missing")
	## S3 method for class 'matrix,numeric':
pcm2pfm(x,background)
	## S3 method for class 'data.frame,ANY':
pcm2pfm(x,background="missing")
	## S3 method for class 'data.frame,numeric':
pcm2pfm(x,background)
	## S3 method for class 'pcm,numeric':
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.

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