TargetSearchData      package:TargetSearchData      R Documentation

_E_x_a_m_p_l_e _G_C-_M_S _d_a_t_a _f_o_r _T_a_r_g_e_t_S_e_a_r_c_h _P_a_c_k_a_g_e

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

     A 'TargetSearch' example GC-MS data. This package contains raw
     NetCDF files from a E.coli salt stress experiment, extracted peak
     list of each NetCDF file and three tab-delimted text files: a
     sample description, a reference library and a retention index
     marker definition. The data is a subset of the original data from
     200-400 seconds and 85-320 m/z.

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

             data(TargetSearchData)

_F_o_r_m_a_t:

     The data contains the following objects:

     _s_a_m_p_l_e_D_e_s_c_r_i_p_t_i_o_n a 'tsSample' object. The sample description.

     _r_e_f_L_i_b_r_a_r_y a 'tsLib' object. The reference library.

     _r_i_m_L_i_m_i_t_s a 'tsRim' object. The RI markers definition.

     _R_I_m_a_t_r_i_x a matrix object. The retention time of the RI markers.

     _c_o_r_R_I a matrix object. The sample RI.

     _p_e_a_k_D_a_t_a a 'tsMSdata' object. The intensities and RIs of all the
          masses that were searched for.

     _m_e_t_a_b_P_r_o_f_i_l_e a 'tsProfile' object. The metabolite profile.

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

     All files are located in 'gc-ms-data' subdirectory.

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

     'ImportLibrary', 'ImportSamples', 'ImportFameSettings',

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

     require(TargetSearch)

     ## The directory with the NetCDF GC-MS files
     cdfpath <- file.path(.find.package("TargetSearchData"), "gc-ms-data")
     cdfpath
     list.files(cdfpath)
     samp.file <- file.path(cdfpath, "samples.txt")
     rim.file  <- file.path(cdfpath, "rimLimits.txt")
     lib.file  <- file.path(cdfpath, "library.txt")

     # import files from package
     sampleDescription <- ImportSamples(samp.file, CDFpath = cdfpath, RIpath = ".")
     refLibrary        <- ImportLibrary(lib.file)
     rimLimits         <- ImportFameSettings(rim.file, mass = 87)
     # perform RI correction
     RImatrix          <- RIcorrect(sampleDescription, rimLimits, massRange = c(85,320),
                        IntThreshold = 25, pp.method = "ppc", Window = 15)
     # 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)

     # show the metabolite profile
     profileInfo(metabProfile)
     # show the matrix intensities
     Intensity(metabProfile)

