Produce a single gTree object representing plots arranged
according to the provided Nightingale metabolomics figure template.
metabFigure(
data,
colorValue = "estimate",
sizeValue = "negLog10P",
legendHeight = 8,
context = gpar(cex = 0.8),
unitBase = unit(0.5, "cm"),
colorLim = c(NA, NA),
sizeLim = c(NA, NA)
)Produces a complete metabolomics figure consisting of 14
bubbleHeatmap blocks in a pre-set layout. Output is not drawn but returned as
a gTree object which can be edited or drawn using
the grid.draw function. NOTE: A cairo output device with
gradient support is necessary to correctly render the color legend.
Nightingale results data merged with the ntngale225 or ntngale249 template.
String naming the variable of data containing the
values to be plotted on the color scale.
String naming the variable of data containing the
values to scale bubble sizes.
Numeric, preferred height of legends in multiples of 0.5cm. This will be supplied to pretty function.
gpar object to provide drawing context.
Will be applied to the parent viewport in the childrenvp slot of the gTree.
unit object indicating the size of one
plot grid box.
Numeric vectors indicating limits (min/max) outside
which the values of color/size matrices should be truncated. NOTE! These
data ranges are separate from the scale ranges, which are taken from the
min/max values of colorBreaks and sizeBreaks.
Quick function to produce a final Nightingale figure from results data merged
with one of the supplied template datasets. This function wraps the functions
formatData, multiPlotInput,
bubbleHeatmapList and metabFigurePlot applying
default settings.
myData <- merge_template(cetp, "ckb_id")
metabTree <- metabFigure(myData)
grid.draw(metabTree)
Run the code above in your browser using DataLab