bootplot               package:hopach               R Documentation

_f_u_n_c_t_i_o_n _t_o _m_a_k_e _a _b_a_r_p_l_o_t _o_f _b_o_o_t_s_t_r_a_p _e_s_t_i_m_a_t_e_d _c_l_u_s_t_e_r _m_e_m_b_e_r_s_h_i_p _p_r_o_b_a_b_i_l_i_t_i_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     After clustering, the 'boothopach' or 'bootmedoids' function can
     be used to estimated the membership of each element being
     clustered in each of the identified clusters (fuzzy clustering).
     The proportion of bootstrap resampled data sets in which each
     element is assigned to each cluster is called the "reappearance
     proportion" for the element and that cluster. This function plots
     these proportions in a colored barplot.

_U_s_a_g_e:

     bootplot(bootobj, hopachobj, ord = "bootp", main = NULL, labels = NULL, 
     showclusters = TRUE, ...)

_A_r_g_u_m_e_n_t_s:

 bootobj: output of 'boothopach' or 'bootmedoids' applied to the genes
          - a matrix of bootstrap estimated cluster membership
          probabilities, with a row for each row in 'data' and a column
          for each cluster.

hopachobj: output of the 'hopach' function. If 'bootobj' was generated
          using 'bootmedoids' (i.e. 'hopach' was not run), then the
          'bootplot' function can be used by creating a 'hopachobj'
          which is a list with at least the following two components:
          'hopachobj$clustering$sizes' (number of elements in each
          cluster - length should be 'ncol(bootobj)' and
          'hopachobj$clustering$order' (an ordering of the elements so
          that elements in the same cluster appear next to each other
          and elements may also be ordered within cluster). By changing
          the value of 'hopachobj$clustering$order', the order of the
          elements in the barplot can be altered.

     ord: character string indicating how to order the elements (rows)
          in the barplot. If ord="none", then the elements are plotted
          in the same order as in 'bootobj', i.e. the same order as the
          original data matrix. If ord="final", the ordering of
          elements in the final level of the 'hopach' hierarchical tree
          is used. If ord="cluster", the ordering from the level of the
          'hopach' tree corresponding to the main clusters is used. If
          ord="bootp", the elements are ordered first by main cluster
          and then by bootstrap reappearance proportion within cluster,
          so that elements with the highest membership in the cluster
          appear at the bottom. In the last three cases, the elements
          from each cluster will be contiguous. If ord="final", then
          the medoid element will appear in the middle of each cluster.
          If ord="clust", the ordering depends on the value of the
          'ord' argument passed to the 'hopach' function.  For example,
          when ord="own" in 'hopach', the elements are ordered within
          cluster based on distance to the medoid, so that the medoid
          appears first (at the bottom) in the cluster.

    main: character string to be used as the main title

  labels: a vector of labels for the elements being clustered to be
          used on the axes. If the number of elements is lager than 50,
          the labels are not shown.

showclusters: indicator of whether or not to show the cluster
          boundaries on the plot. If show.clusters=TRUE, solid lines
          are drawn at the edges of the clusters.

     ...: additional arguments to the 'barplot' plotting function

_D_e_t_a_i_l_s:

     Each cluster (column of 'bootobj') is represented by a color. The
     proportion of bootstrap resampled data sets in which an element
     appeared in that cluster determines the proportion of the bar for
     that element which is the corresponding color. As a key, the
     clusters are labeled on the right margin in text of the same
     color.

_V_a_l_u_e:

     The function 'bootplot' has no value. It does generate a plot.

_N_o_t_e:

     Thank you to Sandrine Dudoit <sandrine@stat.berkeley.edu> for her
     input and to Jenny Bryan for the original clusplot code.

_A_u_t_h_o_r(_s):

     Katherine S. Pollard <kpollard@soe.ucsc.edu>

_R_e_f_e_r_e_n_c_e_s:

     van der Laan, M.J. and Pollard, K.S. A new algorithm for hybrid
     hierarchical clustering with visualization and the bootstrap.
     Journal of Statistical Planning and Inference, 2003, 117, pp.
     275-303.

     <URL:
     http://www.stat.berkeley.edu/~laan/Research/Research_subpages/Papers/hopach.pdf>

_S_e_e _A_l_s_o:

     'hopach', 'boothopach', 'bootmedoids', 'barplot'

_E_x_a_m_p_l_e_s:

     mydata<-rbind(cbind(rnorm(10,0,0.5),rnorm(10,0,0.5),rnorm(10,0,0.5)),cbind(rnorm(15,5,0.5),rnorm(15,5,0.5),rnorm(15,5,0.5)))
     dimnames(mydata)<-list(paste("Var",1:25,sep=""),paste("Exp",1:3,sep=""))
     mydist<-distancematrix(mydata,d="euclid")

     #hopach clustering
     clustresult<-hopach(mydata,dmat=mydist)

     #bootstrap
     myobj<-boothopach(mydata,clustresult)

     #plots
     bootplot(myobj,clustresult,showclusters=FALSE)
     bootplot(myobj,clustresult,labels=paste("Sample",LETTERS[1:25],sep=" "))

