Learn R Programming

motifStack (version 1.16.2)

pfm-methods: "pfm" methods

Description

methods for pfm objects.

Usage

## S3 method for class 'pfm,numeric,logical':
addBlank(x,n,b)
	## S3 method for class 'pfm,ANY':
getIC(x,p="missing")
	## S3 method for class 'matrix,numeric':
getIC(x,p)
	## S3 method for class 'pfm':
matrixReverseComplement(x)
	## S3 method for class 'pfm,ANY':
plot(x,y="missing",\dots)
	## S3 method for class 'pfm,numeric':
trimMotif(x,t)

Arguments

x
An object of class pfm. For getIC, if parameter p is followed, x should 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.
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 <- pcm2pfm(pcm)
motif <- new("pfm", mat=motif, name="bin_SOLEXA")
getIC(motif)
matrixReverseComplement(motif)
addBlank(motif, 1, FALSE)
addBlank(motif, 3, TRUE)
as(motif,"matrix")

Run the code above in your browser using DataLab