Description Usage Arguments Value Note See Also Examples
xHeatmapAdv
is supposed to draw heatmap together with sidebars
on rows using ggplot2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | xHeatmapAdv(
data.main,
data.meta,
reorder = c("none", "row", "col", "both"),
colormap = "spectral",
ncolors = 64,
zlim = NULL,
barwidth = 0.3,
barheight = 4,
nbin = 64,
legend.title = "Main",
x.rotate = 60,
x.text.size = 6,
x.text.hjust = 0.5,
y.text.size = 6,
legend.text.size = 5,
legend.title.size = 6,
shape = 19,
size = 2,
plot.margin = unit(c(5.5, 5.5, 5.5, 5.5), "pt"),
font.family = "sans",
na.color = "grey80",
data.label = NULL,
label.size = 1,
label.color = "black",
meta.colormap = "spectral",
meta.x.rotate = 75,
meta.shape.continuous = 15,
meta.shape.discrete = 95,
meta.size = 2,
meta.location = c("right", "left"),
meta.width = 0.5,
gap.width = 0.5,
legend.width = NULL,
legend.direction = c("vertical", "horizontal"),
legend.nrow = NULL,
verbose = TRUE,
...
)
|
data.main |
a data frame/matrix for main heatmap. The coloring can be continuous (numeric matrix) or discrete (factor matrix) |
data.meta |
a data frame/matrix for metadata visualisation. The per-column coloring can be continuous (numeric) or discrete (factor) |
reorder |
how to reorder rows and columns. It can be "none" for no reordering, "row" for reordering rows according to number of sharings (by default), "col" for reordering columns, and "both" for reordering rows and columns |
colormap |
short name for the colormap. It can be one of "jet" (jet colormap), "bwr" (blue-white-red colormap), "gbr" (green-black-red colormap), "wyr" (white-yellow-red colormap), "br" (black-red colormap), "yr" (yellow-red colormap), "wb" (white-black colormap), and "rainbow" (rainbow colormap, that is, red-yellow-green-cyan-blue-magenta). Alternatively, any hyphen-separated HTML color names, e.g. "blue-black-yellow", "royalblue-white-sandybrown", "darkgreen-white-darkviolet". A list of standard color names can be found in http://html-color-codes.info/color-names |
ncolors |
the number of colors specified over the colormap |
zlim |
the minimum and maximum z values for which colors should be plotted, defaulting to the range of the finite values of displayed matrix |
barwidth |
the width of the colorbar. Default value is 'legend.key.width' or 'legend.key.size' in 'theme' or theme |
barheight |
the height of the colorbar. Default value is 'legend.key.height' or 'legend.key.size' in 'theme' or theme |
nbin |
the number of bins for drawing colorbar |
legend.title |
the title of the colorbar. By default, it is ” |
x.rotate |
the angle to rotate the x tick labelings. By default, it is 60 |
x.text.size |
the text size of the x tick labelings. By default, it is 6 |
x.text.hjust |
the hjust of the x tick labelings. By default, it is 0.5 |
y.text.size |
the text size of the y tick labelings. By default, it is 6 |
legend.text.size |
the text size of the legend tick labelings. By default, it is 5 |
legend.title.size |
the text size of the legend titles. By default, it is 6 |
shape |
the number specifying the shape. By default, it is 19 |
size |
the number specifying the shape size. By default, it is 2 |
plot.margin |
the margin (t, r, b, l) around plot. By default, it is unit(c(5.5,5.5,5.5,5.5),"pt") |
font.family |
the font family for texts |
na.color |
the color for NAs. By default, it is 'grey80' |
data.label |
a data frame/matrix used for the labelling |
label.size |
the label size |
label.color |
the label color |
meta.colormap |
the colormap for metadata |
meta.x.rotate |
the angle to rotate the x tick labelings for the metadata. By default, it is 90 |
meta.shape.continuous |
the number specifying the shape for continuous metadata. By default, it is 15 |
meta.shape.discrete |
the number specifying the shape for discrete metadata. By default, it is 95 |
meta.size |
the number specifying the shape size for metadata. By default, it is 2 |
meta.location |
the location of metadata. It can be "right" or "left" |
meta.width |
the width for each column in metadata. By default, it is 0.5 (relative to each column in main data) |
gap.width |
the width for the gap between panels. By default, it is 0.5 (relative to each column in main data) |
legend.width |
the width for the legend. By default, it is NULL automatically determined (which can be used as a reference to define later for the better visualisation) |
legend.direction |
the direction of the legend. It can be "vertical" or "horizontal" |
legend.nrow |
the row number for legends. By default, it is 3 for the vertical direction of the legend; 6 for the horizontal direction of the legend |
verbose |
logical to indicate whether the messages will be displayed in the screen. By default, it sets to true for display |
... |
additional graphic parameters for supraHex::visTreeBootstrap |
a gtable object
none
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
# Load the XGR package
library(XGR)
data(mtcars)
data.main <- mtcars[,1:6]
data.meta <- mtcars[,7:11]
gt <- xHeatmapAdv(data.main, data.meta, barwidth=0.3, barheight=2.5,
meta.location="right", legend.nrow=3, meta.width=0.4, gap.width=0.2,
legend.width=NULL)
gt <- xHeatmapAdv(data.main, data.meta, barwidth=0.3, barheight=4,
meta.location="right", legend.nrow=6, meta.width=0.4, gap.width=0.2,
legend.width=4)
dev.new(); grid::grid.draw(gt)
## End(Not run)
|
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Loading required package: dnet
Loading required package: supraHex
Loading required package: hexbin
Loading required package: ggplot2
data.main: 32 rows X 6 columns
data.meta: 32 rows X 5 columns (5 continuous + 0 discrete)
widths: 0.40 (meta), 0.20 (blank), 2.40 (legend)
data.main: 32 rows X 6 columns
data.meta: 32 rows X 5 columns (5 continuous + 0 discrete)
widths: 0.40 (meta), 0.20 (blank), 4.00 (legend)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.