IdVector-class: IdVector Class

Description Usage Arguments Value Slots Author(s) See Also Examples

Description

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).

Usage

1
2
3
4
5
6
7

Arguments

ids

character. Identifiers.

Value

An IdVector object.

Slots

ids

character. Identifiers.

Author(s)

Kevin Rue-Albrecht

See Also

Vector, EntrezIdVector, EnsemblIdVector, GOIdVector

Examples

 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

kevinrue/unisets documentation built on May 15, 2020, 10:48 p.m.