Various functions useful for plotting
Most of these functions are called internally by plotting functions, but are exported in case the user finds them useful.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
matrix with samples on columns and features on rows.
list, with each element of the list containing a vector of numeric indices.
the number of blank lines to add in the data matrix to separate the groups of indices (will govern the amount of white space if data is then fed to heatmap.)
numeric. Which colors to plot. Must be a numeric vector with values between 1 and 62.
either vector of breaks, or number of breaks (integer) or a number between 0 and 1 indicating a quantile, between which evenly spaced breaks should be calculated.
An object of class
character of length 60.
makeBlankData pulls the data corresponding to the row indices
groupsOfFeatures adds lines of NA values into data between these
groups. When given to heatmap, will create white space between these groups
bigPalette is a long palette of colors (length 62) used by
plotClusters and accompanying functions.
showBigPalette creates plot that gives index of each color in
showBigPalette will plot the
bigPalette functions with
their labels and index.
setBreaks gives a set of breaks (of length 52) equally spaced
between the boundaries of the data. If breaks is between 0 and 1, then the
evenly spaced breaks are between these quantiles of the data.
seqPal4 are palettes for the heatmap.
showHeatmapPalettes will show you these palettes.
makeBlankData returns a list with items
"dataWBlanks" The data with the rows of NAs separating the given indices.
"rowNamesWBlanks" A vector of characters giving the rownames for the data, including blanks for the NA rows. These are not given as rownames to the returned data because they are not unique. However, they can be given to the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
data(simData) x <- makeBlankData(simData[,1:10], groupsOfFeatures=list(c(5, 2, 3), c(20, 34, 25))) showBigPalette() setBreaks(.9,simData) #show the palette colors showHeatmapPalettes() #compare the palettes on heatmap cl <- clusterSingle(simData, clusterFunction="pam", subsample=FALSE, sequential=FALSE, clusterDArgs=list(k=8)) ## Not run: par(mfrow=c(2,3)) plotHeatmap(cl, colorScale=seqPal1, main="seqPal1") plotHeatmap(cl, colorScale=seqPal2, main="seqPal2") plotHeatmap(cl, colorScale=seqPal3, main="seqPal3") plotHeatmap(cl, colorScale=seqPal4, main="seqPal4") plotHeatmap(cl, colorScale=seqPal5, main="seqPal5") par(mfrow=c(1,1)) ## End(Not run)