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)

