\HeaderA{annotate}{Deconvolute/Annotate LC/ESI-MS data}{annotate}
\aliasA{annotate,xsAnnotate-methods}{annotate}{annotate,xsAnnotate.Rdash.methods}
\keyword{methods}{annotate}
\begin{Description}\relax
Annotate isotope peaks, adducts and fragments for a (grouped) xcmsSet \code{xs}. Returns a xsAnnotate object.
\end{Description}
\begin{Usage}
\begin{verbatim}
annotate(xs, sigma = 6, perfwhm = 0.6, cor_eic_th = 0.75, maxcharge = 3, maxiso = 4, ppm = 5, mzabs = 0.01, multiplier = 3, sample=1, category = NA, polarity="positive")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{xs}] xcmsSet with peak group assignments
\item[\code{sigma}] Isotopic peak relationship table
\item[\code{perfwhm}] Adduct/Fragment peak relationship table
\item[\code{cor\_eic\_th}] correlation threshold (0..1)
\item[\code{maxcharge}] max charge of the ions
\item[\code{maxiso}] max number of isotopes
\item[\code{ppm}] ppm error
\item[\code{mzabs}] absolut error
\item[\code{multiplier}] max. number n of [nM+x] clusterions
\item[\code{sample}] Index of which sample is used for the correlation
\item[\code{category}] Which class label should be used
\item[\code{polarity}] Which polarity mode was used for measuring of the ms sample
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Batch script for a annotation for a a (grouped) xcmsSet \code{xs}. Generate intern a xsAnnotate object and calls the member function for the annotation step. Returns a peaklist with additonal columns for isotopes, adducts and an index for the pseudo spectra group. xsAnnotate groups Peaks into spectra groups, after there Retentiontime and EIC correlations.
Attention: For the EIC correlation only one sample can be used, so if the xcmsSet contains more than one sample, one must be chosen.
\end{Details}
\begin{Value}
\code{annotate} returns an xsAnnotate object. For more information about see \LinkA{xsAnnotate-class}{xsAnnotate.Rdash.class}
\end{Value}
\begin{Author}\relax
Carsten Kuhl \textless{}ckuhl@ipb-halle.de\textgreater{}
\end{Author}
\begin{Examples}
\begin{ExampleCode}
 library(CAMERA)
 file <- system.file('mzdata/MM14.mzdata', package = "CAMERA")
 xs   <- xcmsSet(file, method="centWave", ppm=30, peakwidth=c(5,10))
 annotated_xs<- annotate(xs)
\end{ExampleCode}
\end{Examples}

