gene.strip {exonmap}R Documentation

Use the X:MAP database to find annotated gene structure and generate a plot for multiple genes

Description

Takes a list of genes and an ExpressionSet object or matrix and generates a plot summarising the expression data for the supplied genes.

Usage

gene.strip(genes,data,gps,group,col=col.rd.bl,col.range,type=c("mean-int","median-int","mean-fc","median-fc","splicing-index"),
           show.introns=FALSE,f,f.extra.params, col.f =value.to.colour, scale.to.gene = FALSE, use.symbols = TRUE,
           use.mt=FALSE,no.data.col="white",probes.min=4,main,xlab,ylab,xlim,show.legend=TRUE)

value.to.colour(vals,col=col.rd.bl,col.range=c(-5,5))
ps.value(x,gps,type=c("mean-int","median-int","mean-fc","median-fc","splicing-index"),f.extra.params)

Arguments

genes A character vector of Ensembl gene ids containing the genes to plot. Duplicates are removed, and genes plotted in order with the first gene being placed at the bottom of the plot
data Expression data (should be a matrix or ExpressionSet). If a matrix is suppplied row.names should correspond to probeset ids for the genes to be plotted. Note that if a probeset id is missing, the probeset will be silently ignored.
gps List of groups by which to collect the expression data when calculating, for example, fold change or mean intensities. Each group is a vector of column indices into data
group If specified, then the column in pData(x) to use
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 extreme. By default the ranges are c(-5,5) for fold change plots and c(0,16) for intensity.
type The way to map the expression data onto colours. For example, mean-fc expects two groups and calculates the mean fold-changes between them.
show.introns If FALSE, then draw exons in number order, all the same size. If TRUE, then x-position corresponds to residue position from the start of the gene, and intronic probes are also shown.
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.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.
scale.to.gene If TRUE,then mean-center the values for each gene around zero.
use.symbols If TRUE then label the plot using gene symbols. otherwise, use the Ensembl gene id.
use.mt If TRUE then use data from multiply targeted probesets when generating the plots. See select.probewise and exclude.probewise for more details.
no.data.col The colour to draw exons when there is no matching probeset
probes.min Ignore probesets unless they have at least this many probes hitting an exon or gene
main plot title
xlab x axis label
ylab y axis label
vals A numeric vector containing values that should be mapped into the specified palette
x A vector of expression data for a probeset
xlim range specifying x-axis limits within which to plot
show.legend If TRUE, then plot a colour bar in the margin of the plot, showing col and the col.range

Details

At its simplest, takes a list of genes and an ExpressionSet object and plots their data coloured by expression. Each row of the plot corresponds to a gene, and the X axis corresponds to position within that gene. By default the plot shows only exons. Each exon is represented by a rectangle, coloured using the expression data (see below), and introns are ignored. Overlapping exons are plotted next to each other, and if multiple probesets hit an exon they are stacked vertically within the exon. Data are filtered (by default) to remove multiply targeted probesets. If there are no 'well-behaved' probesets hitting an exon, it is drawn as a rectangle in the 'no.data.col', which is, by default, white.

If plot.introns is TRUE then introns are included in the plot, and position on the x-axis corresponds to nucleotide position relative to the start of the gene. Exons are drawn as rectangles in the border colour - the default is black. Note that they will show up as vertical lines if the gene is long and the the graph is not very wide. Each probe is represented by a line, is coloured by expression.

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.

Value

none

Author(s)

Crispin Miller

References

http://bioinformatics.picr.man.ac.uk/

See Also

gene.legend plotGene gene.graph

Examples

 
   if(interactive()) {
     data(exonmap)
     xmapConnect()
     genes <- probeset.to.gene(featureNames(x.rma))
     gene.strip(genes,x.rma,list(1:3,4:6),type="mean-fc",col.range=c(-2,2))
     par(mfrow=c(2,2))
     gene.strip(genes,x.rma,list(1:3),type="mean-int",col.range=c(0,16),col=heat.colors(16),main="MCF7",show.legend=FALSE)
     gene.strip(genes,x.rma,list(4:6),type="mean-int",col.range=c(0,16),col=heat.colors(16),main="MCF10A",show.legend=FALSE)
     gene.strip(genes,x.rma,list(1:3),type="mean-int",col.range=c(0,16),col=heat.colors(16),main="MCF7",show.introns=TRUE,show.legend=FALSE)
     gene.strip(genes,x.rma,list(4:6),type="mean-int",col.range=c(0,16),col=heat.colors(16),main="MCF10A",show.introns=TRUE,show.legend=FALSE)

     fold.changes <- apply(exprs(x.rma)[1:10,],1,ps.value,gps=list(1:3,4:6),type="mean-fc")
     value.to.colour(fold.changes)
  }

[Package exonmap version 2.0.03 Index]