sampleRI            package:TargetSearch            R Documentation

_S_a_m_p_l_e _e_s_p_e_c_i_f_i_c _R_I _d_e_t_e_c_t_i_o_n

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

     Return a matrix of the sample specific RIs based on the
     correlating selective masses.

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

     sampleRI(samples, Lib, r_thres = 0.95,
              columns = c("SPECTRUM", "RETENTION_TIME_INDEX"),
              method = "dayNorm", minPairObs = 5, showProgressBar = FALSE,
              makeReport = FALSE, pdfFile = "medianLibRep.pdf")

_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'. 

 r_thres: A correlation threshold.

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

  method: Normalisation method. Options are '"dayNorm"', a day based
          median normalisation, '"medianNorm"', normalisation using the
          median of all the intensities of a given mass, and '"none"',
          no normalisation at all. 

minPairObs: Minimum number of pair observations. Correlations between
          two variables are computed using all complete pairs of
          observations in those variables. If the number of
          observations is too small, you may get high correlations
          values just by chance, so this parameters is used to avoid
          that. 

showProgressBar: Logical. Should the progress bar be displayed?

makeReport: Logical. If 'TRUE' will report the RI deviations for every
          metabolite in the library. 

 pdfFile: The file name where the report will be saved. 

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

     A matrix of correlating selective masses RI. Columns represent
     samples and rows the median RI of the selective masses.

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

     Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig

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

     'ImportSamples', 'ImportLibrary', 'medianRILib',  '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

     # get the sample RI
     corRI <- sampleRI(sampleDescription, refLibrary, r_thres = 0.95)

     # same as above, but changing the correlation threshold and the minimum number
     # of observations
     corRI <- sampleRI(sampleDescription, refLibrary, r_thres = 0.9,
                             minPairObs = 10)
             

