\name{searchMetlin} \alias{searchMetlin} \alias{searchMetlin,xcmsFragments-method} \title{Search Metlin Online Database} \description{ A method for searching \eqn{MS^2} data against the accurate \eqn{MS^2} METLIN database } \usage{ searchMetlin(object, ppmfrag=10, ppmMZ= 5, file, MS1data=FALSE, metXML="metlin", limit=8, ...) } \arguments{ \item{object}{An xcmsFragment object generated by xcmsRaw.collect} \item{ppmfrag}{Error in ppm for each fragment} \item{ppmMZ}{Error in ppm for precursor mass} \item{limit}{Limit the amount of peaks used} \item{file}{Name of the results file} \item{MS1data}{Should accurate mass alone be search as well} \item{metXML}{location of metlin like XML file or "metlin" as a default} \item{...}{Arguments to plot.metlin()} } \details{ This method automates the task of MS/MS comparison to a reference library. By default the METLIN database is used however this can be changed with the \code{metXML} parameter. The \code{limit} parameter allows for the reduction of peaks used in the matching so that the number of peaks from the spectra match that coming from METLIN. Metlin is restricted to the top 8 intensity peaks. The search first identifies precursors that match entries in the current METLIN database using the specified error given by \code{ppmMZ}. Once a matching m/z value is found, MS/MS data is searched. Each fragment is identified and compared to the reference fragments with error specified by\code{ppmfrag}. Each match is done using a score schema of the difference and similarity of the two spectra. This value is the equivocated against the possible maximum and minimum. For each match a plot of the two MS/MS spectra are given. These are found using the \code{A} and \code{B} parameter } \value{ A data frame with the following columns: \item{A}{Location of the plot} \item{B}{Seconded number locator for plot} \item{Precursor Ion}{M/Z of the precursor Ion} \item{rtmin}{Start of rt window} \item{rtmax}{End of rt window} \item{CollisionEnergy experiment"}{Collision energy of the experiment} \item{CollisionEnergy Reference}{Collision energy of the reference} \item{Percentage Match"}{Match percentage of the reference spectra to the experimental spectra} \item{Metlin Mass}{The mass of the reference precursor ion} \item{# matching"}{The number of matching fragment} \item{# non-matching}{The number of non-matching fragments} \item{Total # Ref ion}{The total number of fragment reference ions} \item{Metlin ID Name}{Name of the identified meatbolite} \item{Ionization}{Is the reference spectra in '-' mode or '+' mode} \item{Adduct}{Is the reference spectra an adduct of the precursor} } \references{ H. Paul Benton, D.M. Wong, S.A.Strauger, G. Siuzdak "XC\eqn{MS^2}" Analytical Chemistry 2008 } \author{H. Paul Benton, \email{hpbenton@scripps.edu}} \keyword{methods}