goCluster FDR analysis       package:goCluster       R Documentation

_S_e_l_e_c_t _i_n_t_e_r_e_s_t_i_n_g _a_n_n_o_t_a_t_i_o_n _t_e_r_m_s _a_f_t_e_r _F_D_R _a_n_a_l_y_s_i_s

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

     These three functions are used to perform FDR analysis within
     'goCluster'. They could be combined to a single function in a
     future version of goCluster.

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

     randomizeTree(X, elements)
     mergeAnno(X, i)
     selectAnnoStats(X, threshold)

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

       X: A lists of lists. 

elements: The total number of selectable elements. 

       i: Index of the annotation to select. 

threshold: Holds p-value thresholds for each annotation. 

_D_e_t_a_i_l_s:

     'randomizeTree' will accept a tree as its input and fills each
     terminal node of the tree with integers that are uniformly
     distributed between 1 and 'elements'. The number of integers is
     determined by the size of the respective terminal node. The minial
     integer possible is one, the maximal integer is given by the
     option 'elements'.  'mergeAnno' also expects a tree as input and
     will return the element 'i' among the list one level above the
     terminal nodes of a leaf. 'selectAnnoStats' will select all
     elements from the tree 'X' that have a p-value below the threshold
     given in the 'threshold' option. The length of the 'threshold'
     element has to match the number of annotations analyzed and
     represented by the tree 'X'.

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

     Gunnar Wrobel, <URL: work@gunnarwrobel.de>, <URL:
     http://www.gunnarwrobel.de>.

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

     'clusterSignifFDR-class'.

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

     set.seed(1000)

     ## Loading the reduced dataset with 100 genes
     data(benomylsetupsmall)

     a <- new("goCluster")

     execute(a) <- benomylsetupsmall

     ## This demonstrates the use of "selectAnnoStats"
     a@sign@statset[[1]][[1]]
     selectAnnoStats(a@sign@statset, 0.1)[[1]][[1]]

     ## Randomizing the clustering result
     randomGroups <- list()

     for (i in 1:4) randomGroups[[i]] <- randomizeTree(a@algo@clusterset, 100)

     ## Four randomized datasets
     randomGroups

     ## The clusters in the original dataset are being replaced
     ## by the randomized dataset. copyA now holds the randomized
     ## data together with the original annotation data which is
     ## necessary in order to perform the statistical analysis
     copyA <- a
     copyA@algo@clusterset <- randomGroups

     ## This executes the statistical function (a@sign@stat) on
     ## the randomized dataset (copyA) and assigns the
     ## result to the randomstat slot that is a specific
     ## slot for the FDR significance analysis
     a@sign@stat <- reset(a@sign@stat)
     a@sign@randomstat <- execute(a@sign@stat, copyA)@statset

     randomStats <- list()

     ## This will merge the results for each of the three annotations
     ## and yields a distribution of p-values based on random gene
     ## selection
     for (i in 1:3) randomStats[[i]] <- unlist(mergeAnno(a@sign@randomstat, i))

     ## This can be used to get information on the density
     hist(randomStats[[1]],plot=FALSE,breaks=20)$density

