plot.gene {exonmap} | R Documentation |
Draws a plot of a gene's structure, possibly coloured by expression data, similar to that found on the X:MAP website.
plot.gene(gene, data, gps, 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
gene |
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 |
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 |
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. |
At its simplest, takes an ensembl gene id 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 into the chosen palette and
using the resulting colour to paint the gene. The same is done for
transcripts and exons. 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 fold change for the gene. Exions for which no matching
probesets are found are drawn with a black border and annotated with an 'x'.
Note that for fold change calculations the number returned is (gp1 - gp2) i.e. if gp1 is more highly expressed than group 2, the result is positive. With default colouring, positive values are blue, negative, red.
none
Crispin Miller
http://bioinformatics.picr.man.ac.uk/
gene.legend
gene.strip
gene.graph
## Not run: xmapDatabase("Human") data(exonmap) par(mfrow=c(3,1)) plot.gene("ENSG00000141510",x.rma,gps=list(1:3,4:6),type="mean-fc") plot.gene("ENSG00000141510",x.rma,gps=list(1:3),type="mean-int",col=heat.colors(16)) plot.gene("ENSG00000141510",x.rma,gps=list(4:6),type="mean-int",col=heat.colors(16)) ## End(Not run)