Profile             package:TargetSearch             R Documentation

_A_v_e_r_a_g_e _t_h_e _c_o_r_r_e_l_a_t_i_n_g _m_a_s_s_e_s _f_o_r _e_a_c_h _m_e_t_a_b_o_l_i_t_e

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

     This function makes a profile from the masses that correlate for
     each metabolite.

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

     Profile(samples, Lib, peakData, r_thres = 0.95, method = "dayNorm", minPairObs = 5)

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

peakData: A 'tsMSdata' object. See 'peakFind'.

 r_thres: A correlation threshold. 

  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. 

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

     A 'tsProfile' object. The slots are: 

    Info: A data frame with a profile of all masses that correlate.

Intensity: A matrix with the averaged intensities of the correlating
          masses.

      RI: A matrix with the averaged RI of the correlating 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', 'peakFind',
     'tsProfile'

_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
     # update median RI
     refLibrary        <- medianRILib(sampleDescription, refLibrary)
     # get the sample RI
     corRI             <- sampleRI(sampleDescription, refLibrary, r_thres = 0.95)
     # obtain the peak Intensities of all the masses in the library
     peakData          <- peakFind(sampleDescription, refLibrary, corRI)
     # make a profile of the metabolite data
     metabProfile      <- Profile(sampleDescription, refLibrary, peakData, r_thres = 0.95)

     # same as above, but with different thresholds.
     metabProfile      <- Profile(sampleDescription, refLibrary, peakData,
                          r_thres = 0.9, minPairObs = 5)

