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)

