| CollectionType-class {GSEABase} | R Documentation |
These classes provides a way to tag the origin of a
GeneSet. Collection types can be used in manipulating
(e.g., selecting) sets, and can contain information specific to
particular sets (e.g., category and subcategory
classifications of BroadCollection.)
The following classes can tag gene sets; GO, KEGG, Chr, Chrloc,
OMIM, and PMID collections can be derived from chip or organism
‘annotation’ packages.
getBroadSets,
toBroadXML.ExpressionSet. Usually
created during a call to GeneSet or
GeneColorSet.GOCollection,
specifically from files described by the OBO file format. See
OBOCollection
Objects are instantiated with calls to CollectionType
constructors, with slot names as possible arguments.
CollectionType classes (Null, ComputedCollection,
ExpressionSet) have the slot:
type:"ScalarCharacter"
containing the character string representation of this
CollectionType.
CollectionIdType classes (KEGG, OMIM, PMID, Chr, Chrloc,
Map, GO) extend the CollectionType and have the additional
slot:
ids:"character" containing a
vector of character string representations of corresponding
identifiers, e.g., ‘KEGG’ or ‘GO’ terms.
GOCollection extends CollectionIdType and has the
additional slot:
evidenceCode:"character",
containing GO evidence codes used to construct the gene set.
OBOCollection extends GOCollection; see
OBOCollection.
BroadCollection has slots:
category:"ScalarCharacter"
containing terms from the Broad list of categories, or NAsubCategory:"ScalarCharacter"
containing Broad sub-categories, or NA
CollectionType classes have methods:
signature(object = "GeneSet", value =
"CollectionType"): Replace the CollectionType signature(object = "CollectionType"):
Retrieve the collection type.signature(e1="CollectionType",
e2="CollectionType"): return e1 when class(e1) and
class(e2) are the same, or ComputedCollection when different.signature(object = "CollectionType"): display the
collection type.
CollectionIdType classes inherit CollectionType methods,
and have in addition:
signature(object="CollectionIdType"): Retrieve the
identifiers of the collection type.signature(object="CollectionIdType", i="missing",
j="missing", ..., ids=ids(object)): return a subset of
object containing only ids in idssignature(e1="CollectionIdType",
e2="CollectionIdType"): always return ComputedCollection.
GOCollection inherits CollectionIdType methods, and has
in addition:
GOENTREZID.signature(object="CollectionIdType", i="missing",
j="missing", ..., evidenceCode=evidenceCode(object),
ontology=ontology(object)): return a subset of
object containing only evidence and ontology codes in
evidenceCode, ontology. This method passes
arguments ... to [,CollectionIdType methods.
BroadCollection has methods:
category of the Broad
collection.Martin Morgan <mtmorgan@fhcrc.org>
CollectionType consturctors.
names(getClass("CollectionType")@subclasses)
## Create a CollectionType and ask for its type
collectionType(ExpressionSetCollection())
## Not run:
## Read two GeneSets from a Broad XML file into a list, verify that
## they are both BroadCollection's. Category / subcategory information
## is unique to Broad collections.
fl <- system.file("extdata", "Broad.xml", package="GSEABase")
sets <- getBroadSets(fl)
sapply(sets, collectionType)
## End(Not run)
## ExpressionSets are tagged with ExpressionSetCollection; there is no
## 'category' information.
data(sample.ExpressionSet)
gs <- GeneSet(sample.ExpressionSet[100:109],
setName="sample.GeneSet", setIdentifier="123")
collectionType(gs)
## GOCollections are created by reference to GO terms and evidenceCodes
GOCollection("GO:0005488")
## requires library(GO); EntrezIdentifers automatically created
## Not run:
GeneSet(GOCollection(c("GO:0005488", "GO:0019825"),
evidenceCode="IDA"))
## End(Not run)