\HeaderA{decomposeIsotopes}{Mass Decomposition of Isotope Patterns}{decomposeIsotopes}
\aliasA{decomposeMass}{decomposeIsotopes}{decomposeMass}
\aliasA{isotopeScore}{decomposeIsotopes}{isotopeScore}
\keyword{methods}{decomposeIsotopes}
\begin{Description}\relax
Calculate the elementary compositions from an exact Mass or Isotope Pattern,
obtained e.g.\ by FTICR or TOF mass spectrometers
\end{Description}
\begin{Usage}
\begin{verbatim}
decomposeMass(mass, ppm=2.0, mzabs=0.0001, elements=NULL, filter=NULL, z=0)
decomposeIsotopes(masses, intensities, ppm=2.0, mzabs=0.0001, elements=NULL, filter=NULL,  z=0)
isotopeScore(molecule, masses, intensities, elements = NULL, filter = NULL, z = 0)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{mass}] A single exact mass (or m/z value)
\item[\code{masses}] A vector of masses (or m/z values) of an isotope cluster
\item[\code{intensities}] Abolute or relative intensities of the \code{masses} peaks
\item[\code{ppm}] allowed deviation of hypotheses from given mass
\item[\code{mzabs}] absolute deviation in dalton (mzabs and ppm will be added)
\item[\code{z}] charge z of m/z peaks for calculation of real mass. 0 is for auto-detection
\item[\code{elements}] list of allowed chemical elements, defaults to CHNOPS
\item[\code{filter}] NYI, will be a selection of DU, DBE and Nitrogen rules
\item[\code{molecule}] a molecule as obtained from getMolecule() or
decomposeMass / decomposeIsotopes
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Sum formulas are calculated which explain the given mass or isotope
pattern.
\end{Details}
\begin{Value}
A list of molecules, which contain the sub-lists
\begin{ldescription}
\item[\code{formula}] potential formulae

\item[\code{mass}] exact mass of hypothesis

\item[\code{score}] calculated score

\item[\code{isotopes}] a list of isotopes 

\end{ldescription}
\end{Value}
\begin{Author}\relax
Steffen Neumann <sneumann@IPB-Halle.DE>
\end{Author}
\begin{References}\relax
For a description of the underlying IMS see:
WABI Paper
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{decomposeMass}{decomposeMass}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# For Glutamate: 
decomposeIsotopes(c(147.0529,148.0563), c(100.0,5.561173))
\end{ExampleCode}
\end{Examples}

