\name{norm.counts}
\alias{norm.counts}
\title{
Intensity normalization, outlier detection and feature selection
}
\description{
This is an internal function called by \code{\link{data.norm}}.
}
\usage{
norm.counts(names, data, mz, rt, std.outliers, zero.missing, min.corr, max.rt, mode = "", mz.tol = 1e-3, adducts = c(), fplot)
}
\arguments{
  \item{names }{ sample names.}
  \item{data }{ intensity matrix where rows correspond to features and columns to samples.}
  \item{mz }{ m/z values of each feature.}
  \item{rt }{ retention time values of each feature.}
  \item{std.outliers }{s amples having an outlier score over this value are excluded.}
  \item{zero.missing}{ logical, intensity equal to 0 is considered as a missing value.}
  \item{min.corr }{ correlation threshold. Feature pairs with an intensity correlation below this value are excluded.}
  \item{max.rt }{ retention time difference threshold. Feature pairs with a retention time difference over this value are excluded.}
  \item{mode }{ ionization mode. Three accepted values: "", "+" and "-". "+" and "-" turn on m/z filtering after correlation computation to check if m/z differeces between feature pairs match the expected differences for isotopic or adduct patterns (\code{mz.tol} must be provided).}
  \item{mz.tol }{ tolerance for M/Z values. It must be provided when mode="+" or mode="-".}
  \item{adducts }{ user provided adduct list.}
  \item{fplot }{ logical, if \code{TRUE} plots summary figures.}
}
\value{
  \item{corrM }{ a five-column matrix with the data corresponding to the feature pairs that passed the filters.}
  \item{out }{ indexes of the excluded samples.}
  \item{inp }{ indexes of the included samples.}
  \item{scores }{outlier scores of each sample.}
}
\author{A.Alonso, et al. Grup de Recerca de Reumatologia 2010, bioinformatics@urr.cat.}
\seealso{\code{\link{data.norm}}.}