Learn R Programming

motifStack (version 1.16.2)

pcm-class: Class "pcm"

Description

An object of class "pcm" represents the position count matrix of a DNA/RNA/amino-acid sequence motif. The entry stores a matrix, which in row i, column j gives the counts of observing nucleotide/or amino acid i in position j of the motif.

Arguments

Objects from the Class

Objects can be created by calls of the form new("pcm", mat, name, alphabet, color, background).

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")
plot(motif)

Run the code above in your browser using DataLab