export                  package:xps                  R Documentation

_E_x_p_o_r_t _d_a_t_a _a_s _t_e_x_t _f_i_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     Export data from classes 'SchemeTreeSet', 'DataTreeSet',
     'ExprTreeSet', or 'CallTreeSet' to 'outfile'.

_U_s_a_g_e:

     export.scheme(xps.scheme, treetype = character(0), varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

     export.data(xps.data, treename = "*", treetype = "cel", varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

     export.expr(xps.expr, treename = "*", treetype = character(0), varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

     export.call(xps.call, treename = "*", treetype = character(0), varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

     export(object, ...)

_A_r_g_u_m_e_n_t_s:

xps.scheme: an object of type 'SchemeTreeSet'.

xps.data: an object of type 'DataTreeSet'.

xps.expr: an object of type 'ExprTreeSet'.

xps.call: an object of type 'CallTreeSet'.

treename: vector of tree names to export.

treetype: type of tree(s) to export, see 'validTreetype'

 varlist: names of tree leaves to export

 outfile: name of output file.

     sep: column separator

as.dataframe: if 'TRUE' a data.frame will be returned.

 verbose: logical, if 'TRUE' print status information.

  object: object of class 'DataTreeSet'.

     ...: arguments
          'treenames','treetype','varlist','outfile','sep','as.dataframe'.

_D_e_t_a_i_l_s:

     Export data from classes 'SchemeTreeSet', 'DataTreeSet',
     'ExprTreeSet', or 'CallTreeSet' to 'outfile'.

     Parameter 'varlist' lists the parameters to export: 
      - parameters are separated by ":", e.g.
     'varlist="fInten:fStdev"'. 
      - for 'varlist="*"' all valid parameters will be exported.

     For class 'DataTreeSet' the following 'varlist' parameters are
     valid:

         'fInten':    intensities from e.g. tree.cel.
         'fStdev':    standard deviation from e.g. tree.cel.
         'fNPixels':  number of pixels from e.g. tree.cel.
         'fBg':       background values (background trees only).

     For classes 'ExprTreeSet' and 'CallTreeSet' 'varlist' can contain
     annotation parameters and parameters of the resulting data. 
      Following 'varlist' annotation parameters are valid:

         'fUnitName':      unit name (probeset ID).
         'fTranscriptID':  transcript_id (probeset ID).
         'fName':          gene name.
         'fSymbol':        gene symbol.
         'fAccession':     mRNA accession such as Refseq ID.
         'fEntrezID':      entrez ID.
         'fChromosome':    chromosome.
         'fStart':         start position.
         'fStop':          stop position.
         'fStrand':        strand on chromosome.
         'fCytoBand':      cytoband.

     Following 'varlist' parameters are valid for 'ExprTreeSet':

         'fLevel':   expression level.
         'fStdev':   standard deviation.
         'fNPairs':  number of pairs.

     Following 'varlist' parameters are valid for 'CallTreeSet':

         'fCall':    detection call.
         'fPValue':  detection p-value.

     An example:
     'varlist="fUnitName:fName:fSymbol:fLevel:fStdev:fEntrezID"'

     'export' is a generic method to export data from 'ROOT' trees as
     text file.

_V_a_l_u_e:

     If 'as.dataframe' is 'TRUE', the data will be imported into the
     current R session as 'data.frame'. Otherwise, 'NULL' will be
     returned.

_A_u_t_h_o_r(_s):

     Christian Stratowa

_S_e_e _A_l_s_o:

     'export-methods'

_E_x_a_m_p_l_e_s:

     ## load existing ROOT scheme file and ROOT data file
     scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
     data.test3 <- root.data(scheme.test3, paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

     ## export as table only
     export(scheme.test3, treetype="idx", outfile="Test3_idx.txt",verbose=FALSE)

     ## export as table and import as data.frame
     ann <- export.scheme(scheme.test3, treetype="ann", outfile="Test3_ann.txt",as.dataframe=TRUE,verbose=FALSE)
     head(ann)
     data <- export.data(data.test3, outfile="Test3_cel.txt",as.dataframe=TRUE,verbose=FALSE)
     head(data)

