GeneIdentifierType-class      package:GSEABase      R Documentation

_C_l_a_s_s "_G_e_n_e_I_d_e_n_t_i_f_i_e_r_T_y_p_e"

_D_e_s_c_r_i_p_t_i_o_n:

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

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

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

     _N_u_l_l_I_d_e_n_t_i_f_i_e_r No formal information about what gene identifiers
          represent.

     _A_n_n_o_t_a_t_i_o_n_I_d_e_n_t_i_f_i_e_r Gene identifiers are Affymetrix chip-specific
          probe identifier, as represented in Bioconductor annotation
          packages.

     _E_n_t_r_e_z_I_d_e_n_t_i_f_i_e_r Entrez identifiers.

     _E_n_z_y_m_e_I_d_e_n_t_i_f_i_e_r EC identifiers.

     _G_e_n_e_n_a_m_e_I_d_e_n_t_i_f_i_e_r Curated and ad hoc descriptive gene names.

     _R_e_f_s_e_q_I_d_e_n_t_i_f_i_e_r Prosite identifiers.

     _S_y_m_b_o_l_I_d_e_n_t_i_f_i_e_r Symbol identifiers.

     _U_n_i_g_e_n_e_I_d_e_n_t_i_f_i_e_r Unigene identifiers.

     _G_e_n_e_I_d_e_n_t_i_f_i_e_r_T_y_p_e A virtual Class: No objects may be created from
          it; all classes listed above are subclasses of
          'GeneIdentifierType'.

_S_l_o_t_s:

     All 'GeneIdentifierType' classes have the following slot:

     _t_y_p_e Object of class '"ScalarCharacter"' containing the character
          string representation of this 'GeneIdentifierType'.

     The 'AnnotationIdentifier' class has an additional slot

     _a_n_n_o_t_a_t_i_o_n Object of class '"ScalarCharacter"' containing the name
          of the annotation package from which the annotations (probe
          identifiers) are derived.

_M_e_t_h_o_d_s:

     'GeneIdentifierType' classes are used in:

     _G_e_n_e_S_e_t 'signature(type = "GeneIdentifierType")': Create a new
          'GeneSet' using identifiers of 'GeneIdentifierType'.

     _G_e_n_e_C_o_l_o_r_S_e_t 'signature(type = "GeneIdentifierType")': Create a
          new 'GeneColorSet' using identifiers of 'GeneIdentifierType'.

     _g_e_n_e_I_d_T_y_p_e<- '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)'.

     _g_e_n_e_I_d_T_y_p_e 'signature(object = "GeneIdentifierType")': return a
          character string representation of the type of this 'object'.

     _m_a_p_I_d_e_n_t_i_f_i_e_r_s 'signature(what="GeneSet", to="GeneIdentifierType"
          from="missing", verbose=FALSE)', 'signature(what="GeneSet",
          to="GeneIdentifierType" from="NullIdentifier",
          verbose=FALSE)' : See 'mapIdentifiers'.

     _s_h_o_w 'signature(object = "GeneIdentifierType")': display this
          object.

     'AnnotationIdentifier' has the following method:

     _g_e_n_e_I_d_T_y_p_e 'signature(object = "AnnotationIdentifier")': Retrieve
          the 'geneIdType' (e.g., annotation string for
          'AnnotationIdentifier'; ad hoc string for 'NullIdentifier').

     'AnnotationIdentifier' classes are also used in:

     _a_n_n_o_t_a_t_i_o_n 'signature(object = "AnnotationIdentifier")': extract
          the name of the annotation package as a character string.

     _m_a_p_I_d_e_n_t_i_f_i_e_r_s 'signature(what = "GeneSet", to =
          "GeneIdentifierType", from = "AnnotationIdentifier",
          verbose=FALSE)', 'signature(what = "GeneSet",
          to="AnnotationIdentifier", from = "GeneIdentifierType",
          verbose=FALSE)': see 'mapIdentifiers'.

     _s_h_o_w 'signature(object = "AnnotationIdentifier")': Display
          'object', including the annotation string if available.

     _i_n_i_t_i_a_l_i_z_e 'signature(.Object = "AnnotationIdentifier")': Used
          internally during object creation.

_A_u_t_h_o_r(_s):

     Martin Morgan <mtmorgan@fhcrc.org>

_S_e_e _A_l_s_o:

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

_E_x_a_m_p_l_e_s:

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

