plotBins              package:flowStats              R Documentation

_P_l_o_t_s _t_h_e _p_r_o_b_a_b_i_l_i_t_y _b_i_n_s _o_v_e_r_l_a_i_d _w_i_t_h _f_l_o_w_F_r_a_m_e _d_a_t_a

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

     This function is useful in visualizing the differences between the
     binned control and sample datasets. The bins generated from the
     control dataset are  overlaid with the sample dataset. An optional
     argument residuals can be used to  shade each bin based on a
     calculated statistical measure of difference between  the number
     of events in each bin.

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

     plotBins(binRes,data,channels,title,residuals,shadeFactor)

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

  binRes: The result generated by calling the 'probBin' function on a
          control dataset.

    data: An object of class 'flowFrame' sample(dataset)

channels: The flow parameters to be plotted.In cases where more than
          two parameters are binned from the control set, the
          'plotBins' function plots the projections of the hyperplanes
          in 2 dimensions)

   title: Optional title for the plot generated

residuals: A vector of length equal to the number of bins generated
          that can be used to shade each bin. The residuals from the
          'calcPearsonChi' function or the 'calcPBChiSquare' function
          can be used to highlight the bins that are different between
          control and sample datasets

shadeFactor: Optional argument between 0 and 1 that controls the
          intensity of the shading of bins

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

     Nishant Gopalakrishnan

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

     'proBin', 'calcPearsonChi', 'calcPBChiSquare'

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

     data(GvHD)
     # flow frame 1 is treated as  control dataset and used to generate bins
     resCtrl<-proBin(GvHD[[1]][,c("FSC-H","SSC-H","Time")],200)  
     plotBins(resCtrl,GvHD[[1]],channels=c("FSC-H","SSC-H"),title="Binned control data")
     # Same bins are applied to flowFrame 16
     resSample<-binByRef(resCtrl,GvHD[[16]][,c("FSC-H","SSC-H","Time")])
     stat<-calcPearsonChi(resCtrl,resSample)
     dev.new()
     plotBins(resCtrl,data=GvHD[[16]],channels=c("FSC-H","SSC-H","Time"),title="Comparision 1 & 16",
     residuals=stat$residuals[2,],shadeFactor=0.7)

