diffreport-methods           package:xcms           R Documentation

_C_r_e_a_t_e _r_e_p_o_r_t _o_f _a_n_a_l_y_t_e _d_i_f_f_e_r_e_n_c_e_s

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

     Create a report showing the most significant differences between
     two sets of samples. Optionally create extracted ion chromatograms
     for the most significant differences.

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

  object: the 'xcmsSet' object

  class1: character vector with the first set of sample classes to be
          compared 

  class2: character vector with the second set of sample classes to be
          compared 

filebase: base file name to save report, '.tsv' file and '_eic' will be
          appended to this name for the tabular report and EIC
          directory, respectively. if blank nothing will be saved 

  eicmax: number of the most significantly different analytes to create
          EICs for 

eicwidth: width (in seconds) of EICs produced 

sortpval: logical indicating whether the reports should be sorted by
          p-value 

classeic: character vector with the sample classes to include in the
          EICs 

  metlin: mass uncertainty to use for generating link to Metlin
          metabolite database. the sign of the uncertainty indicates
          negative or positive mode data for M+H or M-H calculation. a
          value of FALSE or 0 removes the column 

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

     This method handles creation of summary reports with statistics
     about which analytes were most significantly different between two
     sets of samples. It computes Welch's two-sample t-statistic for
     each analyte and ranks them by p-value. It returns a summary
     report that can optionally be written out to a tab-separated file.

     Additionally, it does all the heavy lifting involved in creating
     superimposed extracted ion chromatograms for a given number of
     analytes.  It does so by reading the raw data files assoicated
     with the samples of interest one at a time. As it does so, it
     prints the name of the sample it is currently reading. Depending
     on the number and size of the samples, this process can take a
     long time.

     If a base file name is provided, the report (see Value section)
     will be saved to a tab separated file. If EICs are generated, they
     will be saved as 640x480 PNG files in a newly created
     subdirectory. The numbered file names correspond to the rows in
     the report.

     Chromatographic traces in the EICs are colored and labeled by
     their sample class. Sample classes take their color from the
     current palette. The color a sample class is assigned is dependent
     its order in the 'xcmsSet' object, not the order given in the
     class arguments. Thus 'levels(sampclass(object))[1]' would use
     color 'palette()[1]' and so on. In that way, sample classes
     maintian the same color across any number of different generated
     reports.

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

     A data frame with the following columns:

    fold: mean fold change (always greater than 1, see 'tstat' for
          which set of sample classes was higher) 

   tstat: Welch's two sample t-statistic, positive for analytes having
          greater intensity in 'class2', negative for analytes having
          greater intensity in 'class1' 

  pvalue: p-value of t-statistic

   mzmed: median m/z of peaks in the group

   mzmin: minimum m/z of peaks in the group

   mzmax: maximum m/z of peaks in the group

   rtmed: median retention time of peaks in the group

   rtmin: minimum retention time of peaks in the group

   rtmax: maximum retention time of peaks in the group

  npeaks: number of peaks assigned to the group

Sample Classes: number samples from each sample class represented in
          the group 

     ...: one column for every sample class

Sample Names: integrated intensity value for every sample

     ...: one column for every sample

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

     _o_b_j_e_c_t = "_x_c_m_s_S_e_t" 'diffreport(object, class1 =
          levels(sampclass(object))[1],  class2 =
          levels(sampclass(object))[2],  filebase = character(), eicmax
          = 0, eicwidth = 200, sortpval = TRUE, classeic =
          c(class1,class2), metlin = FALSE)'

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

     'xcmsSet-class', 'mt.teststat', 'palette'

