| universalmotif-class {universalmotif} | R Documentation |
Container for motif objects. See create_motif() for creating
motifs as well as a more detailed description of the slots. For a
brief description of available methods, see examples.
## S4 method for signature 'universalmotif' x[i] ## S4 replacement method for signature 'universalmotif' x[i] <- value ## S4 method for signature 'universalmotif' initialize(.Object, name, altname, family, organism, motif, alphabet = "DNA", type, icscore, nsites, pseudocount = 1, bkg, bkgsites, consensus, strand = "+-", pval, qval, eval, multifreq, extrainfo, gapinfo) ## S4 method for signature 'universalmotif' show(object) ## S4 method for signature 'universalmotif' as.data.frame(x) ## S4 method for signature 'universalmotif' subset(x, select) ## S4 method for signature 'universalmotif' normalize(object) ## S4 method for signature 'universalmotif' rowMeans(x) ## S4 method for signature 'universalmotif' colMeans(x) ## S4 method for signature 'universalmotif' colSums(x) ## S4 method for signature 'universalmotif' rowSums(x) ## S4 method for signature 'universalmotif' nrow(x) ## S4 method for signature 'universalmotif' ncol(x) ## S4 method for signature 'universalmotif' colnames(x) ## S4 method for signature 'universalmotif' rownames(x) ## S4 method for signature 'universalmotif' cbind(..., deparse.level = 0)
x |
universalmotif Motif. |
i |
|
value |
Object to replace slot with. |
.Object |
universalmotif Final motif. |
name |
|
altname |
|
family |
|
organism |
|
motif |
|
alphabet |
|
type |
|
icscore |
|
nsites |
|
pseudocount |
|
bkg |
|
bkgsites |
|
consensus |
|
strand |
|
pval |
|
qval |
|
eval |
|
multifreq |
|
extrainfo |
|
gapinfo |
|
object |
universalmotif Motif. |
select |
|
... |
universalmotif Motifs. |
deparse.level |
Unused. |
A motif object of class universalmotif.
namecharacter(1)
altnamecharacter(1)
familycharacter(1)
organismcharacter(1)
motifmatrix
alphabetcharacter(1)
typecharacter(1)
icscorenumeric(1) Generated automatically.
nsitesnumeric(1)
pseudocountnumeric(1)
bkgnumeric 0-order probabilities must be provided for all letters.
bkgsitesnumeric(1)
consensuscharacter Generated automatically.
strandcharacter(1)
pvalnumeric(1)
qvalnumeric(1)
evalnumeric(1)
multifreqlist
extrainfocharacter
gapinfouniversalmotif_gapped(1)
Benjamin Jean-Marie Tremblay, benjamin.tremblay@uwaterloo.ca
## [
## Access the slots.
motif <- create_motif()
motif["motif"]
# you can also access multiple slots at once, released as a list
motif[c("motif", "name")]
## [<-
## Replace the slots.
motif["name"] <- "new name"
# some slots are protected
# motif["consensus"] <- "AAAA" # not allowed
## c
## Assemble a list of motifs.
c(motif, motif)
## as.data.frame
## Represent a motif as a data.frame. The actual motif matrix is lost.
## Necessary for `summarise_motifs`.
as.data.frame(motif)
## subset
## Subset a motif matrix by column.
subset(motif, 3:7) # extract motif core
## normalize
## Apply the pseudocount slot (or `1`, if the slot is set to zero) to the
## motif matrix.
motif2 <- create_motif("AAAAA", nsites = 100, pseudocount = 1)
normalize(motif2)
## rowMeans
## Calculate motif rowMeans.
rowMeans(motif)
## colMeans
## Calculate motif colMeans.
colMeans(motif)
## colSums
## Calculate motif colSums
colSums(motif)
## rowSums
## Calculate motif rowSums.
rowSums(motif)
## nrow
## Count motif rows.
nrow(motif)
## ncol
## Count motif columns.
ncol(motif)
## colnames
## Get motif colnames.
colnames(motif)
## rownames
## Get motif rownames.
rownames(motif)
## cbind
## Bind motifs together to create a new motif.
cbind(motif, motif2)