DEResult                package:puma                R Documentation

_C_l_a_s_s _D_E_R_e_s_u_l_t

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

     Class to contain and describe results of a differential expression
     (DE) analysis. The main components are 'statistic' which hold the
     results of any statistic (e.g. p-values, PPLR values, etc.), and
     'FC' which hold the fold changes.

_C_r_e_a_t_i_n_g _O_b_j_e_c_t_s:

     'DEResult' objects will generally be created using one of the
     functions 'pumaDE', 'calculateLimma', 'calculateFC' or
     'calculateTtest'.

     Objects can also be created from scratch:

     'new("DEResult")'

     'new("DEResult", statistic=matrix() ,       FC=matrix() ,      
     statisticDescription="unknown" ,       DEMethod="unknown" ) '

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


     '_s_t_a_t_i_s_t_i_c': Object of class "matrix" holding the statistics
          returned by the DE method.

     '_F_C': Object of class "matrix" holding the fold changes returned
          by the DE method.

     '_s_t_a_t_i_s_t_i_c_D_e_s_c_r_i_p_t_i_o_n': A text description of the contents of the
          'statistic' slot.

     '_D_E_M_e_t_h_o_d': A string indicating which DE method was used to create
          the object.

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

     Class-specific methods.

     '_s_t_a_t_i_s_t_i_c(_D_E_R_e_s_u_l_t)', '_s_t_a_t_i_s_t_i_c(_D_E_R_e_s_u_l_t,_m_a_t_r_i_x)<-' Access and
          set the 'statistic' slot.

     '_F_C(_D_E_R_e_s_u_l_t)', '_F_C(_D_E_R_e_s_u_l_t,_m_a_t_r_i_x)<-' Access and set the 'FC'
          slot.

     '_s_t_a_t_i_s_t_i_c_D_e_s_c_r_i_p_t_i_o_n(_D_E_R_e_s_u_l_t)', '_s_t_a_t_i_s_t_i_c_D_e_s_c_r_i_p_t_i_o_n(_D_E_R_e_s_u_l_t,_c_h_a_r_a_c_t_e_r)<-' 
          Access and set the 'statisticDescription' slot.

     '_D_E_M_e_t_h_o_d(_D_E_R_e_s_u_l_t)', '_D_E_M_e_t_h_o_d(_D_E_R_e_s_u_l_t,_c_h_a_r_a_c_t_e_r)<-' Access and
          set the 'DEMethod' slot.

     '_p_L_i_k_e_V_a_l_u_e_s(_o_b_j_e_c_t, _c_o_n_t_r_a_s_t=_1, _d_i_r_e_c_t_i_o_n="_e_i_t_h_e_r")' Access the
          statistics of an object of class 'DEResult', converted to
          "p-like values".  If the object holds information on more
          than one contrast, only the values of the statistic for
          contrast number 'contrast' are given. Direction can be
          "either" (meaning we want order genes by probability of being
          either up- or down-regulated), "up" (meaning we want to order
          genes by probability of being up-regulated), or "down"
          (meaning we want to order genes by probability of being
          down-regulated). "p-like values" are defined as values
          between 0 and 1, where 0 identifies the highest probability
          of being differentially expressed, and 1 identifies the
          lowest probability of being differentially expressed. We use
          this so that we can easily compare results from methods that
          provide true p-values (e.g. 'calculateLimma') and methods
          methods that do not provide p-values (e.g. 'pumaDE'). For
          objects created using 'pumaDE', this returns 1-PPLR if the
          direction is "up", PPLR if direction is "down", and
          1-abs(2*(PPLR-0.5)) if direction is "either". For objects
          created using 'calculateLimma' or 'calculateTtest', this
          returns the p-value if direction is "either", ((p-1 *
          sign(FC))/2)+ 0.5, if the direction is "up", and ((1-p *
          sign(FC))/2)+ 0.5 if the direction is "down". For all other
          methods, this returns the rank of the appropriate statistic,
          scaled to lie between 0 and 1. 'contrast' will be returned.

     '_t_o_p_G_e_n_e_s(_o_b_j_e_c_t, _n_u_m_b_e_r_O_f_G_e_n_e_s=_1, _c_o_n_t_r_a_s_t=_1, _d_i_r_e_c_t_i_o_n="_e_i_t_h_e_r")' 
          Returns the index numbers (row numbers) of the genes
          determined to be most likely to be differentially expressed.
          'numberOfGenes' specifies the number of genes to be returned
          by the function. If the object holds information on more than
          one contrast, only the values of the statistic for contrast
          number 'contrast' are given. Direction can be "either"
          (meaning we want order genes by probability of being either
          up- or down-regulated), "up" (meaning we want to order genes
          by probability of being up-ragulated), or "down" (meaning we
          want to order genes by probability of being down-regulated).
          Note that genes are ordered by "p-like values" (see
          'pLikeValues'). 'object' is an object of class 'DEResult'.

     '_t_o_p_G_e_n_e_I_D_s(_o_b_j_e_c_t, _n_u_m_b_e_r_O_f_G_e_n_e_s=_1, _c_o_n_t_r_a_s_t=_1, _d_i_r_e_c_t_i_o_n="_e_i_t_h_e_r")' 
          Returns the Affy IDs (row names) of the genes determined to
          be most likely to be differentially expressed.
          'numberOfGenes' specifies the number of genes to be returned
          by the function. If the object holds information on more than
          one contrast, only the values of the statistic for contrast
          number 'contrast' are given. Direction can be "either"
          (meaning we want order genes by probability of being either
          up- or down-regulated), "up" (meaning we want to order genes
          by probability of being up-ragulated), or "down" (meaning we
          want to order genes by probability of being down-regulated).
          Note that genes are ordered by "p-like values" (see
          'pLikeValues'). 'object' is an object of class 'DEResult'.

     '_n_u_m_b_e_r_O_f_P_r_o_b_e_s_e_t_s(_o_b_j_e_c_t)' Returns the number of probesets
          (number of rows) in an object of class 'DEResult'. This
          method is synonymous with numberOfGenes.

     '_n_u_m_b_e_r_O_f_G_e_n_e_s(_o_b_j_e_c_t)' Returns the number of probesets (number of
          rows) in an object of class 'DEResult'. This method is
          synonymous with numberOfProbesets.

     '_n_u_m_b_e_r_O_f_C_o_n_t_r_a_s_t_s(_o_b_j_e_c_t)' Returns the number of contrasts
          (number of columns) in an object of class 'DEResult'.

     '_w_r_i_t_e._r_e_s_l_t_s(_o_b_j_e_c_t)' 'signature(x = "DEResult")': writes the
          statistics and related fold changes (FCs) to files. It takes
          the same arguments as 'write.table'. The argument "file" does
          not need to set any  extension. The different file marks and
          extension "csv" will be added automatically. The default file
          name is "tmp".  In the final results, statistics are in the
          file "tmp_statistics.csv", and FCs are in  "tmp_FCs.csv"
          respectively.     

     Standard generic methods:


     '_s_h_o_w(_o_b_j_e_c_t)' Informatively display object contents.

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

     Richard D. Pearson

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

     Related methods 'pumaDE', 'calculateLimma', 'calculateFC' or
     'calculateTtest'.

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

     ## Create an example DEResult object
     data(affybatch.example)
     varLabels(affybatch.example) <- "level"
     pData(affybatch.example) <- data.frame("level"=c("twenty","twenty","ten")
         , "batch"=c("A","B","A"), row.names=rownames(pData(affybatch.example)))
     eset_mmgmos <- mmgmos(affybatch.example)
     eset_comb <- pumaComb(eset_mmgmos)
     esetDE <- pumaDE(eset_comb)

     ## Use some of the methods
     statisticDescription(esetDE)
     DEMethod(esetDE)
     numberOfProbesets(esetDE)
     numberOfContrasts(esetDE)
     topGenes(esetDE)
     topGenes(esetDE, 3)
     pLikeValues(esetDE)[topGenes(esetDE,3)]
     topGeneIDs(esetDE, 3)
     topGeneIDs(esetDE, 3, direction="down")

     ## save the expression results into files
     write.reslts(esetDE, file="example")

