maSigPro                   package:maSigPro                   Documentation

Wrapping function for visualization of gene expression values of time course experiments

Description:

     'maSigPro' performs a whole maSigPro analysis for a times series gene expression experiment.
      The function sucesively calls the functions 'make.design.matrix'(optional), 'p.vector', 'AIC.fit',
      'get.siggenes', 'see.genes'   

Usage:

      maSigPro(edesign, time.col = 1, repl.col = 2, group.cols = c(3:ncol(edesign)), data,  matrix ="AUTO", Q = 0.01, 
      grade = 2, min.obs = 3, step.method = "backward", rsq = 0,pb = 1,pa = 1,  vars = "groups",groups.vector = NULL,
      add.IDs = FALSE,  IDs = NULL, matchID.col = 1, only.names = FALSE, trat.repl.spots = "none", index = IDs[,(matchID.col+1)], 
      match= IDs[,matchID.col], rs = 0.7, cluster.data = 2, k = 9, cluster.method = "hclust", distance = "cor", 
      agglo.method = "complete", iter.max = 500, show.fit = T, betas = NULL, show.lines = T, main = NULL, ...)

Arguments:

     edesign: matrix of experimental design,
          (argument of 'make.desing.matrix' and 'see.genes')

     time.col: column in edesign containing time values. Default is first column
          (argument of 'make.design.matrix' and 'see.genes')
               
     repl.col: column in edesign containing coding for replicates arrays. Default is second column
          (argument of 'make.design.matrix' and 'see.genes')

     group.cols: columns in edesing indicating the coding for each group of the experiment (see 'make.design.matrix')
          (argument of 'make.design.matrix' and 'see.genes')

     data: matrix containing normalized gene expression data. Genes must be in rows and arrays in columns 
          (argument of 'p.vector')

     matrix: desing matrix for regression analysis. By default design is calculated with make.design.matrix
          (argument of 'p.vector' and 'AIC.fit', by default computed by 'make.desing.matrix')

     Q: level of false discovery rate (FDR) control
          (argument of 'p.vector')     

     min.obs: Genes with less than this number of true numerical values will be excluded from the analysis
          (argument of 'p.vector')

     degree: the degree of the regression fit polynome. grade=1 return lineal regression, grade=2 returns quadratic regression, and so on...
          (argument of 'T.fit')

     step.method: Method for AIC-based fit. Can be either 'backward' or 'forward'
          (argument of 'AIC.fit')

     rsq: cutoff level at the R-squared value for the regression fit. Only genes with R-squared > rsq are selected
          (argument of 'AIC.fit')

     pa: cutoff level at the p.value of the regression ANOVA. Only genes with p.value (anova) < pa are selected
          (argument of 'AIC.fit')
  
     pb: cutoff level at the p.value of the coefficients of  each variable included in the best model. 
          Only variables with p.value (coefficients) < pb are selected
          (argument of 'AIC.fit')   
    
     vars: variables for which to extract significant genes
         (argument of 'get.siggenes')
   
     groups.vector: vector indicating experimental group of each variable 
          (argument of 'get.siggenes' and 'see.genes', by default computed by 'make.desing.matrix')

     add.IDs: logical indicating whether to include additional gene id's in the significant genes result 
         (argument of 'get.siggenes')
    
     IDs: matrix contaning additional gene id information (required when add.IDs = TRUE)
         (argument of 'get.siggenes')

     matchID.col: number of matching column in matrix IDs for adding genes ids
         (argument of 'get.siggenes')

     only.names: logical. If TRUE, expression values are ommited in the significant genes result
         (argument of 'get.siggenes')

     trat.repl.spots: treatment givent to replicate spots. Possible values are 'none' and 'average'
         (argument of 'get.siggenes')

     index, match: argument of the average.rows function to use when trat.repl.spots = 'average'
         (argument of 'get.siggenes')

     r: minimun pearson correlation coefficient for replicated spots profiles to be averaged
         (argument of 'get.siggenes')

     cluster.data: Type of data used by the cluster algorithm
         (argument of 'see.genes')

     k: number of clusters
         (argument of 'see.genes')

     cluster.method: clustering method for data partioning
         (argument of 'see.genes')

     distance: Distance measurement function used when cluster.method = 'hclust'
         (argument of 'see.genes')

     agglo.method: aggregation method used when cluster.method = 'hclust'
         (argument of 'see.genes')
  
     iter.max: max. number of iteration when cluster.method = 'kmeans'
         (argument of 'see.genes')

     show.fit: Logical indicating whether regression fit curves must be plotted
         (argument of 'see.genes')
    
     betas: Required when show.fit = TRUE. Matrix of regression coefficients. By default betas are taken from data object
         (argument of 'see.genes')

     show.lines: Logical indicating whether a line must be drawn joining plotted data points for reach group
         (argument of 'see.genes')

     main: title for plotting functions
         (argument of 'see.genes')

     ...: further arguments to be passed for plotting functions
    
Details:

    maSigPro finds and display genes with significant profile differences in time series gene expression experiments.
    The main, compulsory, input parameters for this function are a matrix of gene expression data (see 'p.vector' for details)
    and a matrix describing  experimental design (see 'make.design.matrix' or 'p.vector' for details). In case extended
    gene ID information is wanted to be included in the significant genes result, a third IDs matrix containing this 
    information will be required (see 'get.siggenes' for details).

    Basiscally in the function calls subsequent steps of the maSigPro approach which is:
       . Make a general regression model with dummies to indicate different experimental groups
       . Select significant genes on the basis of this general model, applying fdr control
       . Find significant variables for each gene, using  AIC-based stepwise regression
       . Extract and display significant genes for any set of variables or experimental groups
 
Value:

    sig.genes: list of significant genes for each of the variables given in vars. The cluster assigment of
       each gene is given in the last column of the sig.profiles list component

    input.data: input analysis data

    G: number of input genes
  
    edesign: matrix of experimental design 

    dis: regression fit design matrix 

    p.vector: vector containing the computed p.values 

    variables: variables in the complete regression model

    g: number of signifant genes

    p.vector.alfa: p.vlaue at FDR = Q control

    step.method: imputed step method for AIC-based regression

    Q: imputed value for false discovery rate (FDR) control

    aic.alfas: ector containing the p.vlaue at FDR = Q control for each variable

    select.vars: variables for which significant genes were extracted

    cl.algo.used; cluster algorimth used for data visualization 

    groups: groups matrix used for plotting functions

References:

     Conesa, A   aconesa@ivia.es
     Nueda, MJ   mj.nueda@ua.es


