bgx                   package:bgx                   R Documentation

_F_u_l_l_y _B_a_y_e_s_i_a_n _i_n_t_e_g_r_a_t_e_d _a_p_p_r_o_a_c_h _t_o _t_h_e _a_n_a_l_y_s_i_s _o_f _A_f_f_y_m_e_t_r_i_x _G_e_n_e_C_h_i_p _d_a_t_a

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

     'bgx' estimates Bayesian Gene eXpression (BGX) measures from an
     AffyBatch object.

     'standalone.bgx' creates various files needed by the bgx
     standalone binary and places them in a directory. One of these
     files is 'infile.txt'. In order to run standalone BGX, compile it
     and run 'bgx <path_to_infile.txt>' from the command line.

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

     bgx(aData, samplesets = NULL, genes = NULL, genesToWatch = NULL,
       burnin = 8192, iter = 16384, output = c("minimal","trace","all"), 
       probeAff = TRUE, probecat_threshold = 100, adaptive = TRUE, rundir = ".")

     standalone.bgx(aData, samplesets = NULL, genes = NULL, genesToWatch = NULL,
       burnin = 8192, iter = 16384, output = c("minimal", "trace", "all"),
       probeAff = TRUE, probecat_threshold = 100,
       adaptive = TRUE, batch_size = 50, optimalAR = 0.44, inputdir = "input")

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

   aData: An 'AffyBatch' object.

samplesets: A numeric vector specifying which condition each array
          belongs to. E.g. if samplesets=c(2,2), then the first two
          replicates belong to one condition and the last two
          replicates belong to another condition. If NULL, each array
          is assumed to belong to a different condition. If the aData
          object contains information about the experiment design in
          its 'phenoData' slot, this argument is not required.

   genes: A numeric vector specifying which genes to analyse. If NULL,
          all genes are analysed.

genesToWatch: A numeric vector specifying which genes to monitor
          closely amongst those chosen to be analysed (see below for
          details).

  burnin: Number of burn-in iterations.

    iter: Number of post burn-in iterations.

  output: One of "minimal", "trace" or "all". See below for details.

probeAff: Stratify the mean (lambda) of the cross-hybridisation
          parameter (H) by categories according to probe-level sequence
          information.

probecat_threshold: Minimum amount of probes per probe affinity
          category.

adaptive: Adapt the variance of the proposals for Metropolis Hastings
          objects (that is: S, H, Lambda, Eta, Sigma and Mu).

batch_size: Size of batches for calculating acceptance ratios and
          updating jumps.

optimalAR: Optimal acceptance ratio.

  rundir: The directory in which to save the output runs.

inputdir: The name of the directory in which to place the input files
          for the standalone binary.

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

   _g_e_n_e_s_T_o_W_a_t_c_h Specify the subset of genes for which thinned samples
        from the full posterior distributions of log(S+1) (x) and
        log(H+1) (y) are collected.

   _o_u_t_p_u_t Output the following to disk:

      "_m_i_n_i_m_a_l" The gene expression measure (muave), thinned samples
           from the full posterior distributions of mu (mu.[1..c]),
           where 'c' is the number of conditions, the integrated
           autocorrelation time (IACT) and the Markov chain Monte Carlo
           Standard Error (MCSE) for each gene under each condition.
           Note that the IACT and MCSE are calculated from the thinned
           samples of mu.

      "_t_r_a_c_e" The same as "minimal" plus thinned samples from the full
           posterior distributions of sigma2 (sigma2.[1..c]), lambda
           (lambda.[1..s]), eta2 (eta2), phi (phi) and tau2 (tau2),
           where 's' is the number of samples. If there are probes with
           unknown sequences, output a thinned trace of their
           categorisation.

      "_a_l_l" The same as "trace" plus acceptance ratios for S (sacc), H
           (hacc), mu (muacc), sigma (sigmaacc), eta (etaacc) and
           lambda (lambdasacc).

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

     'bgx' returns an 'ExpressionSet' object containing gene expression
     information for each gene under each condition (not each
     replicate).

     'standalone.bgx' returns the path to the BGX input files.

_N_o_t_e:

     The bgx() method and the bgx standalone binary create a directory
     in the working directory called 'run.x' (x:1,2,3,...), wherein
     files are placed for further detailed analysis.

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

     Ernest Turro

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

     Hein, A., Richardson, S., Causton, H., Ambler, G., Green., P.
     (2005) BGX: a fully Bayesian integrated approach to the analysis
     of Affymetrix GeneChip data. Biostatistics (2005), 6, 3, pp.
     349-373.

     Hekstra, D., Taussig, A. R., Magnasco, M., and Naef, F. (2003)
     Absolute mRNA concentrations from sequence-specific calibration of
     oligonucleotide array. Nucleic Acids Research, 31. 1962-1968.

     G.O. Roberts and J.S. Rosenthal (September, 2006) Examples of
     Adaptive MCMC.

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

       # This example requires the 'affydata' and 'hgu95av2cdf' packages 
       if(require(affydata) && require(hgu95av2cdf)) {
         data(Dilution)
         eset <- bgx(Dilution, samplesets=c(2,2), probeAff=FALSE, burnin=4096, iter=8192,
           genes=c(12500:12599), output="all", rundir=file.path(tempdir()))
       }

