Description Usage Arguments Details Value Improvements Colouring array data Author(s) Examples
Very flexible function to barplot results from an lmFit.
It handles results from 2 styles of limma analysis:
1:
“Standard analysis”: model.matrix > lmFit > eBayes
> topTable
2: “Constrast analysis”:
model.matrix > lmFit > fit.constrasts > eBayes >
topTable
1 2 3 4 5 6 7 | barplot_lmFit(fit1, fit2 = NULL, data, calls = NULL,
data.type = c("1colour", "2colour")[1], probes = NULL,
tt = NULL, number = 10, probe2genesymbol = NULL,
fit1.colour = "#53406A", fit2.colour = "#4F81BD",
data.colour = NULL, hgrid.col = "black", do.par = TRUE,
drop.fit1.intercept = FALSE,
legend.pos = "bottomright")
|
fit1 |
objects from lmFit. fit2 is optional. |
fit2 |
objects from lmFit. fit2 is optional. fit1 can also be just a data.frame which is useful for paired analyses, where you often convert the expression data (2n) into expression ratios (1n), prior to then fitting a linear model. In this instance, ags should be fit1=ratios, fit2=lmFitXYZ, data=rma. |
data |
data.frame of expression level data |
calls |
optional data.frame of calls, same dim as rma |
data.type |
“1colour” or “2colour” |
probes |
optional vector of probe indices, or probeset ids |
tt |
optional toptable of results. if supplied, you should set number to some |
number |
optional toptable of results. if supplied, you should set number to some positive integer corresponding to number of genes to plot. |
probe2genesymbol |
2 column table with probe ID's and gene symbols, respectively |
fit1.colour |
optional vector of colours for the N columns in fit1. defaults to grey |
fit2.colour |
optional vector of colours for the N columns in fit1. defaults to grey |
data.colour |
optional vector of colours for the N columns in fit1. defaults to grey. this is ignored if calls != NULL |
hgrid.col |
do you want horizontal grid lines? NULL means no, otherwise choose a single colour. |
do.par |
logical: set the layout and the par settings? |
drop.fit1.intercept |
logical: drop the intercept term in the first fit object? |
legend.pos |
Position of the legend. See
|
1. “Standard analysis”
for each probe, do a
barplot of the normalised data, then an errorbar plot
utilising the coefficients and the standard errors
(stdev.unscaled * sigma
) from the lmFit1 object.
2. “Contrast analysis”
for each probe, make 3
barplots. The first 2 are same as standard analysis, the
3rd is an errorbar plot based on fit2 object which you
get after doing a contrasts.fit
none
Probe selection:
1. probe=a numeric vector of row
indices into the lmFit (ie same row order as data)
2.
probe=vector of probesetID's which are in the rownames of
data and fit1 [and fit2] [and calls]
3. supply a
topTable object, and set the number of rows from top to
bottom to plot.
this can be from an F-test or t-test
if you supply a 'calls' object which is same dim as data, and contains “P”, “M” or “A”, then the bars for the expression data will be coloured green, orange or red, respectively.
Mark Cowley, 2009-07-16
1 2 3 4 5 6 7 8 | ## Not run:
barplot_lmFit(fit1, data=rma, probes=c("10543233", "10411107"))
barplot_lmFit(fit1, fit2, data=rma, probes=c("10543233", "10411107"))
barplot_lmFit(fit1, data=rma, tt=topTable, number=2)
barplot_lmFit(fit1, fit2, data=rma, tt=topTable, number=2)
barplot_lmFit(fit1, fit2, data=rma, calls=calls, tt=topTable, number=2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.