plotAlongChrom          package:tilingArray          R Documentation

_P_l_o_t _t_h_e _r_e_s_u_l_t_s _o_f _s_e_g_m_e_n_t_a_t_i_o_n _a_l_o_n_g _a _c_h_r_o_m_o_s_o_m_a_l _r_e_g_i_o_n

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

     Plot the results of segmentation along a chromosomal region

_U_s_a_g_e:

     plotAlongChrom(chr, coord, highlight, segObj, y, ylim, nrBasesPerSeg, 
                           probeAnno, gff,
                           colors, featColScheme=1,
                           isDirectHybe=FALSE, scoreShow = "pt", 
                           haveNames=TRUE, haveLegend=TRUE, main="", 
                           pointSize=unit(0.6, "mm"))

_A_r_g_u_m_e_n_t_s:

     chr: integer of length 1 with the number of the chromosome for
          which to make the plot.

   coord: integer of length 2 with start and end coordinates of the
          plot.

highlight: optional, list with two elements: a single numeric value
          'coord' and a character 'strand'. If present, this position
          is marked by a vertical red bar on the coordinate axis.

  segObj: environment containing three types of data

             *  microarray intensities in along-chromosome order,

             *  a segmentation (output of findSegments),

             *  a data.frame named 'segScore' with segment scores; can
                be missing iff 'nrBasesPerSeg' is present,

             *  a numeric scalar names 'theThreshold', which is used to
                 draw a horizontal "threshold" line in the plot.

          See also Paragraph _Intensities_ in the _Details_ section.
          This is currently simply an environment that is expected to
          contain certain objects with certain names. In future
          version, this is may be replaced by a proper S4 object.

       y: numeric vector of intensities from an array, see Paragraph
          _Intensities_ in the _Details_ section.

    ylim: numeric vector of length two with y-axis limits.

nrBasesPerSeg: numeric scalar. If 'segObj' does not  contain a
          'segScore' data.frame, then this parameter allows to  choose
          the parameter which controls the number of segments in the 
          segmentation (called _S_ in the paper). In particular, this 
          parameter specifies the average length of segments, measured
          in bases,  thus one value can be used for all chromosomes.

probeAnno: environment with probe annotations, see vignette.

     gff: data frame with genome annotation from the GFF file.

  colors: named character vector, optional. If missing,  the following
          default is used: 'c("+"="#00441b", "-"="#081d58",
          "duplicated"="grey", "cp"="#101010",  "highlight"="red",
          "threshold"="grey")',  where the first three elements refer
          to colors of data points and the  last three to those of
          lines in the plot.

featColScheme: numeric scalar, used to select a color scheme for the 
          boxes representing genomic features such as coding sequences,
          ncRNAs etc.  Currently the values 1 and 2 are supported.

isDirectHybe: logical scalar: if TRUE, the mapping of probes to genomic
           strands is reversed with respect to the default. This is
          appropriate for data  from a direct RNA hybridization that
          used no reverse transcription.

scoreShow: character: name of a column in 'segScore' that is to be used
          for the coloring of the segments.

haveNames: logical; should their names be added to the feature symbols?

haveLegend: logical: should the plot contain a legend?

    main: character: plot title.

pointSize: unit object: point size used for the probe intensities
          scatterplot.

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

     _Intensities_: There are two alternative, mutually exclusive ways
     of providing the intensities to be plotted to this function.

        1.  Via the parameters 'y' and 'probeAnno'. Then, 'y' is a
           vector of intensities, and 'probeAnno' is an environment
           that contains integer vectors with start positions along the
           chromosomes and indices in 'y' of the probes. For example,
           the start positions and indices of probes for the + strand
           of chromosome 1 would be described by environment elements
           '"1.+.start"' and '"1.+.index"', respectively.

        2.  Via the parameter 'segRes'. In that case, the intended
           workflow for using this function is as follows: First, use
           the script 'segment.R' to generate a segmentation. This can
           be run in parallel on several processors, separately for
           each chromosome and strand. The results of this are stored
           in files of the name '1.+.rda', '1.-.rda', '2.+.rda', and so
           forth, typically within a dedicated directory. Then, the
           script 'viewsegmentation.R' can be used to view the
           segmentation results. It collects the 'R' objects in these
           '.rda' files into the environment 'segRes', with which it
           calls  this function.

           Furthermore, the script 'scoreSegments.R' can be used to
           calculate scores for each segment, which can be passed to
           this function using the 'segRes' argument.

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

     Wolfgang Huber <huber@ebi.ac.uk>

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

       ## 
      

