ImportLibrary          package:TargetSearch          R Documentation

_L_i_b_r_a_r_y _i_m_p_o_r_t

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

     This function imports a metabolite library file that will be used
     to processed the GC-MS data.

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

     ImportLibrary(libfile, RI_dev = c(2000, 1000, 200), SelMasses = 5,
                   TopMasses = 15, ExcludeMasses)

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

 libfile: A character string naming a library file. See details. 

  RI_dev: A three component vector with RI windows. 

SelMasses: The number of selective masses that will be used. 

TopMasses: The number of most intensive masses that will be taken from
          the spectrum, if no 'TOP_MASSES' is provided.

ExcludeMasses: Optional. A vector containing a list of masses that will
          be excluded. 

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

     The library file is a tab delimited text file with the following
     column names.


        *  'Name' - The metabolite name.

        *  'RI' - The expected RI.

        *  'SEL_MASSES' - A list of selective masses separated with
           semicolon.

        *  'TOP_MASSES' - A list of the most abundant masses to be
           searched, separated with semicolons.

        *  'Win_k' - The RI windows, k = 1,2,3. Mass search is perfomed
           in three steps. A RI window required for each one of them.

        *  'SPECTRUM' - The metabolite spectrum. m/z and intensity are
           separated by spaces and colons.


     The columns 'Name' and 'RI' are mandatory. At least one of columns
     'SEL_MASSES', 'TOP_MASSES' and 'SPECTRUM' must be given as well.
     By using the parameters 'SelMasses' or 'TopMasses' it is possible
     to set the selective masses or the top masses from the spectra.
     The parameter 'ExcludeMasses' is used only when masses are
     obtained from the spectra. The parameter 'RI_dev' can be used to
     set the RI windows. Note that in this case, all metabolites would
     have the same RI windows.

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

     A 'tsLib' object.

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

     Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig

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

     'ImportSamples', 'tsLib'

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

     # get the reference library file
     cdfpath <- file.path(.find.package("TargetSearchData"), "gc-ms-data")
     lib.file  <- file.path(cdfpath, "library.txt")

     # Import the reference library
     refLibrary <- ImportLibrary(lib.file) 

     # set new names for the first 3 metabolites
     libName(refLibrary)[1:3] <- c("Metab01", "Metab02", "Metab03")

     # change the retention time deviations of Metabolite 3
     RIdev(refLibrary)[3,] <- c(3000,1500,150)

