plotGene               package:exonmap               R Documentation

_U_s_e _t_h_e _X:_M_A_P _d_a_t_a_b_a_s_e _t_o _f_i_n_d _a_n_n_o_t_a_t_e_d _g_e_n_e _s_t_r_u_c_t_u_r_e _a_n_d _g_e_n_e_r_a_t_e _a _p_l_o_t

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

     Draws a plot of a gene's structure, possibly coloured by
     expression data, similar to those shown in the X:Map genome
     browser.

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

     plotGene(x, data, gps, group, scale.to.gene = FALSE, 
         type = c("mean-int", "median-int", "mean-fc", "median-fc", "splicing-index"), 
         use.symbol = TRUE, use.mt = FALSE, 
         probes.min = 4, f = ps.value, f.extra.params, 
         col = col.rd.bl, col.range, col.f = value.to.colour,
         main, xlab, ylab, xlim, ylim,
         border.col = "#aaaaaa",no.data.col = "white", text.col="black",text.bg="white",
         exon.borders,
         pad=0.1,transcript.height=0.9,show.legend=TRUE)

     col.rd.bl

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

       x: the Ensembl gene id of the gene to plot

    data: Expression data (should be a matrix or 'ExpressionSet'). If
          present, used to colour the plot

     gps: Either a 'list' of groups by which to collect the expression
          data when calculating, for example, fold change or mean
          intensities, or, if 'group' is specified, the names of items
          in one of the columns in 'pData(x)'. See details.

   group: If specified, then the column in 'pData(x)' to use when
          defining the groups of arrays to compare. See details.

scale.to.gene: If 'TRUE', then mean-center each plot around zero.

    type: The type of calculatin used to create the data for the plot.
          See details.

use.symbol: If 'TRUE' then label by the gene symbol, if 'FALSE', the
          gene name.

  use.mt: If 'TRUE' then include multitarget probesets. See
          'select.probewise' and 'exclude.probewise' for details on how
          the filtering is done.

probes.min: The minimum number of probes within a probeset that must
          match to an exon before it is incorporated in the plot. 

       f: The function used to map between the expression data and a
          colour in 'col'. By default, this is 'ps.value'.

f.extra.params: Any extra parameters that need to be passed through to
          'f'. This is only necessary if supplying an alternative
          function for computing the colourings.

     col: A vector containing the colours to use when colouring the
          plot by expression data. 'col.rd.bl' is used by default.

col.range: A range specifying the extents of the colour palette.
          Expression data are turned into a value for each probeset
          (how this is done is defined by 'type') and then mapped into
          the colour vector 'col'. 'col.range' specifies the value
          corresponding to the first and last entry in the colour
          palette; values outside this range are mapped to the
          extremes. By default the ranges are 'c(-5,5)' for fold change
          plots and 'c(0,16)' for intensity. 

   col.f: Function used to map the expression summary data generated by
          'f' to a colour in 'col'. Not normally required; might be
          used for a non-linear scale, for example.

    main: Plot title.

    xlab: X axis label. Overrides 'use.symbol'. 

    ylab: Y axis label.

    xlim: Range of values to plot on the x axis. 

    ylim: Height of y-axis. By default this is just big enough to fit
          the gene. 

border.col: Colour to use for gene, transcript and exon edges.

no.data.col: Colour to plot exons with no matching probeset after
          filtering using 'probes.min' and 'use.mt'.

text.col: Colour to label genes and transcripts.

 text.bg: Label background colour for the gene label.

exon.borders: If 'TRUE' then draw a border around exons.

     pad: Vertical space to leave between each element of the plot.
          Character height is adjusted to be the same as 'pad'

transcript.height: Height of each transcript. With defaults, each gene
          is '(transcript.height + pad) * N + 3 * pad' high

show.legend: If 'TRUE', show a colour bar as a legend in the margin of
          the plot.

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

     At its simplest, takes an Ensembl gene name and plots the location
     and structure of the gene.  If data, gp1, and gp2 are specified,
     then colours the gene according to the expression data.  By
     default, this is done by calculating the mean fold change for all
     the well behaved exon probes (i.e. those that only hit the genome,
     once, in an exon in the gene of interest), mapping this value to a
     colour and using this to paint each exon in the gene. The same is
     done for transcripts and genes.  Other methods of colouring are
     specified by 'type', and should be self-explanatory. See the
     vignette for more details.  If scale.to.gene is 'TRUE', then
     fold-changes (or intensities, depending on the value of 'type')
     are calculated relative to the mean fold change for the gene.
     Exons for which no matching probesets are found are drawn with a
     black border and annotated with an 'x'.

     Groups of arrays can be specified in two ways, depending on
     whether 'groups' is supplied. If it is, then it should represent
     the name of a column in the 'ExpressionSet''s 'pData' object, and
     'gps' should be a list of levels in this factor defining the
     groups of arrays. So for example,
     '...,group="group",gps=c("a","b"),...' will define two groups of
     arrays, one for each cell line, as defined by the "group" column
     in the expression set's 'pData' object.

     Alternatively, if 'groups' is not supplied, 'gps' should be a list
     of numeric vectors, each defining the indices of a set of arrays.
     For example, '...,gps=list(a=1:3,b=4:6),...' would define two
     groups, called "a" and "b", each with three arrays in it.

     Note that for fold change calculations the number returned is
     gps[1] -gps[2] i.e. if gp[1] is more highly expressed than group
     2, the result is positive. With default colouring, positive values
     are blue, negative, red.

     Colouring can be changed by supplying an alternate palette to the
     default ('col.rd.bl'), and alternate mappings between values and
     colours can be generated by supplying a different function via
     'col.f'. See 'value.to.colour' for more details.

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

     none

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

     Crispin Miller

_R_e_f_e_r_e_n_c_e_s:

     <URL:  http://bioinformatics.picr.man.ac.uk/>

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

     'gene.legend' 'gene.strip' 'gene.graph' 'mappings' 'filters'
     'details'

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

      
       if(interactive()) {   
        xmapConnect()
        data(exonmap)
        par(mfrow=c(3,1))
        plotGene("ENSG00000141510",x.rma,gps=list(1:3,4:6),type="mean-fc")
        plotGene("ENSG00000141510",x.rma,gps=c("a","b"),group="group",type="mean-fc")
        plotGene("ENSG00000141510",x.rma,gps=list(1:3),type="mean-int",col=heat.colors(16))
        plotGene("ENSG00000141510",x.rma,gps=list(4:6),type="mean-int",col=heat.colors(16))
       }

