GeneSetCollection-class       package:GSEABase       R Documentation

_C_l_a_s_s "_G_e_n_e_S_e_t_C_o_l_l_e_c_t_i_o_n"

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

     a 'GeneSetCollection' is a collection of related 'GeneSet's. The
     collection can mix and match different types of gene sets. Members
     of the collection are refered to by the 'setName's of each gene
     set.

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

     Construct a 'GeneSetCollection' with a 'GeneSetCollection' method,
     e.g., from a list of gene sets or with several gene sets provided
     as argument to the constructor. See examples below.

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


     '._D_a_t_a': Object of class '"list"', containing the gene sets.

_E_x_t_e_n_d_s:

     Class '"list"', from data part. Class '"vector"', by class "list",
     distance 2. Class '"AssayData"', by class "list", distance 2.

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

     Gene set collection construction

     _G_e_n_e_S_e_t_C_o_l_l_e_c_t_i_o_n See 'GeneSetCollection' methods and
          'getBroadSets' for convenient construction methods.

     Collection access (operations on lists, such as 'length', ,
     'lapply' also work on 'GeneSetCollection').

     _g_e_n_e_I_d_s 'signature(object = "GeneSetCollection")': return a list,
          with each member a character vector of gene identifiers from
          the gene set collection.

     _g_e_n_e_I_d_s<- 'signature(object="GeneSetCollection", value="list")':
          assign character vectors in 'value' to corresponding
          'geneIds' of 'object'.

     _n_a_m_e_s 'signature(x = "GeneSetCollection")': return the 'setName'
          of each gene set in the colloection.

     Logical and subsetting operations

     _u_n_i_o_n 'signature(x = "GeneSetCollection", y = "ANY")',
          'signature(x = "ANY", y = "GeneSetCollection")': ...

     | 'signature(e1 = "GeneSetCollection", e2 = "ANY")', 'signautre(e1
          = "GeneSet", e2 = "GeneSetCollection")', 'signautre(e1 =
          "character", e2 = "GeneSetCollection")', 'signature(e1 =
          "ANY", e2 = "GeneSetCollection")': calculate the logical `or`
          (union) of all gene identifiers in an object over all members
          of the gene set collection. 

     _i_n_t_e_r_s_e_c_t 'signature(x = "GeneSetCollection", y = "ANY")',
          'signature(x = "ANY", y = "GeneSetCollection")': ...

     & 'signature(e1 = "GeneSetCollection", e2 = "ANY")', 'signautre(e1
          = "character", e2 = "GeneSetCollection")', 'signautre(e1 =
          "GeneSet", e2 = "GeneSetCollection")', 'signature(e1 = "ANY",
          e2 = "GeneSetCollection")': calculate the logical `and'
          (intersection) of all gene identifiers in a gene set or
          character vector, over all members of the gene set
          collection. 

     _s_e_t_d_i_f_f 'signature(x = "GeneSetCollection", y = "ANY")': calculate
          the logical set difference betwen all gene sets in a
          collection and the gene identifiers of a gene set or
          character vector. A 'setdiff' method must be available for
          'x="GeneSet"' and the type of 'y'. 

     [<- 'signature(x = "GeneSetCollection", i = "ANY", j = "ANY",
          value = "ANY")', 'signature(x = "GeneSetCollection", i =
          "ANY", j = "ANY", value = "GeneSet")', 'signature(x =
          "GeneSetCollection", i = "character", j = "ANY", value =
          "GeneSet")': assign new sets to existing set members. To add
          entirely new sets, use a 'GeneSetCollection' constructor.

     [ 'signature(x = "GeneSetCollection", i = "logical")', 
          'signature(x = "GeneSetCollection", i = "numeric")',
          'signature(x = "GeneSetCollection", i = "character")': create
          a 'GeneSetCollection' consisting of a subset of the current
          set. All indicies 'i' must already be present in the set.

     [[ 'signature(x = "GeneSetCollection", i = "character")':  Select
          a single gene set from the collection. Methods for
          'i="numeric"' are inherited from 'list'.

     [[<- 'signature(x = "GeneSetCollection", i = "ANY", j = "ANY",
          value = "ANY")', 'signature(x = "GeneSetCollection", i =
          "numeric", j = "ANY", value = "GeneSet")', 'signature(x =
          "GeneSetCollection", i = "character", j = "ANY", value =
          "GeneSet")': Replace a gene set in the collecton with
          another. 'value = "ANY"' serves to stop invalid assignments. 

     Additional useful methods.


     _u_p_d_a_t_e_O_b_j_e_c_t Objects created in previous versions of GSEABase may
          be incompatible with current object definitions. Usually this
          is singalled by an error suggesting that a slot is missing,
          and a recommnedation to use 'updateObject'. Use
          'updateObject' to update a 'GeneSetCollection' and all
          contained 'GeneSets' to their current defintion.

     _m_a_p_I_d_e_n_t_i_f_i_e_r_s Convert genes from one 'GeneIdentifierType' to
          another. See 'mapIdentifiers' and specific methods in
          'GeneIdentifierType' for additional detail.

     _i_n_c_i_d_e_n_c_e Summarize shared membership in genes across gene sets.
          See 'incidence-methods'.

     _t_o_G_m_t Export to 'GMT' format file. See 'toGmt'.

     _s_h_o_w 'signature(object="GeneSetCollection")': provide a compact
          representation of 'object'.

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

     Martin Morgan <mtmorgan@fhcrc.org>

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

     'GeneSet', 'GeneColorSet'.

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

     gs1 <- GeneSet(setName="set1", setIdentifier="101")
     gs2 <- GeneSet(setName="set2", setIdentifier="102")

     ## construct from indivdiual elements...
     gsc <- GeneSetCollection(gs1, gs2)
     ## or from a list
     gsc <- GeneSetCollection(list(gs1, gs2))

     ## 'names' are the setNames
     names(gsc)

     ## a collection of a single gene set
     gsc["set1"]
     ## a gene set
     gsc[["set1"]]

     ## set names must be unique
     try(GeneSetCollection(gs1, gs1))
     try(gsc[c("set1", "set1")])

