exprSet-class            package:Biobase            R Documentation

_C_l_a_s_s _e_x_p_r_S_e_t, _a _c_l_a_s_s _f_o_r _m_i_c_r_o_a_r_r_a_y _d_a_t_a, _a_n_d _m_e_t_h_o_d_s _f_o_r
_p_r_o_c_e_s_s_i_n_g _t_h_e_m

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

     This is class representation for Microarray Data

_C_r_e_a_t_i_n_g _O_b_j_e_c_t_s:

     '  new('exprSet','
      '    exprs       = ...., # Object of class matrix'
      '    se.exprs    = ...., # Object of class matrix'
      '    phenoData   = ...., # Object of class phenoData'
      '    annotation  = ...., # Object of class character'
      '    description = ...., # Object of class MIAME'
      '    notes       = ...., # Object of class character'
      '  )'

_S_l_o_t_s:

     '_e_x_p_r_s': Object of class "matrix" The observed expression levels.
          This is  a matrix with columns representing patients or cases
          and rows representing genes. 

     '_s_e._e_x_p_r_s': Object of class "matrix" This is a matrix of the same
          dimensions as 'exprs' which contains standard error estimates
          for the estimated expression levels. 

     '_p_h_e_n_o_D_a_t_a': Object of class "phenoData" This is an instance of
          class 'phenoData'  containing the patient (or case) level
          data. The columns of the pData slot of this entity represent
          variables and the rows represent patients or cases. 

     '_a_n_n_o_t_a_t_i_o_n' A character string identifying the annotation that
          may be used for the 'exprSet' instance.

     '_d_e_s_c_r_i_p_t_i_o_n': Object of class "MIAME". For compatibility with
          previous version of this class description can also be a
          "character". The clase 'characterOrMIAME' has been defined
          just for this. 

     '_n_o_t_e_s': Object of class "character" Vector of explanatory text 

_M_e_t_h_o_d_s:

     [ (exprSet): A subset operator. Ensures that both 'exprs' and
          'phenoData' are subset properly. 

     [[ (exprSet): Extract the named variable from the 'phenoData'
          component.     

     _e_x_p_r_s (exprSet): An accessor function for 'exprs'. 

     _s_e._e_x_p_r_s (exprSet): An accessor function for 'se.exprs'. 

     _d_e_s_c_r_i_p_t_i_o_n (exprSet): Obtain the description (MIAME class) of 
          'exprSet'. 

     _d_e_s_c_r_i_p_t_i_o_n<- (exprSet): Set the description (MIAME class) of
          'exprSet'. 

     _n_o_t_e_s (exprSet): Obtain the notes of  'exprSet'. 

     _n_o_t_e_s<- (exprSet): Set the notes of 'exprSet'. 

     _g_e_n_e_N_a_m_e_s (exprSet): Obtain the gene names (row names) of 'exprs'. 

     _g_e_n_e_N_a_m_e_s<- (exprSet): Set the gene names (row names) of 'exprs'. 

     _i_t_e_r (exprSet, missing, function): an iterator over genes. Returns
          the result of applying 'function' to the matrix of
          expressions on margin 1 (see 'apply') 

     _i_t_e_r (exprSet, missing, list): a multi-iterator over genes.
          Concatenates result of applying each function in the list
          'list' in a matrix (assumes result of each function
          evaluation is a scalar). 

     _i_t_e_r (exprSet, covlab=character, function): a iterator over genes:
          'function' is assumed to have arguments x and y; the pData
          element named by covlab will be bound to x, the gene
          expression values will be iteratively bound to y

     _p_h_e_n_o_D_a_t_a (exprSet): An accessor function returns the 'phenoData'
          instance from the 'exprSet'.

     _p_D_a_t_a (exprSet): An accessor function for the 'pData' slot of the
          'phenoData' contained in the instance.

     _p_D_a_t_a<- (exprSet): A replacement method for the 'pData' slot of
          the 'phenoData' contained in the instance.

     _s_a_m_p_l_e_N_a_m_e_s (exprSet): An accessor function for sample labels.
          These are the column labels of 'exprs' and the row labels
          from 'pData'. The function takes preferably the column labels
          of 'exprs' (if any).

     _s_a_m_p_l_e_N_a_m_e_s<- (exprSet): A replacement method that sets the sample
          names to new values. The values must be 'character' and the
          length of the vector must be equal to the number of samples.


     _s_h_o_w (exprSet): renders information about the exprSet in a concise
          way on stdout. 

     _s_p_l_i_t (exprSet, factor): see method for 'vector'

     _s_p_l_i_t (exprSet, vector): splits the exprSet. The returned value is
          a list, each component of which is an 'exprSet'. If the
          length of 'vector' is a divisor of the number of rows of the
          phenoData data frame then the split is made on this.

     _a_n_n_o_t_a_t_i_o_n (exprSet): An accessor function for the annotation
          information.

     _w_r_i_t_e._e_x_p_r_s (exprSet,...): Writes the expression levels to file.
          It takes the same arguments as 'write.table'. If called with
          no arguments it is equivalent to
          write.table(exprs(exprSet),file="tmp.txt",quote=FALSE,sep="\t
          "). 

     _e_x_p_r_s_2_e_x_c_e_l (exprSet,...):  Writes the expression levels to 'csv'
          file. This file will open nicely in excel. It takes the same
          arguments as 'write.table'. If  called with no arguments it
          is equivalent to 'write.table(exprs(exprSet),file="tmp.csv",
          sep = ",", col.names = NA)'.

     $ An old-style method. It is 'pData(eset)[[as.character(val)]]'
          which does not quite have the right semantics but it is
          close. This operator extracts the named component of the
          'pData' slot in 'phenoData'.

     _u_p_d_a_t_e_2_M_I_A_M_E (exprSet,...): Converts 'exprSet's from previous
          versions, that have a 'character' in description to an object
          that has an instance of the class 'MIAME' in the description
          slot. The old description is stored in the 'title' slot. If
          the object already has a 'MIAME' description the same object
          is returned.

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

     'MIAME-class', 'phenoData-class'

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

       data(geneData)
       data(geneCov)
       covdesc<- list("Covariate 1", "Covariate 2", "Covariate 3")
       names(covdesc) <- names(geneCov)
       pdata <- new("phenoData", pData=geneCov, varLabels=covdesc)
       pdata[1,]
       pdata[,2]

       eset <- new("exprSet", exprs=geneData, phenoData=pdata)
       eset
       eset[,1:10]
       eset[,1]
       eset[1,]
       eset[1,1]
       eset[1:100,]
       eset[1:44,c(2,4,6)]
       Means <- iter(eset, f=mean)

       chkdich <- function(x) if(length(unique(x))!=2) stop("x not dichotomous")
       mytt <- function(x,y) {
          chkdich(x)
          d <- split(y,x)
          t.test(d[[1]],d[[2]])$p.val
       }
       
       Tpvals <- iter(eset, "cov1", mytt )

       sp1 <- split(eset, c(1,2))
       sp2 <- split(eset, c(rep(1,6), rep(2,7)))

       sampleNames(eset)
       sampleNames(eset) <- letters

