\HeaderA{getPeaks}{Peak Detection}{getPeaks}
\keyword{nonparametric}{getPeaks}
\begin{Description}\relax
For given threshold criteria, find peaks.
\end{Description}
\begin{Usage}
\begin{verbatim}
getPeaks(bseoffM, peakinfofile,SoN = 2,span = 81,sm.span=11, 
zerothrsh=2, area.w = 0.003, ratio = 0.2)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{bseoffM}] a matrix holding the baseline-substracted
spectra, with  row-names as the m/z values and
column-names  as the spectrum names.
\item[\code{peakinfofile}] a `.csv' file in the same format as  
Ciphergen's peak info file, with 5 columns 
data.  More details later.
\item[\code{SoN}] see isPeak().
\item[\code{span}] see isPeak().
\item[\code{sm.span}] see isPeak().
\item[\code{zerothrsh}] ignore peaks whose intensity values are below zerothrsh.
\item[\code{area.w}] see isPeak().
\item[\code{ratio}] see isPeak().
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
For given threshold criteria, detect peaks and write the 
following columns of information into 'peakinfofile', 
spectrum name (Spectrum.Tag), spectrum sequential number
(Spectrum.), peak sequential number within a spectrum (Peak.),
relative intensity (Intensity) and the m/z value where the 
relative intensity occurs (Substance.Mass).
\end{Details}
\begin{Author}\relax
Xiaochun Li
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{rmBaseline}{rmBaseline}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
example(renorm)
peakfile <- paste(tempdir(),"testpeakinfo.csv", sep="/")
getPeaks(rtM, peakfile)
\end{ExampleCode}
\end{Examples}

