Description Usage Arguments Value Slots Author(s) See Also Examples
The IdVector
class extends the Vector
class to implement a container that hold a vector of character identifiers.
Subclasses of IdVector
may be defined to enable method dispatch according to the nature of the identifiers (e.g., ENTREZ gene, Gene Ontology term).
1 2 3 4 5 6 7 | IdVector(ids = character(0))
EntrezIdVector(ids)
EnsemblIdVector(ids)
GOIdVector(ids)
|
ids |
character. Identifiers. |
An IdVector
object.
ids
character. Identifiers.
Kevin Rue-Albrecht
Vector
,
EntrezIdVector
,
EnsemblIdVector
,
GOIdVector
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 | # Constructor ----
iv <- IdVector(ids=head(LETTERS, 6))
mcols(iv) <- DataFrame(row.names = ids(iv), field1=runif(length(iv)))
iv
# Subsetting ----
iv[1:5]
# Identifiers/Names ----
ids(iv)
names(iv)
# EntrezIdVector ----
library(org.Hs.eg.db)
eiv <- EntrezIdVector(keys(org.Hs.eg.db, keytype="ENTREZID"))
eiv
# EnsemblIdVector ----
library(org.Hs.eg.db)
eiv <- EnsemblIdVector(keys(org.Hs.eg.db, keytype="ENSEMBL"))
eiv
# GOIdVector ----
library(org.Hs.eg.db)
giv <- GOIdVector(keys(org.Hs.eg.db, keytype = "GO"))
giv
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.