\HeaderA{nudSegmentation}{Assigns each segment of each sample to either 'normal', 'up', 'down', 'amplified', or 'deleted'}{nudSegmentation}
\keyword{manip}{nudSegmentation}
\begin{Description}\relax
Classifies each segment in each sample in a SegList according to the absolute magnitude of the segment and the noisiness of the data for that sample.
\end{Description}
\begin{Usage}
\begin{verbatim}
nudSegmentation(seg, factor.change = 0.75, amplified.max.width = 10,
deleted.max.width = 10, amplified.magnitude = 1, deleted.magnitude = 1,
cellularity)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{seg}] Object of class \code{\LinkA{SegList}{SegList}}
\item[\code{factor.change}] Factor of estimated noise by which a segment should deviate from zero to be classified as gained or lost.
\item[\code{amplified.max.width}] Maximum width permitted for a segment to be classified as an amplicon.
\item[\code{deleted.max.width}] Maximum width permitted for a segment to be classified as a deletion.
\item[\code{amplified.magnitude}] Minimum (absolute) segmentation value permitted for a segment to be classified as an amplicon.
\item[\code{deleted.magnitude}] Minimum (absolute) segmentation value permitted for a segment to be classified as a deletion.
\item[\code{cellularity}] If present, a vector of the same length as the number of samples in seg, giving cellularity values as a fraction between 0-1. NAs should be used where these are not known.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function classifies each segment as either 'normal', 'up', 'down', 'amplified' or 'deleted'. A region is classified as 'up' or 'down' if the segmentation value is more (in absolute value) than 'factor.change' multiplied by the interquartile range of the difference between observed and predicted values for each observation on the genome. A region is classified as amplified or deleted if it falls within the constraints of the arguments given. It is felt that regions of amplification or deletion should be sufficiently striking not to be affected by the noise of the data.
The 'cellularity' argument, if given, adjusts the thresholds for identifying 'up' and 'down' regions in terms of the level of cellularity given. Thus, for a sample of low observed cellularity, smaller changes should be identified as gains or losses. In cases of sufficiently low cellularity, this will inevitably lead to greater misclassification and so the classification on these samples should be checked and, if necessary, the sample discarded.
\end{Details}
\begin{Value}
Object of class \code{\LinkA{SegList}{SegList}, now with a \$regions element. \$regions is a list of the same length as the number of samples in seg, each element of which is a data.frame containing an annotation of the classification for the associated sample.}
\end{Value}
\begin{Author}\relax
Tom Hardcastle
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{plotSegmentedGenome}{plotSegmentedGenome}}
\code{\LinkA{SegList}{SegList}}
\end{SeeAlso}

