plotLogRatio(e, reference, within = NULL, across = NULL, nReplicatesVar = 3, filename = "Rplots", device = "svg", orderBy = list(rows = "hclust", cols = NULL), colorsColumns = NULL, colorsColumnsBy = NULL, colorsColumnsByPalette = c("#1B9E77", "#D95F02", "#7570B3", "#E7298A", "#66A61E", "#E6AB02", "#A6761D", "#666666"), colorsUseMeanQuantiles = FALSE, colorsMeanQuantilesPalette = c("orange", "red", "darkred"), colorsBarsMatrix = NULL, colorsGenesNames = c("black"), main = paste("log2 ratio's"), shortvarnames = NULL, longvarnames = NULL, gene.length = 50, gene.fontsize = 6, main.fontsize = 9, columnhead.fontsize = 8, mx = 1.5, exp.width = 1.8, exp.height = 0.2, log2l.show = TRUE, log4l.show = FALSE, quantiles.show = FALSE, quantiles.compute = c(0.9), error.show = TRUE, view.psid = FALSE, errorLabel = "Error bars show the pooled standard deviation", closeX11 = FALSE, openFile = FALSE, tooltipvalues = FALSE, probe2gene = TRUE, ...)quantile.show is TRUEdevice is SVG, do we close the required X11 device at the end?... c('cellline','compound','dose'. Ordering on rows can be done using of the
following values:
hclust invoked on specified exprs columns
colorsColumns The first way to assign colors is to provide a vector of colors that will
be used for each column (headers and its horizontal bars). This vector is recycled so that providing one unique
value will color all columns, whereas providing a vector of length 2 will alternate columnns colors.
colorsColumnsByTo be used when the experiment involves groupings for pData, for example dose,
cellline or treatment. In order to see the effects of such variables, one can color columns using
combinations of those. The argument is a vector of pData columns such as c('cellline','dose').
Unique combinations will be computed and a color will be assigned for each group of columns.
The vector that is provided with the argument colorsColumnsByPalette is used to assign colors.
If the argument colorColumnsBy is not NULL then it overrides the previous argument colorsColumns.
colorsUseMeanQuantiles A logical value. The default plotGeneDE displays for each gene the expression value difference
between treatment and reference, but does not reveal any information about the expression levels in these conditions.
Parameter colorsUseMeanQuantiles allows to color the horizontal bars according to expression level that
is derived from quantiles computed on averages of the complete ExpressionSet object.
As it involves the expression data of all probesets, computations must be done
before subsetting the ExpressionSet object and the plotGeneDEting. The function addQuantilesColors
computes quantiles and corresponding mean expression level intervals. If colorsUseMeanQuantiles 'TRUE',
previous coloring parameters are overriden. The parameter colorsMeanQuantilesPalette is used to assign
colors for average-quantiles-groups. Note that columns headers are still given by previous arguments.
colorsBarsMatrixThe most flexible way to assign colors as the matrix will be used to color each bar
of the plot individually. A check is done to ensure that the number of rows and columns are not less than the number of
probesets and columns. If not NULL, this parameter overrides the previous ones.
computeLogRatio,addQuantilesColorsif (require(ALL)){
data(ALL, package = "ALL")
ALL <- addGeneInfo(ALL)
ALL$BTtype <- as.factor(substr(ALL$BT,0,1))
ALL2 <- ALL[,ALL$BT != 'T1'] # omit subtype T1 as it only contains one sample
ALL2$BTtype <- as.factor(substr(ALL2$BT,0,1)) # create a vector with only T and B
# Test for differential expression between B and T cells
tTestResult <- tTest(ALL, "BTtype", probe2gene = FALSE)
topGenes <- rownames(tTestResult)[1:20]
# plot the log ratios versus subtype B of the top genes
LogRatioALL <- computeLogRatio(ALL2, reference=list(var='BT',level='B'))
a <- plotLogRatio(e=LogRatioALL[topGenes,],openFile=FALSE, tooltipvalues=FALSE, device='X11',
colorsColumnsBy=c('BTtype'), main = 'Top 20 genes most differentially between T- and B-cells',
orderBy = list(rows = "hclust"), probe2gene = TRUE)
}
## Not run:
# a <- plotLogRatio(e=LogRatioALL[topGenes,],openFile=TRUE, tooltipvalues=FALSE, device='pdf',
# colorsColumnsBy=c('BTtype'), main = 'Top 20 genes most differentially between T- and B-cells',
# orderBy = list(rows = "hclust", cols = "sex"), probe2gene = TRUE)
# ## End(Not run)
Run the code above in your browser using DataLab