calculateLpeAdj            package:LPEadj            R Documentation

_E_v_a_l_u_a_t_e_s _l_o_c_a_l _p_o_o_l_e_d _e_r_r_o_r _s_i_g_n_i_f_i_c_a_n_c_e _t_e_s_t _w_i_t_h _u_s_e_r _c_h_o_s_e_n
_v_a_r_i_a_n_c_e _a_d_j_u_s_t_m_e_n_t_s.

_D_e_s_c_r_i_p_t_i_o_n:

     The local pooled error test attempts to reduce dependence on the
     within-gene estimates in tests for differential expression, by
     pooling error estimates within regions of similar intensity. Note
     that with the large number of genes there will be genes with low
     within-gene error estimates by chance, so that some
     signal-to-noise ratios will be large regardless of mean expression
     intensities and fold-change. The local pooled error attempts to
     avert this by combining within-gene error estimates with those of
     genes with similar expression intensity.

_U_s_a_g_e:

       calculateLpeAdj(x, y, basevar.x,basevar.y, df=10, array.type="olig", 
           probe.set.name="OLIG.probe.name", trim.percent=5, adjust1=1.57, adjust2=1.57)

_A_r_g_u_m_e_n_t_s:

       x: Replicated data from first experimental condition (as matrix 
          or data-frame)

       y: Replicated data from second experimental condition (as matrix
           or data-frame)

basevar.x: Baseline distribution of first condition obtained from 
          function baseOlig.error

basevar.y: Baseline distribution of second condition obtained from 
          function baseOlig.error

      df: Degrees of freedom used in fitting smooth.spline to estimates
          of var.M for bins in A

array.type: Currently supports oligo arrays

probe.set.name: Gene IDs. By default if they are not provided then
          1,2,3,... is assigned as GeneID

trim.percent: Percent of (A, var.M) estimates to trim from low  end of
          A

 adjust1: adjustment factor of variance for first group

 adjust2: adjustment factor of variance for second group

_D_e_t_a_i_l_s:

     The LPE test statistic numerator is the difference in medians
     between the two experimental conditions. The test statistic
     denominator is the combined pooled standard error for the two
     experimental conditions obtained by looking up the var.M from each
     baseOlig.error variance function. The conversion to p-values is
     based on the Gaussian distribution for difference if order
     statistics (medians). The user may select bith the smoother
     degrees of freedom (smaller is smoother) and the trim percent to
     obtain a variance fucntion to suit particular  issues i.e.
     variability of genes with low expression intensity. The default
     values for the adjustment of the variances of the two groups is
     the asymptotically correct value of pi/2.  This value is biased at
     small sample values and unbiased adjustment parameters based on
     sample size can be used instead. See documentation of lpeAdj for
     details.

_V_a_l_u_e:

     Data frame including x, median of x, y, median of y, median
     difference of (x,y), pooled standard deviation of difference, LPE
     p-value, outlier flag, probability of an outlier within x or y.

_A_u_t_h_o_r(_s):

     Carl Murie carl.murie@mcgill.ca, Nitin Jain nitin.jain@pfizer.com

_R_e_f_e_r_e_n_c_e_s:

     J.K. Lee and M.O.Connell(2003). _An S-Plus library for the
     analysis of differential expression_. In The Analysis of Gene
     Expression Data: Methods and Software. Edited by G. Parmigiani, ES
     Garrett, RA Irizarry ad SL Zegar. Springer, NewYork.

     Jain et. al. (2003) _Local pooled error test for identifying
     differentially expressed genes with a small number of replicated
     microarrays_, Bioinformatics, 1945-1951.

     Jain et. al. (2005) _Rank-invariant resampling based estimation of
     false discovery rate for analysis of small sample microarray
     data_, BMC Bioinformatics, Vol 6, 187.

_S_e_e _A_l_s_o:

     'lpeAdj'

_E_x_a_m_p_l_e_s:

        
      # Loading the library and the data
      library(LPEadj)
      data(Ley)

      ADJ.VALUES <- c(1, 1, 1.34585905516761 ,1.19363228146169 ,1.436849413109
                       ,1.289652132873 ,1.47658053092781 ,1.34382984852146
                       ,1.49972130857404, 1.3835405678718)
                 
      dim(Ley)
      # Gives 12488*7 
      # First column is ID.


      # Subsetting the data
      subset.Ley <- Ley[1:1000,]
       
      subset.Ley[,2:7] <- preprocess(subset.Ley[,2:7],data.type="MAS5")
       
      # Finding the baseline distribution of condition 1 and 2.
      var.1 <- adjBaseOlig.error(subset.Ley[,2:4], q=0.01, setMax1=FALSE)
      var.2 <- adjBaseOlig.error(subset.Ley[,5:7], q=0.01, setMax1=FALSE)
      
      # Applying LPE
      lpe.result <- calculateLpeAdj(subset.Ley[,2:4],subset.Ley[,5:7], var.1, var.2,
                     probe.set.name=subset.Ley[,1], adjust1=ADJ.VALUES[3],
                     adjust2=ADJ.VALUES[3])
       

