Description Usage Arguments Value Methods Author(s) See Also Examples
XMatrix is a virtual class. No objects can be created from it directly. Three classes are derived from this class: PFMatrix, PWMatrix and ICMatrix.
PFMatrix is a class whose instances are objects representing raw position frequency matrices (PFMs).
PWMatrix is a class whose instances are objects representing
position weight matrices (PWMs).
Compared with PFMatrix, it has extra slot pseudocounts
.
ICMatrix is a class whose instances are objects representing
information content matrices (ICMs).
Compared with PWMatrix, it has extra slot schneider
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Constructors:
PFMatrix(ID="Unknown", name="Unknown", matrixClass="Unknown",
strand="+", bg=c(A=0.25, C=0.25, G=0.25, T=0.25),
tags=list(), profileMatrix=matrix())
PWMatrix(ID="Unknown", name="Unknown", matrixClass="Unknown",
strand="+", bg=c(A=0.25, C=0.25, G=0.25, T=0.25),
tags=list(), profileMatrix=matrix(), pseudocounts=numeric())
ICMatrix(ID="Unknown", name="Unknown", matrixClass="Unknown",
strand="+", bg=c(A=0.25, C=0.25, G=0.25, T=0.25),
tags=list(), profileMatrix=matrix(), pseudocounts=numeric(),
schneider=logical())
## Accessor-like methods:
## S4 method for signature 'XMatrix'
ID(x)
## S4 method for signature 'XMatrix'
bg(x)
## ... and more (see Methods)
|
ID |
Object of class |
name |
Object of class |
matrixClass |
Object of class |
strand |
Object of class |
bg |
Object of class |
tags |
Object of class (1) "family": Structural sub-class of the transcription factor, based on the TFCaT system. (2) "species": The species source for the sequences, in NCBI tax IDs. (3) "tax_group": Group of species, currently consisting of 4 larger groups: vertebrate, insect, plant, chordate. (4) "medline": a ID to the relevant publication reporting the sites used in the mode building. (5) "type": Methodology used for matrix construction. (6) "ACC": A representative protein accession number in Genbank for the transcription factor. Human takes precedence if several exists. (6) "pazar_tf_id": a ID to PAZAR database. (7) "TFBSshape_ID": a ID to TFBSshape database. (8) "TFencyclopedia_ID": a ID to the Transcription Factor Encyclopedia. (9) "comment": For some matrices, a curator comment is added. |
profileMatrix |
Object of class |
pseudocounts |
Object of class |
schneider |
Obejct of class |
x |
Object of class |
A XMatrix
object.
signature(x = "XMatrix")
:
Gets the background base frequencies.
signature(x = "XMatrix")
:
Sets the background base frequencies.
signature(x = "XMatrix")
: Gets the ID information.
signature(x = "XMatrix")
: Sets the ID information.
signature(x = "XMatrix")
: Gets the pattern length in nucleotides
(i.e. number of columns in the matrix).
signature(x = "PWMatrix")
:
Generates the reverse complement matrix object.
Note than the strand is XMatrix will also be changed to
the opossite strand.
signature(x = "XMatrix")
: Returns the matrix in the XMatrix class.
signature(x = "ICMatrix")
: Returns the information content vector.
signature(x = "XMatrix")
:
Gets the matrix stored in XMatrix
object.
signature(x = "XMatrix")
: Sets the matrix stored in XMatrix
object.
signature(x = "XMatrix")
:
Gets the matrix type of a XMatrix
object.
signature(x = "XMatrix")
:
Sets the matrix type of a XMatrix
object.
signature(x = "XMatrix")
: Gets the name information.
signature(x = "XMatrix")
: Sets the name information.
signature(x = "XMatrix")
:
Gets the strand information of a XMatrix
object.
signature(x = "XMatrix")
:
Gets a list
object of tags information.
Ge Tan
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Constructorpf PFMatrix
## Note that there is no XMatrix() constructor,
## but an XMatrix family of constructors: PFMatrix(), PWMatrix(), ICMatrix()
pfm <- PFMatrix(ID="MA0004.1", name="Arnt", matrixClass="Zipper-Type",
strand="+", bg=c(A=0.25, C=0.25, G=0.25, T=0.25),
tags=list(family="Helix-Loop-Helix", species="10090",
tax_group="vertebrates", medline="7592839", type="SELEX",
ACC="P53762", pazar_tf_id="TF0000003",
TFBSshape_ID="11", TFencyclopedia_ID="580"),
profileMatrix=matrix(c(4, 19, 0, 0, 0, 0,
16, 0, 20, 0, 0, 0,
0, 1, 0, 20, 0, 20,
0, 0, 0, 0, 20, 0),
byrow=TRUE, nrow=4,
dimnames=list(c("A", "C", "G", "T")))
)
## Construction from a set of binding sites sequences
sitesSeqs <- c("Human Gli1"= "GACCACCCA", "hIGFBP-6"= "GACCCCCCA",
"HNF-3beta"="GAACACCCA", "hPlakoglobin"= "GACCACCAA",
"rIGFBP-6"= "GTCCACCCA", "Sox-9"= "GGCCACCCA")
countMatrix <- consensusMatrix(sitesSeqs)
pfm <- PFMatrix(ID="Gli-1", name="Gli-1", profileMatrix=countMatrix)
## Coersion
as.matrix(pfm)
as(pfm, "matrix")
## Methods
pwm <- toPWM(pfm)
reverseComplement(pwm)
length(pfm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.