GeneIdentifierType-class {GSEABase}R Documentation

Class "GeneIdentifierType"

Description

This class provides a way to tag the meaning of gene symbols in a GeneSet. For instance, a GeneSet with gene names derived from a Bioconductor annotation package (e.g., via ExpressionSet) initially have a GeneIdentifierType of AnnotationIdentifier.

Objects from the Class

The following classes are available, and derive from tables in ‘annotation’ packages

NullIdentifier
No formal information about what gene identifiers represent.
AnnotationIdentifier
Gene identifiers are Affymetrix chip-specific probe identifier, as represented in Bioconductor annotation packages.
EntrezIdentifier
‘Entrez’ identifiers.
EnzymeIdentifier
‘EC’ identifiers.
GenenameIdentifier
Curated and ad hoc descriptive gene names.
RefseqIdentifier
‘Prosite’ identifiers.
SymbolIdentifier
‘Symbol’ identifiers.
UnigeneIdentifier
‘Unigene’ identifiers.
GeneIdentifierType
A virtual Class: No objects may be created from it; all classes listed above are subclasses of GeneIdentifierType.

Slots

All GeneIdentifierType classes have the following slot:

type
Object of class "ScalarCharacter" containing the character string representation of this GeneIdentifierType.

The AnnotationIdentifier class has an additional slot

annotation
Object of class "ScalarCharacter" containing the name of the annotation package from which the annotations (probe identifiers) are derived.

Methods

GeneIdentifierType classes are used in:

GeneSet
signature(type = "GeneIdentifierType"): Create a new GeneSet using identifiers of GeneIdentifierType.
GeneColorSet
signature(type = "GeneIdentifierType"): Create a new GeneColorSet using identifiers of GeneIdentifierType.
geneIdType<-
signature(object = "GeneSet", verbose=FALSE, value = "GeneIdentifierType"): Changes the GeneIdentifierType of object to value, attempting to convert symbols in the process. This method calls mapIdentifiers(what=object, to=value, from=geneIdType(what), verbose=verbose).
geneIdType
signature(object = "GeneIdentifierType"): return a character string representation of the type of this object.
mapIdentifiers
signature(what="GeneSet", to="GeneIdentifierType" from="missing", verbose=FALSE), signature(what="GeneSet", to="GeneIdentifierType" from="NullIdentifier", verbose=FALSE) : See mapIdentifiers.
show
signature(object = "GeneIdentifierType"): display this object.

AnnotationIdentifier has the following method:

geneIdType
signature(object = "AnnotationIdentifier"): Retrieve the geneIdType (e.g., annotation string for AnnotationIdentifier; ad hoc string for NullIdentifier).

AnnotationIdentifier classes are also used in:

annotation
signature(object = "AnnotationIdentifier"): extract the name of the annotation package as a character string.
mapIdentifiers
signature(what = "GeneSet", to = "GeneIdentifierType", from = "AnnotationIdentifier", verbose=FALSE), signature(what = "GeneSet", to="AnnotationIdentifier", from = "GeneIdentifierType", verbose=FALSE): see mapIdentifiers.
show
signature(object = "AnnotationIdentifier"): Display object, including the annotation string if available.
initialize
signature(.Object = "AnnotationIdentifier"): Used internally during object creation.

Author(s)

Martin Morgan <mtmorgan@fhcrc.org>

See Also

The example below lists GeneIdentifierType classes defined in this package; See the help pages of these classes for specific information.

Examples

getSubclasses(getClass("GeneIdentifierType"))

# create an AnnotationIdentifier, and ask it's type
geneIdType(AnnotationIdentifier(annotation="hgu95av2"))

# Construct a GeneSet from an ExpressionSet, using the 'annotation'
# field of ExpressionSet to recognize the genes as AnnotationType
data(sample.ExpressionSet)
gs <- GeneSet(sample.ExpressionSet[100:109],
              setName="sample.GeneSet", setIdentifier="123")
geneIdType(gs) # AnnotationIdentifier

## Read a Broad set from the system (or a url), and discover their
## GeneIdentifierType
fl <- system.file("extdata", "Broad.xml", package="GSEABase")
bsets <- getBroadSets(fl)
sapply(bsets, geneIdType)

## try to combine gene sets with different set types
try(gs & sets[[1]])

## Not run: 
## Use the annotation package associated with the original
## ExpressionSet to map to EntrezIdentifier() ...
geneIdType(gs) <- EntrezIdentifier()
...## and try again
gs & bsets[[1]]

## Another way to change annotation to Entrez (or other) ids
probeIds <- featureNames(sample.ExpressionSet)[100:109]
geneIds <- as.character(unlist(mget(probeIds, hgu95av2ENTREZID)))
GeneSet(EntrezIdentifier(),
        setName="sample.GenSet2", setIdentifier="101",
        geneIds=geneIds)
## End(Not run)

## Create a new identifier
setClass("FooIdentifier",
         contains="GeneIdentifierType",
         prototype=prototype(
           type=new("ScalarCharacter", "Foo")))
## Create a constructor (optional)
FooIdentifier <- function() new("FooIdentifier")
geneIdType(FooIdentifier())

## tidy up
removeClass("FooIdentifier")

[Package GSEABase version 1.0.3 Index]