findgenes                package:gaga                R Documentation

_F_i_n_d _d_i_f_f_e_r_e_n_t_i_a_l_l_y _e_x_p_r_e_s_s_e_d _g_e_n_e_s _a_f_t_e_r _G_a_G_a _f_i_t.

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

     Obtains a list of differentially expressed genes using the
     posterior probabilities from a GaGa or MiGaGa fit. For
     'parametric==TRUE' the procedure controls the Bayesian FDR below
     'fdrmax'. For 'parametric==FALSE' it controls the estimated
     frequentist FDR.

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

     findgenes(gg.fit, x, groups, fdrmax=.05, parametric=TRUE, B=500)

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

  gg.fit: GaGa or MiGaGa fit (object of type 'gagafit', as returned by
          'fitGG'). 

       x: 'ExpressionSet', 'exprSet', data frame or matrix containing
          the gene expression measurements used to fit the model.

  groups: If 'x' is of type 'ExpressionSet' or 'exprSet', 'groups'
          should be the name of the column in 'pData(x)' with the
          groups that one wishes to compare. If 'x' is a matrix or a
          data frame, 'groups' should be a vector indicating to which
          group each column in x corresponds to.

  fdrmax: Upper bound on FDR.

parametric: Set to 'TRUE' to use the Bayes rule. Set to 'FALSE' to
          estimate the frequentist FDR non-parametrically.

       B: Number of boostrap samples to estimate FDR non-parametrically
          (ignored if 'parametric==TRUE')

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

     The Bayes rule to minimize expected FNR subject to FDR '<=fdrmax'
     declares differentially expressed all genes with posterior
     probability of being equally expressed below a certain threshold.
     The value of the threshold is computed exactly for
     'parametric==TRUE', FDR being defined in a Bayesian sense. For
     'parametric==FALSE' the FDR is defined in a frequentist sense.

_V_a_l_u_e:

     List with components: 

    efp : Expected number of true positives.

      d : Vector indicating the pattern that each gene is assigned to.

    fdr : Frequentist estimated FDR that is closest to fdrmax.

  fdrpar: Bayesian FDR. If 'parametric==TRUE', this is equal to
          'fdrmax'. If 'parametric==FALSE', it's the Bayesian FDR
          needed to achieve frequentist estimated FDR='fdrmax'.

  fdrest: Data frame with estimated frequentist FDR for each target
          Bayesian FDR

     fnr: Bayesian FNR

   power: Bayesian power as estimated by expected number of true
          positives divided by the expected number of differentially
          expressed genes

threshold: Optimal threshold for posterior probability of equal
          expression (genes with probability < 'threshold' are declared
          DE)

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

     David Rossell

_R_e_f_e_r_e_n_c_e_s:

     Rossell D. GaGa: a simple and  flexible hierarchical model for
     microarray data analysis. <URL:
     http://rosselldavid.googlepages.com>.

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

     'fitGG', 'parest'

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

     #Not run. Example from the help manual
     #library(gaga)
     #set.seed(10)
     #n <- 100; m <- c(6,6)
     #a0 <- 25.5; nu <- 0.109
     #balpha <- 1.183; nualpha <- 1683
     #probpat <- c(.95,.05)
     #xsim <- simGG(n,m,p.de=probpat[2],a0,nu,balpha,nualpha)
     #
     #ggfit <- fitGG(xsim$x[,c(-6,-12)],groups,patterns=patterns,nclust=1)
     #ggfit <- parest(ggfit,x=xsim$x[,c(-6,-12)],groups,burnin=100,alpha=.05)
     #
     #d <- findgenes(ggfit,xsim$x[,c(-6,-12)],groups,fdrmax=.05,parametric=TRUE)
     #dtrue <- (xsim$l[,1]!=xsim$l[,2])
     #table(d$d,dtrue)

