GeneSet               package:GSEABase               R Documentation

_M_e_t_h_o_d_s _t_o _c_o_n_s_t_r_u_c_t _G_e_n_e_S_e_t _i_n_s_t_a_n_c_e_s

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

     Use 'GeneSet' to construct gene sets from 'ExpressionSet',
     character vector, or other objects.

_U_s_a_g_e:

     GeneSet(type, ..., setIdentifier=.uniqueIdentifier())

_A_r_g_u_m_e_n_t_s:

    type: An argument determining how the gene set will be created, as
          described in the Methods section.

setIdentifier: A 'ScalarCharacter' or length-1 character vector
          uniquely identifying the set. The default attempts to use
          'Ruuid' to generate a unique identifier, or if 'Ruuid' is not
          avaiable assigns 'NA'.

     ...: Additional arguments for gene set construction.  Methods have
          required arguments, as outlined below; additional arguments
          correspond to slot names 'GeneSet'.

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


      '_s_i_g_n_a_t_u_r_e(_t_y_p_e = "_m_i_s_s_i_n_g", ..., _s_e_t_I_d_e_n_t_i_f_i_e_r=._u_n_i_q_u_e_I_d_e_n_t_i_f_i_e_r())' 
          Construct an empty gene set.

      '_s_i_g_n_a_t_u_r_e(_t_y_p_e = "_c_h_a_r_a_c_t_e_r", ..., _s_e_t_I_d_e_n_t_i_f_i_e_r=._u_n_i_q_u_e_I_d_e_n_t_i_f_i_e_r())' 
          Construct a gene set using identifiers 'type'.

      '_s_i_g_n_a_t_u_r_e(_t_y_p_e = "_G_e_n_e_I_d_e_n_t_i_f_i_e_r_T_y_p_e", ..., _s_e_t_I_d_e_n_t_i_f_i_e_r=._u_n_i_q_u_e_I_d_e_n_t_i_f_i_e_r())' 
          Construct an empty gene set. The gene set has 'geneIdType'
          created from the 'GeneIdentifierType' of 'type'.

      '_s_i_g_n_a_t_u_r_e(_t_y_p_e = "_E_x_p_r_e_s_s_i_o_n_S_e_t", ..., _s_e_t_I_d_e_n_t_i_f_i_e_r=._u_n_i_q_u_e_I_d_e_n_t_i_f_i_e_r())' 
          Construct a gene set from an 'ExpressionSet'. 'geneIdType' is
          set to 'AnnotationIdentifier'; the annotation field and
          annotation package of the 'ExpressionSet' are consulted to
          determine 'organism', if possible. Short and long
          descriptions from the 'ExpressionSet' 'experimentData' title
          and abstract; pub med ids, urls, and contributor are also
          derived from 'experimentData'.

      '_s_i_g_n_a_t_u_r_e(_t_y_p_e = "_G_O_C_o_l_l_e_c_t_i_o_n", ..., _g_e_n_e_I_d_T_y_p_e, _s_e_t_I_d_e_n_t_i_f_i_e_r=._u_n_i_q_u_e_I_d_e_n_t_i_f_i_e_r())' 
          Use genes contained in 'type' to create a 'GeneSet '. The
          required arugment 'geneIdType' must include a package for
          which an appropriate map (to GO) exists, e.g.,
          'EntrezIdentifier('org.Hs.eg.db')'.


      '_s_i_g_n_a_t_u_r_e(_t_y_p_e = "_B_r_o_a_d_C_o_l_l_e_c_t_i_o_n", ..., _u_r_l_s = _c_h_a_r_a_c_t_e_r(_0), _s_e_t_I_d_e_n_t_i_f_i_e_r=._u_n_i_q_u_e_I_d_e_n_t_i_f_i_e_r())' 
          Read XML following the Broad Institute schema and located at
          'urls' to create a gene set. The url can be a local file or
          internet connection, but must contain just a single gene set.
          See 'getBroadSets' for details.

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

     'GeneSet-class' 'GeneColorSet-class'

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

     ## Empty gene set
     GeneSet()

     ## Gene set from ExpressionSet
     data(sample.ExpressionSet)
     gs1 <- GeneSet(sample.ExpressionSet[100:109])

     ## GeneSet from Broad XML; 'fl' could be a url
     fl <- system.file("extdata", "Broad.xml", package="GSEABase")
     gs2 <- getBroadSets(fl)[[1]] # actually, a list of two gene sets

     ## GeneSet from list of gene identifiers
     geneIds <- geneIds(gs2) # any character vector would do
     gs3 <- GeneSet(geneIds)
     ## unspecified set type, so...
     is(geneIdType(gs3), "NullIdentifier") == TRUE
     ## update set type to match encoding of identifiers
     geneIdType(gs2)
     geneIdType(gs3) <- EntrezIdentifier()
     ## other ways of accomplishing the same
     gs4 <- GeneSet(geneIds, geneIdType=EntrezIdentifier())
     gs5 <- GeneSet(EntrezIdentifier(), geneIds=geneIds)

