aCGH                  package:aCGH                  R Documentation

_C_l_a_s_s _a_C_G_H

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_D_e_t_a_i_l_s:

     One way of creating objects of class aCGH is to provide the two
     mandatory arguments to 'create.aCGH' function: 'log2.ratios' and
     'clones.info'. Alternatively aCGH object can be created using
     'aCGH.read.Sprocs' that reads Sproc data files and creates object
     of type aCGH.

_V_a_l_u_e:

log2.ratios: Data frame containing the log2 ratios of copy number
          changes; rows correspond to the clones and the columns to the
          samples (Mandatory). 

clones.info: Data frame containing information about the clones used
          for comparative genomic hybridization. The number of rows of
          'clones.info' has to match the number of rows in
          'log2.ratios' (Mandatory). 

phenotype: Data frame containing phenotypic information about samples
          used in the experiment generating the data. The number of
          rows of 'phenotype' has to match the number of columns in
          'log2.ratios' (Optional). 

log2.ratios.imputed: Data frame containing the imputed log2 ratios.
          Calculate this using 'impute.lowess' function; look at the
          examples below (Optional). 

     hmm: The structure of the hmm element is described in 'hmm'.
          Calculate this using 'find.hmm.states' function; look at the
          examples below (Optional). 

     hmm: Similar to the structure of the hmm element. Calculate this
          using 'mergeHmmStates' function; look at the examples below
          (Optional). 

sd.samples: The structure of the sd.samples element is described in
          'computeSD.Samples'. Calculate this using 'computeSD.Samples'
          function; look at the examples below (Optional). It is
          prerequisite that the hmm states are estimated first. 

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

dim.aCGH: returns the dimensions of the aCGH object: number of clones
          by number of samples. 

num.clones: number of clones/number of rows of the log2.ratios
          data.frame. 

nrow.aCGH: same as 'num.clones'. 

 is.aCGH: tests if its argument is an object of class 'aCGH'. 

num.samples: number of samples/number of columns of the log2.ratios
          data.frame. 

nrow.aCGH: same as 'num.samples'. 

num.chromosomes: number of chromosomes processed and stored in the aCGH
          object. 

clone.names: returns the names of the clones stored in the clones.info
          slot of the aCGH object. 

row.names.aCGH: same as 'clone.names'. 

sample.names: returns the names of the samples used to create the aCGH
          object. If the object is created using 'aCGH.read.Sprocs',
          these are the file names of the individual arrays. 

col.names.aCGH: same as 'sample.names'. 

  [.aCGH: subsetting function. Works the same way as '[.data.frame'. 

     Most of the functions/slots listed above have assignment operators
     '<-' associated with them.

_N_o_t_e:

     '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).

_A_u_t_h_o_r(_s):

     Peter Dimitrov

_S_e_e _A_l_s_o:

     'aCGH.read.Sprocs', 'find.hmm.states', 'computeSD.Samples',
     'find.genomic.events', 'plotGenome', 'plotHmmStates',
     'plotFreqStat', 'plotSummaryProfile'

_E_x_a_m_p_l_e_s:

     ## 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)

