\HeaderA{aCGH}{Class aCGH}{aCGH}
\aliasA{clone.names}{aCGH}{clone.names}
\aliasA{clone.names<\Rdash}{aCGH}{clone.names<.Rdash.}
\aliasA{clones.info}{aCGH}{clones.info}
\aliasA{col.names.aCGH}{aCGH}{col.names.aCGH}
\aliasA{col.names<\Rdash.aCGH}{aCGH}{col.names<.Rdash..aCGH}
\aliasA{colnames.aCGH}{aCGH}{colnames.aCGH}
\aliasA{colnames<\Rdash.aCGH}{aCGH}{colnames<.Rdash..aCGH}
\aliasA{corna}{aCGH}{corna}
\aliasA{create.aCGH}{aCGH}{create.aCGH}
\aliasA{dim.aCGH}{aCGH}{dim.aCGH}
\aliasA{ex.acgh.hmm}{aCGH}{ex.acgh.hmm}
\aliasA{floorFunc}{aCGH}{floorFunc}
\aliasA{genomic.events}{aCGH}{genomic.events}
\aliasA{genomic.events<\Rdash}{aCGH}{genomic.events<.Rdash.}
\aliasA{hmm}{aCGH}{hmm}
\methaliasA{hmm.merged}{aCGH}{hmm.merged}
\methaliasA{hmm.merged<\Rdash}{aCGH}{hmm.merged<.Rdash.}
\aliasA{hmm<\Rdash}{aCGH}{hmm<.Rdash.}
\aliasA{is.aCGH}{aCGH}{is.aCGH}
\aliasA{lengthNumFunc}{aCGH}{lengthNumFunc}
\aliasA{log2.ratios}{aCGH}{log2.ratios}
\methaliasA{log2.ratios.imputed}{aCGH}{log2.ratios.imputed}
\methaliasA{log2.ratios.imputed<\Rdash}{aCGH}{log2.ratios.imputed<.Rdash.}
\aliasA{maxna}{aCGH}{maxna}
\aliasA{minna}{aCGH}{minna}
\aliasA{ncol.aCGH}{aCGH}{ncol.aCGH}
\aliasA{nrow.aCGH}{aCGH}{nrow.aCGH}
\aliasA{num.chromosomes}{aCGH}{num.chromosomes}
\aliasA{num.clones}{aCGH}{num.clones}
\aliasA{num.samples}{aCGH}{num.samples}
\aliasA{phenotype}{aCGH}{phenotype}
\aliasA{phenotype<\Rdash}{aCGH}{phenotype<.Rdash.}
\aliasA{plot.aCGH}{aCGH}{plot.aCGH}
\aliasA{print.aCGH}{aCGH}{print.aCGH}
\aliasA{propNumFunc}{aCGH}{propNumFunc}
\aliasA{row.names.aCGH}{aCGH}{row.names.aCGH}
\aliasA{row.names<\Rdash.aCGH}{aCGH}{row.names<.Rdash..aCGH}
\aliasA{rownames.aCGH}{aCGH}{rownames.aCGH}
\aliasA{rownames<\Rdash.aCGH}{aCGH}{rownames<.Rdash..aCGH}
\aliasA{sample.names}{aCGH}{sample.names}
\aliasA{sample.names<\Rdash}{aCGH}{sample.names<.Rdash.}
\aliasA{sd.samples}{aCGH}{sd.samples}
\aliasA{sd.samples<\Rdash}{aCGH}{sd.samples<.Rdash.}
\aliasA{subset.hmm}{aCGH}{subset.hmm}
\methaliasA{subset.hmm.merged}{aCGH}{subset.hmm.merged}
\aliasA{summary.aCGH}{aCGH}{summary.aCGH}
\aliasA{[.aCGH}{aCGH}{[.aCGH}
\keyword{classes}{aCGH}
\begin{Description}\relax
Objects of this class represent batch of arrays of
Comparative Genomic Hybridization data. In addition to that, there are
slots for representing phenotype and various genomic events associated
with aCGH experiments, such as transitions, amplifications,
aberrations, and whole chromosomal gains and losses.
Currently objects of class aCGH are represented as S3 classes which
are named list of lists with functions for accessing elements of that
list. In the future, it's anticipated that aCGH objects will be
implemented using S4 classes and methods.
\end{Description}
\begin{Details}\relax
One way of creating objects of class aCGH is to provide the two
mandatory arguments to \code{create.aCGH} function: \code{log2.ratios}
and \code{clones.info}. Alternatively aCGH object can be created using
\code{\LinkA{aCGH.read.Sprocs}{aCGH.read.Sprocs}} that reads Sproc data files and
creates object of type aCGH.
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{log2.ratios}] Data frame containing the log2 ratios of copy number changes; rows
correspond to the clones and the columns to the samples (Mandatory).

\item[\code{clones.info}] Data frame containing information about the clones used for
comparative genomic hybridization. The number of rows of
\code{clones.info} has to match the number of rows in
\code{log2.ratios} (Mandatory).

\item[\code{phenotype}] Data frame containing phenotypic information about samples used in
the experiment generating the data. The number of rows of
\code{phenotype} has to match the number of columns in
\code{log2.ratios} (Optional).

\item[\code{log2.ratios.imputed}] Data frame containing the imputed log2 ratios. Calculate this using
\code{impute.lowess} function; look at the examples below (Optional).

\item[\code{hmm}] The structure of the hmm element is described in
\code{\LinkA{hmm}{hmm}}. Calculate this using
\code{\LinkA{find.hmm.states}{find.hmm.states}} function; look at the examples below
(Optional).

\item[\code{hmm}] Similar to the structure of the hmm element. Calculate this using
\code{\LinkA{mergeHmmStates}{mergeHmmStates}} function; look at the examples below
(Optional).

\item[\code{sd.samples}] The structure of the sd.samples element is described in
\code{\LinkA{computeSD.Samples}{computeSD.Samples}}. Calculate this using
\code{\LinkA{computeSD.Samples}{computeSD.Samples}} function; look at the examples
below (Optional). It is prerequisite that the hmm states are
estimated first.

\item[\code{genomic.events}] The structure of the genomic.events element is described in
\code{\LinkA{find.genomic.events}{find.genomic.events}}. Calculate this using
\code{\LinkA{find.genomic.events}{find.genomic.events}} function; look also at the
examples below. It is prerequisite that the hmm states and
sd.samples are computed first. The \code{genomic.events} is used
widely in variety of plotting functions such as
\code{\LinkA{plotHmmStates}{plotHmmStates}}, \code{\LinkA{plotFreqStat}{plotFreqStat}}, and
\code{\LinkA{plotSummaryProfile}{plotSummaryProfile}}.

\item[\code{dim.aCGH}] returns the dimensions of the aCGH object: number of clones by
number of samples.

\item[\code{num.clones}] number of clones/number of rows of the log2.ratios data.frame.

\item[\code{nrow.aCGH}] same as \code{num.clones}.

\item[\code{is.aCGH}] tests if its argument is an object of class \code{aCGH}.

\item[\code{num.samples}] number of samples/number of columns of the log2.ratios data.frame.

\item[\code{nrow.aCGH}] same as \code{num.samples}.

\item[\code{num.chromosomes}] number of chromosomes processed and stored in the aCGH object.

\item[\code{clone.names}] returns the names of the clones stored in the clones.info slot of
the aCGH object.

\item[\code{row.names.aCGH}] same as \code{clone.names}.

\item[\code{sample.names}] returns the names of the samples used to create the aCGH
object. If the object is created using
\code{\LinkA{aCGH.read.Sprocs}{aCGH.read.Sprocs}}, these are the file names of the
individual arrays.

\item[\code{col.names.aCGH}] same as \code{sample.names}.

\item[\code{[.aCGH}] subsetting function. Works the same way as \code{\LinkA{[.data.frame}{[.data.frame}}.

\end{ldescription}

Most of the functions/slots listed above have assignment operators
'<-' associated with them.
\end{Value}
\begin{Note}\relax
\code{clones.info} slot has to contain a list with at least
4 columns: Clone (clone name), Target (unique ID, e.g. Well ID), Chrom
(chromosome number, X chromosome = 23 in human and 20 in mouse, Y
chromosome = 24 in human and 21 in mouse) and kb (kb position on the
chromosome).
\end{Note}
\begin{Author}\relax
Peter Dimitrov
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{aCGH.read.Sprocs}{aCGH.read.Sprocs}},
\code{\LinkA{find.hmm.states}{find.hmm.states}},
\code{\LinkA{computeSD.Samples}{computeSD.Samples}},
\code{\LinkA{find.genomic.events}{find.genomic.events}},
\code{\LinkA{plotGenome}{plotGenome}},
\code{\LinkA{plotHmmStates}{plotHmmStates}},
\code{\LinkA{plotFreqStat}{plotFreqStat}},
\code{\LinkA{plotSummaryProfile}{plotSummaryProfile}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}

## Creating aCGH object from log2.ratios and clone info files
## For alternative way look at aCGH.read.Sprocs help

datadir <- system.file(package = "aCGH")
datadir <- paste(datadir, "/examples", sep="")

clones.info <-
      read.table(file = file.path(datadir, "clones.info.ex.txt"),
                 header = TRUE, sep = "\t", quote="", comment.char="")
log2.ratios <-
      read.table(file = file.path(datadir, "log2.ratios.ex.txt"),
                 header = TRUE, sep = "\t", quote="", comment.char="")
pheno.type <-
      read.table(file = file.path(datadir, "pheno.type.ex.txt"),
                 header = TRUE, sep = "\t", quote="", comment.char="")
ex.acgh <- create.aCGH(log2.ratios, clones.info, pheno.type)

## Printing, summary and basic plotting for objects of class aCGH

data(colorectal)
colorectal
summary(colorectal)
sample.names(colorectal)
phenotype(colorectal)
plot(colorectal)

## Subsetting aCGH object

colorectal[1:1000, 1:30]

## Imputing the log2 ratios 

log2.ratios.imputed(ex.acgh) <- impute.lowess(ex.acgh)

## Determining hmm states of the clones
## WARNING: Calculating the states takes some time

##in the interests of time, hmm-finding function is commented out
##instead the states previosuly save are assigned
##hmm(ex.acgh) <- find.hmm.states(ex.acgh)

hmm(ex.acgh) <- ex.acgh.hmm
hmm.merged(ex.acgh) <-
   mergeHmmStates(ex.acgh, model.use = 1, minDiff = .25)

## Calculating the standard deviations for each array

sd.samples(ex.acgh) <- computeSD.Samples(ex.acgh)

## Finding the genomic events associated with each sample

genomic.events(ex.acgh) <- find.genomic.events(ex.acgh)

## Plotting and printing the hmm states

plotHmmStates(ex.acgh, 1)
pdf("hmm.states.temp.pdf")
plotHmmStates(ex.acgh, 1)
dev.off()

## Plotting summary of the sample profiles

plotSummaryProfile(colorectal)


\end{ExampleCode}
\end{Examples}

