\HeaderA{heatmapGenome}{clustering and heatmap}{heatmapGenome}
\aliasA{floor.func}{heatmapGenome}{floor.func}
\aliasA{maPalette}{heatmapGenome}{maPalette}
\aliasA{plotChrom}{heatmapGenome}{plotChrom}
\aliasA{plotValChrom}{heatmapGenome}{plotValChrom}
\aliasA{plotvalChrom.func}{heatmapGenome}{plotvalChrom.func}
\aliasA{plotValGenome}{heatmapGenome}{plotValGenome}
\keyword{hplot}{heatmapGenome}
\keyword{cluster}{heatmapGenome}
\begin{Description}\relax
This function clusters samples and shows their heatmap
\end{Description}
\begin{Usage}
\begin{verbatim}
heatmapGenome(input, response = as.factor(rep("All", ncol(input))),
                 chrominfo = chrominfo.Mb, cutoff = 1, lowCol =
                 "blue", highCol = "yellow", midCol = "white", ncolors =
                 50, byclass = FALSE, showaber = FALSE, amplif = 1,
                 homdel = -0.75, samplenames = colnames(input),
                 vecchrom = 1:22, titles = "Image Plot", methodS =
                 "ward", categoricalPheno = TRUE, CENTROMERE = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{input}] object of class \code{\LinkA{MAList}{MAList}} or \code{\LinkA{SegList}{SegList}}
\item[\code{response}] phenotype of interest. defaults to the same phenotype
assigned to all samples
\item[\code{chrominfo}] a chromosomal information associated with the mapping
of the data
\item[\code{cutoff}] maximum absolute value. all the values are floored to
+/-cutoff depending on whether they are positive of
negative. defaults to 1
\item[\code{ncolors}] number of colors in the grid. input to
\code{\LinkA{maPalette}{maPalette}}. defaults to 50
\item[\code{lowCol}] color for the low (negative) values. input to
\code{\LinkA{maPalette}{maPalette}}. defaults to "red"
\item[\code{highCol}] color for the high (positive) values. input to
\code{\LinkA{maPalette}{maPalette}}. defaults to "green"
\item[\code{midCol}] color for the values close to 0. input to
\code{\LinkA{maPalette}{maPalette}}. defaults to "black"
\item[\code{byclass}] logical indicating whether samples should be clustered within each level of the phenotype or overall. defaults to F
\item[\code{showaber}] logical indicating whether high level amplifications and homozygous deletions should be indicated on the plot. defaults to F
\item[\code{amplif}] positive value that all observations equal or exceeding it  are marked by yellow dots indicating high-level changes. defaults to 1
\item[\code{homdel}] negative value that all observations equal or below it  are marked by light blue dots indicating homozygous deletions. defaults to -0.75
\item[\code{samplenames}] sample names
\item[\code{vecchrom}] vector of chromosomal indeces to use for clustering and to display. defaults to 1:23
\item[\code{titles}] plot title. defaults to "Image Plots"
\item[\code{methodS}] clustering method to cluster samples. defaults to "ward"
\item[\code{categoricalPheno}] logical indicating whether phenotype is
categorical. Continious phenotypes are treated as "no groups" except
that their values are dispalyed.defaults to TRUE.
\item[\code{CENTROMERE}] logical indicating whether to plot the centromere

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This functions is a more flexible version of the
\code{\LinkA{heatmap}{heatmap}}. It can cluster within levels of categorical
phenotype as well as all of the samples while displaying phenotype
levels in different colors. It also uses any combination of
chromosomes that is requested and clusters samples based on these
chromosomes only. It draws the chromosomal boundaries and displays
high level changes and homozygous deletions. If phenotype if not
categical, its values may still be displayed but groups are not formed
and byclass = F.
Image plot has the samples reordered according to clustering order.
\end{Details}
\begin{SeeAlso}\relax
\code{\LinkA{heatmap}{heatmap}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
\end{ExampleCode}
\end{Examples}

