\HeaderA{findPeaks.MS1-methods}{Collecting MS1 precursor peaks}{findPeaks.MS1.Rdash.methods}
\aliasA{findPeaks.MS1}{findPeaks.MS1-methods}{findPeaks.MS1}
\aliasA{findPeaks.MS1,xcmsRaw-method}{findPeaks.MS1-methods}{findPeaks.MS1,xcmsRaw.Rdash.method}
\keyword{methods}{findPeaks.MS1-methods}
\begin{Description}\relax
Collecting Tandem MS or MS$\textasciicircum{}n$ Mass Spectrometry
precursor peaks as annotated in XML raw file
\end{Description}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] \code{xcmsRaw} object
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Some mass spectrometers can acquire MS1 and MS2 (or MS$\textasciicircum{}n$ scans)
quasi simultanously, e.g. in data dependent tandem MS or DDIT mode.

Since xcmsFragments attaches \emph{all} MS$\textasciicircum{}n$ peaks to MS1 peaks in xcmsSet,
it is important that findPeaks and xcmsSet do not miss any MS1 precursor peak.

To be sure that all MS1 precursor peaks are in an xcmsSet,
findPeaks.MS1 does not do an actual peak picking, but simply uses the
annotation stored in mzXML, mzData or mzML raw files.

This relies on the following XML tags:

mzData:
\code{
  <spectrum id="463">
        <spectrumInstrument msLevel="2">
          <cvParam cvLabel="psi" accession="PSI:1000039" name="TimeInSeconds" value="92.7743"/>
        </spectrumInstrument>
        <precursor msLevel="1" spectrumRef="461">
            <cvParam cvLabel="psi" accession="PSI:1000040" name="MassToChargeRatio" value="462.091"/>
            <cvParam cvLabel="psi" accession="PSI:1000042" name="Intensity" value="366.674"/>
        </precursor>
  </spectrum>
}

mzXML:
\code{
     <scan num="17" msLevel="2" retentionTime="PT1.5224S">
     <precursorMz precursorIntensity="125245">220.1828003</precursorMz>     
     </scan>
   }  

Several mzXML and mzData converters are known to create incomplete
files, either without intensities (they will be set to 0) or without
the precursor retention time (then a reasonably close rt will be
chosen. NYI).
\end{Details}
\begin{Value}
A matrix with columns:

\begin{ldescription}
\item[\code{mz, mzmin, mzmax}] annotated MS1 precursor selection mass

\item[\code{rt, rtmin, rtmax}] annotated MS1 precursor retention time

\item[\code{into, maxo, sn}] annotated MS1 precursor intensity

\end{ldescription}
\end{Value}
\begin{Section}{Methods}
\describe{
\item[object = "xcmsRaw"] \code{
    findPeaks.MS1(object)
    }

}
\end{Section}
\begin{Author}\relax
Steffen Neumann, \email{sneumann@ipb-halle.de}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{findPeaks-methods}{findPeaks.Rdash.methods}}
\code{\LinkA{xcmsRaw-class}{xcmsRaw.Rdash.class}}
\end{SeeAlso}

