peakFind            package:TargetSearch            R Documentation

_I_n_t_e_n_s_i_t_i_e_s _a_n_d _R_I _m_a_t_r_i_c_e_s

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

     This function returns a list of the intensities and RI matrices
     that were searched.

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

     peakFind(samples, Lib, cor_RI, columns = c("SPECTRUM", "RETENTION_TIME_INDEX"),
              showProgressBar = FALSE)

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

 samples: A 'tsSample' object created by 'ImportSamples' function. 

     Lib: A 'tsLib' object created by 'ImportLibrary' function with
          corrected RI values.   See 'medianRILib'. 

  cor_RI: A matrix of correlating selective masses RI for every sample.
          See 'sampleRI'. 

 columns: A numeric vector with the column positions of 'SPECTRUM' and
          'RETENTION_TIME_INDEX' or a character vector with the header
          names of those columns. 

showProgressBar: Logical. Should the progress bar be displayed?

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

     A 'tsMSdata' object.

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

     Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig

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

     'ImportSamples', 'ImportLibrary', 'medianRILib', 'sampleRI',
     'tsMSdata', 'tsLib', 'tsSample'

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

     require(TargetSearchData)
     data(TargetSearchData)

     # get RI file path
     RI.path <- file.path(.find.package("TargetSearchData"), "gc-ms-data")
     # update RI file path
     RIpath(sampleDescription) <- RI.path

     peakData <- peakFind(sampleDescription, refLibrary, corRI)
     # show peak Intensities. 
     head(Intensity(peakData))

     # How to get intensities for a particular metabolite
     #
     # make a library index using top masses
     libId <- libId(refLibrary, sel = FALSE)
     # get the peak intensities of Metabolite 1, for example, of every mass
     int.1 <- Intensity(peakData)[libId == 1,]
     # this assigns the mass values to the row names of int.1
     rownames(int.1) <- topMass(refLibrary)[[1]]

