Title: | Next Generation Clustered Heat Maps |
---|---|
Description: | Next-Generation Clustered Heat Maps (NG-CHMs) allow for dynamic exploration of heat map data in a web browser. 'NGCHM' allows users to create both stand-alone HTML files containing a Next-Generation Clustered Heat Map, and .ngchm files to view in the NG-CHM viewer. See Ryan MC, Stucky M, et al (2020) <doi:10.12688/f1000research.20590.2> for more details. |
Authors: | Bradley M Broom [aut] |
Maintainer: | Mary A Rohrdanz <[email protected]> |
License: | GPL-3 |
Version: | 1.0.3 |
Built: | 2024-09-05 05:09:06 UTC |
Source: | https://github.com/MD-Anderson-Bioinformatics/NGCHM-R |
This function adds an 'ngchmAxis' to an 'ngchmVersion2' object.
## S4 method for signature 'ngchmVersion2,ngchmAxis' e1 + e2
## S4 method for signature 'ngchmVersion2,ngchmAxis' e1 + e2
e1 |
An object of class 'ngchmVersion2' to which the axis is to be added. |
e2 |
An object of class 'ngchmAxis' representing the axis to be added. |
An updated 'ngchmVersion2' object with the added axis.
Provide a simpler method for accessing repo methods
## S3 method for class 'shaidyRepo' repo$method
## S3 method for class 'shaidyRepo' repo$method
repo |
The repository to obtain the method for |
method |
The name of the method to obtain |
A function that calls the method with the repository as its first parameter
If variable value is far from integer, print error message and stop.
castAsInteger(variableToCast)
castAsInteger(variableToCast)
variableToCast |
Variable to cast as integer |
integer value of variableToCast
If variable value is far from integer, print error message and stop.
castListAsInteger(listToCast)
castListAsInteger(listToCast)
listToCast |
List to cast as integer |
list with members cast to integers
Each additional parameter is added to the NGCHM according to its type. Objects that require additional information (such as an axis) cannot be added using this function. Objects that can be added are layers (including numeric matrices), datasets, and colormaps.
chmAdd(chm, ...) ## S4 method for signature 'ngchm' chmAdd(chm, ...)
chmAdd(chm, ...) ## S4 method for signature 'ngchm' chmAdd(chm, ...)
chm |
The chm to add the object(s) to. |
... |
Zero or more objects to add to the NGCHM. |
The extended chm.
"chmAddAxisType"
"chmAddColormap"
"chmAddDataset"
"chmAddLayer"
"chmAddMetaData"
Adds an axis type to a Next Generation Clustered Heat Map (NGCHM) and returns the extended CHM. Multiple axis types may be added to either axis. When the NGCHM is made, any Axis functions matching the specified axis type will be automatically added to the appropriate axis menu, and any Matrix functions matching the types of the rows and columns will be automatically added to the matrix menu.
chmAddAxisType(chm, where, type, func) ## S4 method for signature 'ngchm,character,character,ngchmJS' chmAddAxisType(chm, where, type, func) ## S4 method for signature 'ngchm,character,character,character' chmAddAxisType(chm, where, type, func) ## S4 method for signature 'ngchm,character,character,missing' chmAddAxisType(chm, where, type, func)
chmAddAxisType(chm, where, type, func) ## S4 method for signature 'ngchm,character,character,ngchmJS' chmAddAxisType(chm, where, type, func) ## S4 method for signature 'ngchm,character,character,character' chmAddAxisType(chm, where, type, func) ## S4 method for signature 'ngchm,character,character,missing' chmAddAxisType(chm, where, type, func)
chm |
The chm to add the axis type to. |
where |
The axis to add the axis type to. Must be either "row" or "column". |
type |
The type to add to the specified axis. |
func |
A javascript function that gets values of that type from the current selection. If a string is provided, the function is obtained by calling chmGetFunction. |
The extended chm.
Add a colormap to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM. Duplicate colormaps will be silently dropped.
chmAddColormap(chm, colormap) ## S4 method for signature 'ngchm,ngchmColormap' chmAddColormap(chm, colormap)
chmAddColormap(chm, colormap) ## S4 method for signature 'ngchm,ngchmColormap' chmAddColormap(chm, colormap)
chm |
The chm to add the colormap to. |
colormap |
The colormap to add to the chm. |
Note that it is not necessary to explicitly add colormaps included with data layers or classification bars. These will be included automatically. Explicitly using this function is only required in order to add additional predefined, but unused colormaps to the NGCHM.
The extended chm.
Add a covariate to an auxiliary dataset and return the extended dataset. Do not confuse this function with the one for adding a covariate bar to an NGCHM. For that, please refer to the function chmAddCovariateBar.
chmAddCovariate(dataset, where, covariate) ## S4 method for signature 'ngchmDataset,character,ngchmCovariate' chmAddCovariate(dataset, where, covariate)
chmAddCovariate(dataset, where, covariate) ## S4 method for signature 'ngchmDataset,character,ngchmCovariate' chmAddCovariate(dataset, where, covariate)
dataset |
The dataset to add the covariate to. |
where |
The dataset axis to add the covariate to. Must be one of "row", "column", or "both". |
covariate |
The covariate to add to the dataset. |
The extended dataset.
Add a covariate bar to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM. If passed a covariate, a covariate bar will be created (using any optional parameters supplied) and added.
chmAddCovariateBar(chm, where, covar, ...) ## S4 method for signature 'ngchm,character,ngchmBar' chmAddCovariateBar(chm, where, covar) ## S4 method for signature 'ngchm,character,ngchmCovariate' chmAddCovariateBar(chm, where, covar, ...) ## S4 method for signature 'ngchm,character,list' chmAddCovariateBar(chm, where, covar, ...)
chmAddCovariateBar(chm, where, covar, ...) ## S4 method for signature 'ngchm,character,ngchmBar' chmAddCovariateBar(chm, where, covar) ## S4 method for signature 'ngchm,character,ngchmCovariate' chmAddCovariateBar(chm, where, covar, ...) ## S4 method for signature 'ngchm,character,list' chmAddCovariateBar(chm, where, covar, ...)
chm |
The chm to add the covariate bar to. |
where |
The chm axis(axes) to add the covariate bar to. Must be one of "row", "column", or "both". |
covar |
The covariate or covariate bar (or a list of them) to add to the chm. |
... |
Additional parameters passed to chmNewCovariateBar if covar is a covariate. |
If a covariate bar with the same name already exists on the specified axis or axes, the existing bar will be replaced by the new bar.
The extended chm.
Add custom Cascading Style Sheet (CSS) to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM.
chmAddCSS(chm, css) ## S4 method for signature 'ngchm,character' chmAddCSS(chm, css)
chmAddCSS(chm, css) ## S4 method for signature 'ngchm,character' chmAddCSS(chm, css)
chm |
The chm to add the CSS to. |
css |
The css selector and style information. |
The extended chm.
Add an auxiliary dataset to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM. The auxiliary dataset will be stored with the NGCHM and be available in whole or in part from the same server, for use, for example, in custom Javascript functions. Do not confuse this function with the one for adding an active data layer to the heatmap itself. For that, please refer to the function chmAddLayer.
chmAddDataset(chm, dataset) ## S4 method for signature 'ngchm,ngchmDataset' chmAddDataset(chm, dataset)
chmAddDataset(chm, dataset) ## S4 method for signature 'ngchm,ngchmDataset' chmAddDataset(chm, dataset)
chm |
The chm to add the dataset to. |
dataset |
The dataset to add to the chm. |
The extended chm.
Add an extra dialog to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM.
chmAddDialog(chm, dialog) ## S4 method for signature 'ngchm,ngchmDialog' chmAddDialog(chm, dialog)
chmAddDialog(chm, dialog) ## S4 method for signature 'ngchm,ngchmDialog' chmAddDialog(chm, dialog)
chm |
The chm to add the dialog to. |
dialog |
The dialog to add to the chm. |
The extended chm.
Add a Layer to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM. A CHM requires at least one Layer. The first layer added to a NGCHM becomes the primary layer. The second layer added to a NGCHM, if any, becomes the secondary (flicker) layer. Currently at most two layers can be added to a NGCHM.
chmAddLayer(chm, layer) ## S4 method for signature 'ngchm,ngchmLayer' chmAddLayer(chm, layer) ## S4 method for signature 'ngchm,matrix' chmAddLayer(chm, layer)
chmAddLayer(chm, layer) ## S4 method for signature 'ngchm,ngchmLayer' chmAddLayer(chm, layer) ## S4 method for signature 'ngchm,matrix' chmAddLayer(chm, layer)
chm |
The chm to add the layer to. |
layer |
The layer to add to the chm. |
The extended chm.
Add a popup menu entry to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM.
chmAddMenuItem(chm, where, label, func) ## S4 method for signature 'ngchm,character,character,ngchmJS' chmAddMenuItem(chm, where, label, func) ## S4 method for signature 'ngchm,character,character,character' chmAddMenuItem(chm, where, label, func)
chmAddMenuItem(chm, where, label, func) ## S4 method for signature 'ngchm,character,character,ngchmJS' chmAddMenuItem(chm, where, label, func) ## S4 method for signature 'ngchm,character,character,character' chmAddMenuItem(chm, where, label, func)
chm |
The chm to add the menu entry to. |
where |
The chm menu(s) to add the menu entry to. Must be one of "row", "column", "both", or "element". |
label |
The label to display in the menu entry. |
func |
The javascript function to invoke when the menu entry is selected. |
The extended chm.
This function adds metadata to a NG-CHM (Next-Generation Clustered Heat Map) object.
chmAddMetaData(chm, where, type, value) ## S4 method for signature 'ngchm,character,character,character' chmAddMetaData(chm, where, type, value)
chmAddMetaData(chm, where, type, value) ## S4 method for signature 'ngchm,character,character,character' chmAddMetaData(chm, where, type, value)
chm |
An object of class 'ngchm'. |
where |
A single character string specifying where to add the metadata. Can be "row", "column", or "both". |
type |
A single character string specifying the type of the metadata. |
value |
A character vector specifying the values of the metadata. If value is a character vector, elements of the vector will be attached as meta data to to NGCHM row of the same name. |
An updated 'ngchm' object with the new metadata added.
Generate an overview image of the NGCHM when making it. By default, the system generates no default overview images. If only one of width or height is specified, the other is calculated based on the aspect ratio of the map.
chmAddOverview(chm, format, width, height) ## S4 method for signature 'ngchm,character,optNumeric,optNumeric' chmAddOverview(chm, format, width, height)
chmAddOverview(chm, format, width, height) ## S4 method for signature 'ngchm,character,optNumeric,optNumeric' chmAddOverview(chm, format, width, height)
chm |
The chm to add the overview to. |
format |
The format of the overview ('pdf', 'png', or 'svg'). |
width |
The width of the overview. |
height |
The height of the overview. |
The extended chm.
Add PCA coordinates as hidden covariate bars to an axis of an NG-CHM. One hidden covariate bar is added for each PCA coordinate (up to ndim coordinates). Coordinates are given names 'BASENAME.coordinate.N', where BASENAME is specified by the parameter basename (default "PC") and N ranges from 1 to the number of added covariate bars.
chmAddPCA(hm, axis, prc, basename = "PC", ndim = 2)
chmAddPCA(hm, axis, prc, basename = "PC", ndim = 2)
hm |
The NGCHM to add the coordinates to. |
axis |
The NGCHM axis ("row" or "column") to add the coordinates to. |
prc |
Principal component coordinates (output of |
basename |
The prefix to use for the coordinate names. |
ndim |
The maximum number of coordinates to add. |
The NGCHM with added coordinates.
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") prc <- prcomp(TCGA.GBM.EXPR[1:50, 1:50]) hm <- chmNew("gbm", TCGA.GBM.EXPR[1:50, 1:50]) hm <- chmAddPCA(hm, "column", prc) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) prc <- prcomp(matrix) hm <- chmNew("Demo PCA", matrix) hm <- chmAddPCA(hm, "column", prc) ## End(Not run)
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") prc <- prcomp(TCGA.GBM.EXPR[1:50, 1:50]) hm <- chmNew("gbm", TCGA.GBM.EXPR[1:50, 1:50]) hm <- chmAddPCA(hm, "column", prc) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) prc <- prcomp(matrix) hm <- chmNew("Demo PCA", matrix) hm <- chmAddPCA(hm, "column", prc) ## End(Not run)
Add custom property to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM.
chmAddProperty(chm, label, value) ## S4 method for signature 'ngchm,character,character' chmAddProperty(chm, label, value)
chmAddProperty(chm, label, value) ## S4 method for signature 'ngchm,character,character' chmAddProperty(chm, label, value)
chm |
The chm to add the property to. |
label |
The property label. |
value |
The property value. |
The extended chm.
Add (reduced) dimension coordinates from an object obj as hidden covariate bars to an axis of an NG-CHM. Depending on the object type, dimName and dimAxis can be used to specify the name of the dimension of interest in obj.
chmAddReducedDim(hm, axis, obj, dimName, maxDim, basename, dimAxis)
chmAddReducedDim(hm, axis, obj, dimName, maxDim, basename, dimAxis)
hm |
The NGCHM to add the coordinates to. |
axis |
The NGCHM axis ("row" or "column") to add the coordinates to. |
obj |
An object containing the (reduced) dimension. |
dimName |
The name of the (reduced) dimension to create covariate bars for. |
maxDim |
The maximum number of coordinates to add (default all). |
basename |
The prefix to use for the coordinate names (defaults to dimName). |
dimAxis |
The axis on obj containing the named dimension, if applicable. |
One hidden covariate bar is added for each coordinate obtained from obj
.
If specified, maxDim limits the maximum number of covariate bars added to the chm.
Coordinates have names 'BASENAME.coordinate.N', where BASENAME is specified by the parameter basename (defaults to dimName if omitted) and N ranges from 1 to the number of added covariate bars.
obj
can be a numeric matrix, each column of which is a (reduced) dimension. In this case, dimName and dimAxis
are not used for obtaining the reduced dimension. The number of rows of the matrix must equal the size of the specified
NGCHM axis and each row of the matrix must be uniquely named using the names from that axis of the NG-CHM.
obj
can also be an instance of class className if there exists an S3 method getDimensions.className.
The method takes the object as its first parameter and up to two optional parameters, dimName and dimAxis,
that can be used to specify the desired dimension. The method's return value is a matrix similar to
the one described in the preceding paragraph. This package defines methods for classes prcomp
and umap
.
The NGCHM with added coordinates.
# Examples using `chmNew()` require git to be installed. ## Not run: if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") mat <- TCGA.GBM.EXPR[1:10, 1:10] prc <- prcomp(mat) hm <- chmNew("Demo reduced dimension coordinates", mat) hm <- chmAddReducedDim(hm, "column", prc, "PCA", 3, "PC") umc <- umap::umap(t(mat), n_neighbors = 8) hm <- chmAddReducedDim(hm, "column", umc, "UMAP") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) prc <- prcomp(matrix) hm <- chmNew("Demo reduced dimension coordinates", matrix) hm <- chmAddReducedDim(hm, "column", prc, "PCA", 3, "PC") umc <- umap::umap(t(matrix), n_neighbors = 8) hm <- chmAddReducedDim(hm, "column", umc, "UMAP") ## End(Not run)
# Examples using `chmNew()` require git to be installed. ## Not run: if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") mat <- TCGA.GBM.EXPR[1:10, 1:10] prc <- prcomp(mat) hm <- chmNew("Demo reduced dimension coordinates", mat) hm <- chmAddReducedDim(hm, "column", prc, "PCA", 3, "PC") umc <- umap::umap(t(mat), n_neighbors = 8) hm <- chmAddReducedDim(hm, "column", umc, "UMAP") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) prc <- prcomp(matrix) hm <- chmNew("Demo reduced dimension coordinates", matrix) hm <- chmAddReducedDim(hm, "column", prc, "PCA", 3, "PC") umc <- umap::umap(t(matrix), n_neighbors = 8) hm <- chmAddReducedDim(hm, "column", umc, "UMAP") ## End(Not run)
Add a link to related information to the NGCHM.
chmAddRelated(chm, group, link, description) ## S4 method for signature 'ngchm,character,character,character' chmAddRelated(chm, group, link, description)
chmAddRelated(chm, group, link, description) ## S4 method for signature 'ngchm,character,character,character' chmAddRelated(chm, group, link, description)
chm |
The chm to add the related link to. |
group |
The name of the group this link belongs to. |
link |
The link to include. Should be either an absolute URL, or a NGCHM name on the same server. |
description |
A string describing the referenced link and its relationship to the current NGCHM. |
The extended chm.
Add a group of related links to the NGCHM.
chmAddRelatedGroup(chm, name, header, linktype, blurb) ## S4 method for signature 'ngchm,character,character,character,character' chmAddRelatedGroup(chm, name, header, linktype, blurb) ## S4 method for signature 'ngchm,character,character,character,missing' chmAddRelatedGroup(chm, name, header, linktype)
chmAddRelatedGroup(chm, name, header, linktype, blurb) ## S4 method for signature 'ngchm,character,character,character,character' chmAddRelatedGroup(chm, name, header, linktype, blurb) ## S4 method for signature 'ngchm,character,character,character,missing' chmAddRelatedGroup(chm, name, header, linktype)
chm |
The chm to add the related link group to. |
name |
The name of the group of links. |
header |
The header that should be displayed for this group of links. |
linktype |
Type of link belonging to this group. |
blurb |
An optional descriptive paragraph to include between the group header and the group links. |
The extended chm.
Adds a CHM-specific axis type function to a Next Generation Clustered Heat Map (NGCHM) and returns the extended CHM. Multiple axis type functions may be added to either axis. When the NGCHM is made, any specific Axis functions matching the specified axis type will be automatically added to the appropriate axis menu.
chmAddSpecificAxisTypeFunction(chm, where, type, label, func) ## S4 method for signature 'ngchm,character,character,character,ngchmJS' chmAddSpecificAxisTypeFunction(chm, where, type, label, func) ## S4 method for signature 'ngchm,character,character,character,character' chmAddSpecificAxisTypeFunction(chm, where, type, label, func)
chmAddSpecificAxisTypeFunction(chm, where, type, label, func) ## S4 method for signature 'ngchm,character,character,character,ngchmJS' chmAddSpecificAxisTypeFunction(chm, where, type, label, func) ## S4 method for signature 'ngchm,character,character,character,character' chmAddSpecificAxisTypeFunction(chm, where, type, label, func)
chm |
The chm to add the axis type to. |
where |
The axis to add the axis type to. Must be either "row", "column", or "both". |
type |
The type expected by the specified function. |
label |
The label to use if and when the function is added to the menu. |
func |
A javascript function that accepts a list of values of that type. If a string is provided, the function is obtained by calling chmGetFunction. |
The extended chm.
Add one or more tags to a Next Generation Clustered Heat Map (NGCHM) and return the extended CHM.
chmAddTag(chm, tag) ## S4 method for signature 'ngchm,character' chmAddTag(chm, tag)
chmAddTag(chm, tag) ## S4 method for signature 'ngchm,character' chmAddTag(chm, tag)
chm |
The chm to add the dataset to. |
tag |
The tag(s) to add to the chm. |
The extended chm.
Add a file template to the NGCHM.
chmAddTemplate(chm, source.path, dest.path, substitutions) ## S4 method for signature 'ngchm,charOrFunction,character,optList' chmAddTemplate(chm, source.path, dest.path, substitutions)
chmAddTemplate(chm, source.path, dest.path, substitutions) ## S4 method for signature 'ngchm,charOrFunction,character,optList' chmAddTemplate(chm, source.path, dest.path, substitutions)
chm |
The chm to add the file template to. |
source.path |
A string giving the path to the template, or a function that returns the template content as a string. |
dest.path |
A string giving the relative path where to store the template in the generated CHM. |
substitutions |
A list (may be empty) of substitutions to make in the template. |
The extended chm.
This function adds a toolbox to a NG-CHM (Next-Generation Clustered Heat Map) axis.
chmAddToolboxR(CHM, axis, axistype, datasetname, idstr) ## S4 method for signature 'ngchm,character,character,character,character' chmAddToolboxR(CHM, axis, axistype, datasetname, idstr)
chmAddToolboxR(CHM, axis, axistype, datasetname, idstr) ## S4 method for signature 'ngchm,character,character,character,character' chmAddToolboxR(CHM, axis, axistype, datasetname, idstr)
CHM |
An object of class 'ngchm'. |
axis |
A single character string specifying the axis where the toolbox will be added. Can be "row", "column", or "both". |
axistype |
A single character string specifying the type of the axis. |
datasetname |
A single character string specifying the name of the dataset. |
idstr |
string to append to toolbox menu labels (default ”) |
An updated 'ngchm' object with the new toolbox added.
This function adds a toolbox of type R2 to a NG-CHM (Next-Generation Clustered Heat Map) object.
chmAddToolboxR2(CHM, axistype, datasetname, idstr) ## S4 method for signature 'ngchm,character,character,character' chmAddToolboxR2(CHM, axistype, datasetname, idstr)
chmAddToolboxR2(CHM, axistype, datasetname, idstr) ## S4 method for signature 'ngchm,character,character,character' chmAddToolboxR2(CHM, axistype, datasetname, idstr)
CHM |
An object of class 'ngchm'. |
axistype |
A single character string specifying the type of the axis. |
datasetname |
A single character string specifying the name of the dataset. |
idstr |
string to append to toolbox menu labels (default ”) |
An updated 'ngchm' object with the new toolbox of type R2 added.
This function adds a toolbox of type RC to a NG-CHM (Next-Generation Clustered Heat Map) object.
chmAddToolboxRC(CHM, rowtype, coltype, datasetname, idstr) ## S4 method for signature 'ngchm,character,character,character,character' chmAddToolboxRC(CHM, rowtype, coltype, datasetname, idstr)
chmAddToolboxRC(CHM, rowtype, coltype, datasetname, idstr) ## S4 method for signature 'ngchm,character,character,character,character' chmAddToolboxRC(CHM, rowtype, coltype, datasetname, idstr)
CHM |
An object of class 'ngchm'. |
rowtype |
A single character string specifying the type of the row. |
coltype |
A single character string specifying the type of the column. |
datasetname |
A single character string specifying the name of the dataset. |
idstr |
string to append to toolbox menu labels (default ”) |
An updated 'ngchm' object with the new toolbox of type RC added.
Add TSNE coordinates as hidden covariate bars to an axis of an NG-CHM. One hidden covariate bar is added for each TSNE coordinate. Coordinates have names 'BASENAME.coordinate.N', where BASENAME is specified by the parameter basename (default TSNE) and N ranges from 1 to the number of added covariate bars.
chmAddTSNE(hm, axis, tsne, pointIds, basename = "TSNE")
chmAddTSNE(hm, axis, tsne, pointIds, basename = "TSNE")
hm |
The NGCHM to add the coordinates to |
axis |
The NGCHM axis ("row" or "column") to add the coordinates to |
tsne |
TSNE coordinates (output of Rtsne::Rtsne()) for the specified NGCHM axis |
pointIds |
The NGCHM names for the data points in tsne |
basename |
The prefix to use for the coordinate names. |
pointIds is required because Rtsne::Rtsne() does not preserve the rownames of the data matrix it was applied to. Their values must match those on that axis of the NGCHM, but their order must match those in the data matrix passed to Rtsne::Rtsne().
The NGCHM with added coordinates.
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") mat <- TCGA.GBM.EXPR[1:10, 1:10] rtc <- Rtsne::Rtsne(t(mat), check_duplicates = FALSE, perplexity = 3) hm <- chmNew("gbm", mat) hm <- chmAddTSNE(hm, "column", rtc, colnames(mat)) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) rtc <- Rtsne::Rtsne(t(matrix), check_duplicates = FALSE, perplexity = 3) hm <- chmNew("Demo TSNE", matrix) hm <- chmAddTSNE(hm, "column", rtc, colnames(matrix)) ## End(Not run)
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") mat <- TCGA.GBM.EXPR[1:10, 1:10] rtc <- Rtsne::Rtsne(t(mat), check_duplicates = FALSE, perplexity = 3) hm <- chmNew("gbm", mat) hm <- chmAddTSNE(hm, "column", rtc, colnames(mat)) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) rtc <- Rtsne::Rtsne(t(matrix), check_duplicates = FALSE, perplexity = 3) hm <- chmNew("Demo TSNE", matrix) hm <- chmAddTSNE(hm, "column", rtc, colnames(matrix)) ## End(Not run)
Add UMAP coordinates as hidden covariate bars to an axis of an NG-CHM. One hidden covariate bar is added for each UMAP coordinate. Coordinates have names 'BASENAME.coordinate.N', where BASENAME is specified by the parameter basename (default UMAP) and N ranges from 1 to the number of added covariate bars.
chmAddUMAP(hm, axis, umap, basename = "UMAP")
chmAddUMAP(hm, axis, umap, basename = "UMAP")
hm |
The NGCHM to add the coordinates to. |
axis |
The NGCHM axis ("row" or "column") to add the coordinates to. |
umap |
TSNE coordinates (output of umap::umap()) for the specified NGCHM axis. |
basename |
The prefix to use for the coordinate names. |
The NGCHM with added coordinates.
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") mat <- TCGA.GBM.EXPR[1:50, 1:50] umc <- umap::umap(t(mat)) hm <- chmNew("gbm", mat) hm <- chmAddUMAP(hm, "column", umc) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) umc <- umap::umap(t(matrix), n_neighbors = 8) hm <- chmNew("Demo UMAP", matrix) hm <- chmAddUMAP(hm, "column", umc) ## End(Not run)
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") mat <- TCGA.GBM.EXPR[1:50, 1:50] umc <- umap::umap(t(mat)) hm <- chmNew("gbm", mat) hm <- chmAddUMAP(hm, "column", umc) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) umc <- umap::umap(t(matrix), n_neighbors = 8) hm <- chmNew("Demo UMAP", matrix) hm <- chmAddUMAP(hm, "column", umc) ## End(Not run)
Add UWOT::UMAP coordinates as hidden covariate bars to an axis of an NG-CHM. One hidden covariate bar is added for each UMAP coordinate. Coordinates have names 'BASENAME.coordinate.N', where BASENAME is specified by the parameter basename (default UMAP) and N ranges from 1 to the number of added covariate bars.
chmAddUWOT(hm, axis, uwot, pointIds, basename = "UMAP")
chmAddUWOT(hm, axis, uwot, pointIds, basename = "UMAP")
hm |
The NGCHM to add the coordinates to. |
axis |
The NGCHM axis ("row" or "column") to add the coordinates to. |
uwot |
UMAP coordinates (output of uwot::umap()) for the specified NGCHM axis. |
pointIds |
The NGCHM names for the data points in uwot |
basename |
The prefix to use for the coordinate names. |
pointIds is required because uwot::umap() does not preserve the rownames of the data matrix it was applied to. Their values must match those on that axis of the NGCHM, but their order must match those in the data matrix passed to uwot::umap().
The NGCHM with added coordinates.
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") umc <- uwot::umap(t(TCGA.GBM.EXPR[1:50, 1:50])) hm <- chmNew("gbm", TCGA.GBM.EXPR[1:50, 1:50]) hm <- chmAddUWOT(hm, "column", umc, colnames(TCGA.GBM.EXPR[1:50, 1:50])) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) umc <- uwot::umap(t(matrix), n_neighbors = 8) hm <- chmNew("Demo UMAP", matrix) hm <- chmAddUWOT(hm, "column", umc, colnames(matrix)) ## End(Not run)
# Examples using `chmNew()` require git to be installed. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") umc <- uwot::umap(t(TCGA.GBM.EXPR[1:50, 1:50])) hm <- chmNew("gbm", TCGA.GBM.EXPR[1:50, 1:50]) hm <- chmAddUWOT(hm, "column", umc, colnames(TCGA.GBM.EXPR[1:50, 1:50])) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) umc <- uwot::umap(t(matrix), n_neighbors = 8) hm <- chmNew("Demo UMAP", matrix) hm <- chmAddUWOT(hm, "column", umc, colnames(matrix)) ## End(Not run)
This function creates a new Axis for adding to a Next Generation Clustered Heat Map. You can specify any axis name here, but chmAdd only accepts row, column, and both.
chmAxis(axis, ...)
chmAxis(axis, ...)
axis |
The name of the axis |
... |
Objects to add to the axis |
An object of class 'ngchmAxis' representing the newly created axis.
x_axis <- chmAxis('row') y_axis <- chmAxis('col')
x_axis <- chmAxis('row') y_axis <- chmAxis('col')
This function creates a new AxisType for adding to an ngchmAxis.
chmAxisType(typename, func)
chmAxisType(typename, func)
typename |
The name of the axis type to be created. This should be a single character string. |
func |
The function to be used for getting label values. If not provided, the default 'getLabelValue' function is used. If a character string is provided, it is assumed to be the name of a function and is retrieved using 'chmGetFunction'. If a function is provided, it is checked to be of class 'ngchmJS'. |
An object of class 'ngchmAxisType' representing the newly created axis type.
Create a new JS function by binding values to extra parameters of an existing JS function.
chmBindFunction(name, fn, bindings) ## S4 method for signature 'character,ngchmJS,list' chmBindFunction(name, fn, bindings) ## S4 method for signature 'character,character,list' chmBindFunction(name, fn, bindings)
chmBindFunction(name, fn, bindings) ## S4 method for signature 'character,ngchmJS,list' chmBindFunction(name, fn, bindings) ## S4 method for signature 'character,character,list' chmBindFunction(name, fn, bindings)
name |
A single character string specifying the name of the function. |
fn |
An object of class 'ngchmJS' representing the function to be bound. |
bindings |
A list containing at least one parameter binding. Each list element binds one parameter, starting from the first unbound parameter, and the name of each list element must match the name of the corresponding parameter. |
A new 'ngchmJS' object representing the bound function.
Opens the NG-CHM browser page in the viewer.
chmBrowse(server = NULL, viewer = NULL)
chmBrowse(server = NULL, viewer = NULL)
server |
The NG-CHM server to be browsed. If NULL, the function will use the first server in the list of available servers. |
viewer |
The function to be used to open the web browser. If NULL, the function will use the 'browseURL' function. |
None. This function is used for its side effects of opening a web browser to view the NG-CHM server.
This function sets the column order for a NG-CHM (Next-Generation Clustered Heat Map) object.
chmColOrder(chm) <- value ## S4 replacement method for signature 'ngchm,optDendrogram' chmColOrder(chm) <- value
chmColOrder(chm) <- value ## S4 replacement method for signature 'ngchm,optDendrogram' chmColOrder(chm) <- value
chm |
An object of class 'ngchm'. |
value |
An object of class 'optDendrogram' or 'file' specifying the new column order. If value is NULL, the labels will be displayed in the same order they are found in the first data layer. If value is a character vector, the labels will be displayed in that order. If value is a dendrogram, the labels displayed in the order they occur in a depth first traversal of the tree. |
An updated 'ngchm' object with the new column order.
"chmRowOrder<-"
Get the color map of an NG-CHM object.
chmColorMap(x)
chmColorMap(x)
x |
The NG-CHM object to get the color map of. Can be:
|
An ngchmColormap
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") colormap <- chmColorMap(chmNewDataLayer("New layer", TCGA.GBM.EXPR[1:3, 1:3])) } matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) colormap <- chmColorMap(chmNewDataLayer("New layer", matrix))
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") colormap <- chmColorMap(chmNewDataLayer("New layer", TCGA.GBM.EXPR[1:3, 1:3])) } matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) colormap <- chmColorMap(chmNewDataLayer("New layer", matrix))
Set the color map of an NG-CHM object
chmColorMap(x) <- value
chmColorMap(x) <- value
x |
The NG-CHM object on which to set the color map. |
value |
The ngchmColormap value to set. |
The modified NG-CHM object.
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") dataLayer <- chmNewDataLayer("GBM layer", TCGA.GBM.EXPR[1:30, 1:30]) chmColorMap(dataLayer) <- chmNewColorMap(c(2, 14)) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) dataLayer <- chmNewDataLayer("my layer", matrix) chmColorMap(dataLayer) <- chmNewColorMap(c(2, 14))
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") dataLayer <- chmNewDataLayer("GBM layer", TCGA.GBM.EXPR[1:30, 1:30]) chmColorMap(dataLayer) <- chmNewColorMap(c(2, 14)) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) dataLayer <- chmNewDataLayer("my layer", matrix) chmColorMap(dataLayer) <- chmNewColorMap(c(2, 14))
Get the colors of an ngchmColormap, ngchmLayer, ngchmBar, or ngchmCovariate.
chmColors(x)
chmColors(x)
x |
The object to get the colors of. |
A character string vector of the map colors.
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") colors <- chmColors(chmNewDataLayer("GBM Expression", TCGA.GBM.EXPR[1:50, 1:50])) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) colors <- chmColors(chmNewDataLayer("my layer", matrix))
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") colors <- chmColors(chmNewDataLayer("GBM Expression", TCGA.GBM.EXPR[1:50, 1:50])) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) colors <- chmColors(chmNewDataLayer("my layer", matrix))
Set the colors of an ngchmColormap, ngchmLayer, ngchmBar, or ngchmCovariate.
chmColors(x) <- value
chmColors(x) <- value
x |
The NG-CHM object on which to set the colors. |
value |
A character string vector of colors. The vector length must equal the number of data points in the color map. |
The modified NG-CHM object.
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") layer <- chmNewDataLayer("GBM Layer", TCGA.GBM.EXPR[1:50, 1:50]) chmColors(layer) <- c("blue", "white", "red") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) layer <- chmNewDataLayer("my layer", matrix) chmColors(layer) <- c("blue", "white", "red")
# If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.EXPR, package = "NGCHMDemoData") layer <- chmNewDataLayer("GBM Layer", TCGA.GBM.EXPR[1:50, 1:50]) chmColors(layer) <- c("blue", "white", "red") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) layer <- chmNewDataLayer("my layer", matrix) chmColors(layer) <- c("blue", "white", "red")
Get a covariate attached to an NG-CHM dataset.
chmCovariate(dataset, fullname, where)
chmCovariate(dataset, fullname, where)
dataset |
The NG-CHM dataset to get the covariate from. |
fullname |
The full name of the covariate to get. If no covariate with that name exists, return NULL. |
where |
The axis or axes on which to look for the covariate Can be "row", "column", or "both" (default). |
A ngchmCovariate or NULL.
chmNewCovariate
chmCovariateBar
# If the NGCHMDemoData package is installed, use it to create demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.Demo, package = "NGCHMDemoData") dataset <- chmNewDataset("gbmexpr", "TCGA GBM Expression Data", TCGA.GBM.ExpressionData) dataset <- chmAddCovariate( dataset, "column", chmNewCovariate("TP53 Mutation", TCGA.GBM.TP53MutationData) ) tp53_mutation <- chmCovariate(dataset, "TP53 Mutation") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) dataset <- chmNewDataset("Demo", "Random Demo Dataset", matrix) covariate <- setNames(rnorm(10), colnames(matrix)) dataset <- chmAddCovariate(dataset, "column", chmNewCovariate("Random Covariate", covariate)) random_covariate <- chmCovariate(dataset, "Random Covariate")
# If the NGCHMDemoData package is installed, use it to create demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.Demo, package = "NGCHMDemoData") dataset <- chmNewDataset("gbmexpr", "TCGA GBM Expression Data", TCGA.GBM.ExpressionData) dataset <- chmAddCovariate( dataset, "column", chmNewCovariate("TP53 Mutation", TCGA.GBM.TP53MutationData) ) tp53_mutation <- chmCovariate(dataset, "TP53 Mutation") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) dataset <- chmNewDataset("Demo", "Random Demo Dataset", matrix) covariate <- setNames(rnorm(10), colnames(matrix)) dataset <- chmAddCovariate(dataset, "column", chmNewCovariate("Random Covariate", covariate)) random_covariate <- chmCovariate(dataset, "Random Covariate")
Get a covariate bar attached to an NG-CHM.
chmCovariateBar(hm, fullname, where)
chmCovariateBar(hm, fullname, where)
hm |
The NG-CHM to get the covariate bar from. |
fullname |
The full name of the covariate bar to get. If no covariate bar with that name exists, return NULL. |
where |
The axis or axes on which to look for the covariate bar Can be "row", "column", or "both" (default). |
An ngchmBar or NULL.
chmNewCovariateBar
chmCovariate
# Examples using `chmNew()` require git to be installed and available. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { # Create example NGCHM with covariate bar data(TCGA.GBM.Demo, package = "NGCHMDemoData") hm <- chmNew("gbmexpr", TCGA.GBM.ExpressionData[1:50, 1:50]) hm <- chmAddCovariateBar( hm, "column", chmNewCovariate("TP53 Mutation", TCGA.GBM.TP53MutationData[1:50]) ) # Get covariate bar by name tp53_covariate_bar <- chmCovariateBar(hm, "TP53 Mutation") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) hm <- chmNew("Demo", matrix) covariate <- setNames(rnorm(10), colnames(matrix)) hm <- chmAddCovariateBar(hm, "column", chmNewCovariate("my covariate", covariate)) my_covariate_bar <- chmCovariateBar(hm, "my covariate") ## End(Not run)
# Examples using `chmNew()` require git to be installed and available. ## Not run: # If the NGCHMDemoData package is installed, use it to demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { # Create example NGCHM with covariate bar data(TCGA.GBM.Demo, package = "NGCHMDemoData") hm <- chmNew("gbmexpr", TCGA.GBM.ExpressionData[1:50, 1:50]) hm <- chmAddCovariateBar( hm, "column", chmNewCovariate("TP53 Mutation", TCGA.GBM.TP53MutationData[1:50]) ) # Get covariate bar by name tp53_covariate_bar <- chmCovariateBar(hm, "TP53 Mutation") } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) hm <- chmNew("Demo", matrix) covariate <- setNames(rnorm(10), colnames(matrix)) hm <- chmAddCovariateBar(hm, "column", chmNewCovariate("my covariate", covariate)) my_covariate_bar <- chmCovariateBar(hm, "my covariate") ## End(Not run)
This function creates a new NG-CHM (Next-Generation Clustered Heat Map) collection on the server.
chmCreateCollection(path, recursive = FALSE)
chmCreateCollection(path, recursive = FALSE)
path |
The path where the collection should be created. This should be a single character string. |
recursive |
A logical value indicating whether to create parent collections if they do not exist. Default is FALSE. |
The path is a sequence of components separated by slashes (/). If the path begins with a double slash (//) the following component is interpreted as a server name. If the server name is omitted (i.e. empty) the default server will be used. If the path does not begin with a double slash, the current server will be used.
If the path begins with a slash, the components (following the server, if specified) are interpreted relative to the root collection of the server concerned. Otherwise, they are interpreted relative to the current collection.
The interpretation of each path component is server specific.
None. This function is used for its side effects of creating a new collection on the server.
Create an ngchmServer object called 'serverName' (see details). The new ngchmServer object is returned and registered so that it can be referenced by name, including retrieval using chmServer. This library will communicate with the NG-CHM using the private address. Returned URLs for viewing NG-CHMs will use the public address.
chmCreateManagedServer( serverName, privateAddr, publicAddr = NULL, chmPort = 80, managerPort = 18080, serviceName = "default", ... )
chmCreateManagedServer( serverName, privateAddr, publicAddr = NULL, chmPort = 80, managerPort = 18080, serviceName = "default", ... )
serverName |
The name of the new server object. |
privateAddr |
Private IP name/address of the server. |
publicAddr |
Public IP name/address of the server. |
chmPort |
Port on which the chm viewer is listening. |
managerPort |
Port on which the chm manager is listening. |
serviceName |
Name of the chmManager service |
... |
Additional options passed to chmCreateServer |
The created (and registered) ngchmServer object.
Create an ngchmServer object called 'serverName' from the specification 'serverSpec' (see details). serverOptions override those in the specification files option by option. The new ngchmServer object is returned and registered so that it can be referenced by name, including retrieval using chmServer.
chmCreateServer(serverName, serverSpec = NULL, serverOptions = NULL)
chmCreateServer(serverName, serverSpec = NULL, serverOptions = NULL)
serverName |
The name of the new server object. |
serverSpec |
The specification for the server (defaults to servername). |
serverOptions |
A named list of server options. |
serverSpec can be any of:
The specification will be read from a file 'config.txt' in that directory.
A minimal specification will be inferred. Known methods for uploading NGCHMs to the server will be autoprobed unless specified manually.
The specification will be read from the specified URL.
serverOptions can include both protocol-specific options and the following generic options:
The URL for the NGCHM server.
The protocol to be used for uploading etc. NGCHMs to the server.
The jarFile used to build NGCHMs.
The amount of trace to output. Defaults to "PROGRESS".
The created (and registered) ngchmServer object.
Get the user's current collection
chmCurrentCollection()
chmCurrentCollection()
the identity of the current collection
Get the user's current server
chmCurrentServer()
chmCurrentServer()
the identity of the current server
Return default column order of an NGCHM
chmDefaultColOrder(chm)
chmDefaultColOrder(chm)
chm |
An NGCHM containing at least one layer |
Shaid of a dendrogram suitable for use as the chm's column order.
Return default row order of an NGCHM
chmDefaultRowOrder(chm)
chmDefaultRowOrder(chm)
chm |
An NGCHM containing at least one layer |
Shaid of a dendrogram suitable for use as the chm's row order.
Return the name of a Next Generation Clustered Heat Map (NGCHM) server.
chmDeployServer(server) ## S4 method for signature 'ngchmServer' chmDeployServer(server)
chmDeployServer(server) ## S4 method for signature 'ngchmServer' chmDeployServer(server)
server |
The server whose name is required. |
The name of the server.
Create a standalone viewer for the NGCHM in the specified file. This function requires Java 11 and the NGCHMSupportFiles package.
chmExportToFile( chm, filename, overwrite = FALSE, shaidyMapGen, shaidyMapGenJava, shaidyMapGenArgs )
chmExportToFile( chm, filename, overwrite = FALSE, shaidyMapGen, shaidyMapGenJava, shaidyMapGenArgs )
chm |
The NGCHM to export |
filename |
The file in which to save the rendered NGCHM |
overwrite |
Overwrite file iff true (default false) |
shaidyMapGen |
Path to shaidyMapGen jar file (default to value of environment variable SHAIDYMAPGEN) |
shaidyMapGenJava |
Path to java executable with which to run shaidyMapGen (default to value of environment variable SHAIDYMAPGENJAVA or java) |
shaidyMapGenArgs |
Additional arguments to pass to java when running shaidyMapGen (default to value of environment variable SHAIDYMAPGENARGS) |
The NGCHMSupportFiles package can be installed from the R-universe repository: install.packages('NGCHMDemoData',
repos = c('https://md-anderson-bioinformatics.r-universe.dev',
'https://cloud.r-project.org'))
the rendered NGCHM
Create a standalone HTML containing the NGCHM in the specified file. This function requires Java 11 and the NGCHMSupportFiles package.
chmExportToHTML( chm, filename, overwrite = FALSE, shaidyMapGen, shaidyMapGenJava, shaidyMapGenArgs, ngchmWidgetPath )
chmExportToHTML( chm, filename, overwrite = FALSE, shaidyMapGen, shaidyMapGenJava, shaidyMapGenArgs, ngchmWidgetPath )
chm |
The NGCHM to generate the PDF for |
filename |
The file in which to save the PDF |
overwrite |
Overwrite file iff true (default false) |
shaidyMapGen |
Path to shaidyMapGen jar file (default to value of environment variable SHAIDYMAPGEN) |
shaidyMapGenJava |
Path to java executable with which to run shaidyMapGen (default to value of environment variable SHAIDYMAPGENJAVA or java) |
shaidyMapGenArgs |
Additional arguments to pass to java when running shaidyMapGen (default to value of environment variable SHAIDYMAPGENARGS) |
ngchmWidgetPath |
Path to location of ngchm Widget (ngchmWidget-min.js). Defaults to environment variable NGCHMWIDGETPATH. |
The NGCHMSupportFiles package can be installed from the R-universe repository: install.packages('NGCHMDemoData',
repos = c('https://md-anderson-bioinformatics.r-universe.dev',
'https://cloud.r-project.org'))
filename
Create a PDF of the NGCHM in the specified file. This function requires Java 11 and the NGCHMSupportFiles package.
chmExportToPDF( chm, filename, overwrite = FALSE, shaidyMapGen, shaidyMapGenJava, shaidyMapGenArgs )
chmExportToPDF( chm, filename, overwrite = FALSE, shaidyMapGen, shaidyMapGenJava, shaidyMapGenArgs )
chm |
The NGCHM to generate the PDF for |
filename |
The file in which to save the PDF |
overwrite |
Overwrite file iff true (default false) |
shaidyMapGen |
Path to shaidyMapGen jar file (default to value of environment variable SHAIDYMAPGEN) |
shaidyMapGenJava |
Path to java executable with which to run shaidyMapGen (default to value of environment variable SHAIDYMAPGENJAVA or java) |
shaidyMapGenArgs |
Additional arguments to pass to java when running shaidyMapGen (default to value of environment variable SHAIDYMAPGENARGS) |
The NGCHMSupportFiles package can be installed from the R-universe repository: install.packages('NGCHMDemoData',
repos = c('https://md-anderson-bioinformatics.r-universe.dev',
'https://cloud.r-project.org'))
filename
This function returns the name of a Javascript function thats accepts a string vector as its parameter, and for each string in the vector splits the string into fields separated by fieldsep, and accesses field idx (zero origin). The function returns a vector of these fields.
chmFieldAccessFunction(fieldsep, idx)
chmFieldAccessFunction(fieldsep, idx)
fieldsep |
The separator to be used for splitting the input string. This should be a single character string. |
idx |
The index (zero origin) of the field to be returned after splitting the input string. This should be a single integer. |
The name of the function returned for a specific fieldsep and idx will be constant within an R session, but may differ between R sessions (or if this library is unloaded and reloaded).
The name of the newly created field access function.
# Create a new field access function that splits the input string at ',' and # returns the first field. chmFieldAccessFunction(',', 1) # Create a new field access function that splits the input string at '-' and # returns the second field. chmFieldAccessFunction('-', 2)
# Create a new field access function that splits the input string at ',' and # returns the first field. chmFieldAccessFunction(',', 1) # Create a new field access function that splits the input string at '-' and # returns the second field. chmFieldAccessFunction('-', 2)
This function retrieves the dataset associated with a specific NG-CHM (Next-Generation Clustered Heat Map).
chmGetDataset(object) ## S4 method for signature 'ngchmLayer' chmGetDataset(object)
chmGetDataset(object) ## S4 method for signature 'ngchmLayer' chmGetDataset(object)
object |
An NG-CHM object containing an ngchmDataset |
The dataset associated with the specified object.
This function retrieves the configuration of a specified NG-CHM (Next-Generation Clustered Heat Map) deployment server.
chmGetDeployServerConfig(server)
chmGetDeployServerConfig(server)
server |
The server for which the configuration is to be retrieved. This can be either a character string representing the server name or an object of class 'ngchmServer'. |
The configuration of the specified server if it exists, otherwise NULL.
This function returns a predefined Javascript function that can be used when building a Next Generation Clustered Heat Map.
chmGetFunction(name)
chmGetFunction(name)
name |
The name of the predefined Javascript function desired. |
An object of class ngchmFunction if found, NULL otherwise.
This function returns the file path to the specified overview image of the CHM. The CHM must be made before the file can be accessed. If idx is specified, format if given must equal that of the overview image, and the path to that overview image is returned. If idx is not specified, the file path to the first overview of the given format (default 'png') is returned.
chmGetOverview(chm, format = NULL, idx = NULL)
chmGetOverview(chm, format = NULL, idx = NULL)
chm |
The CHM for which the overview is to be retrieved. |
format |
The format of overview image desired (defaults to 'png' if idx is not specified). |
idx |
The index of the overview image desired (defaults to first image of the specified format). |
The path to the retrieved overview.
This function retrieves a specific property from a NG-CHM (Next-Generation Clustered Heat Map) object.
chmGetProperty(object, label) ## S4 method for signature 'ngchmVersion2,character' chmGetProperty(object, label)
chmGetProperty(object, label) ## S4 method for signature 'ngchmVersion2,character' chmGetProperty(object, label)
object |
An object of class 'ngchmVersion2' representing the NG-CHM from which the property is to be retrieved. |
label |
A single character string specifying the label of the property to be retrieved. |
The property associated with the specified label in the 'ngchmVersion2' object.
This function gets any registered information about a type name used for determining row and column linkouts. Registration of a typename is (currently) not required in order to use it, so it's possible for valid type name not to have any registered information.
chmGetTypeInfo(typename)
chmGetTypeInfo(typename)
typename |
The name of the type. |
Object of class "ngchm.type.info" containing basic information about the type.
Return the URL for accessing the specified Next Generation Clustered Heat Map (NGCHM) on the specified server.
chmGetURL(chm, ...) ## S4 method for signature 'character' chmGetURL(chm, server = NULL, ...) ## S4 method for signature 'ngchm' chmGetURL(chm, server = NULL, ...)
chmGetURL(chm, ...) ## S4 method for signature 'character' chmGetURL(chm, server = NULL, ...) ## S4 method for signature 'ngchm' chmGetURL(chm, server = NULL, ...)
chm |
A single character string specifying the name of the NG-CHM. |
... |
Ignored. |
server |
The server on which to view the NGCHM |
A character string representing the URL of the specified NG-CHM on the specified server.
This function checks if a specific property exists in a NG-CHM (Next-Generation Clustered Heat Map) object.
chmHasProperty(object, label) ## S4 method for signature 'ngchmVersion2,character' chmHasProperty(object, label)
chmHasProperty(object, label) ## S4 method for signature 'ngchmVersion2,character' chmHasProperty(object, label)
object |
An object of class 'ngchmVersion2' representing the NG-CHM to be checked. |
label |
A single character string or a vector of character strings specifying the label(s) of the property(ies) to be checked. |
A logical value indicating whether the specified property(ies) exist in the 'ngchmVersion2' object. If 'label' is a vector, a logical vector is returned.
Add the given Next-Generation Clustered Heat Map (NG-CHM) to the specified collection (default: current collection).
chmInstall(chm, ...) ## S4 method for signature 'ngchm' chmInstall(chm, path, ...)
chmInstall(chm, ...) ## S4 method for signature 'ngchm' chmInstall(chm, path, ...)
chm |
The NGCHM to install. |
... |
Additional server (protocol) specific parameters. |
path |
The path to the collection in which to install the NGCHM. |
The installed chm.
Get the label/name of an NG-CHM object.
chmLabel(x)
chmLabel(x)
x |
The NG-CHM object to get the label/name of. Can be:
|
A character string (or a vector of strings for an ngchmColormap)
chmLabel(chmNew("New CHM"))
chmLabel(chmNew("New CHM"))
Set the label/name of an NG-CHM object
chmLabel(x) <- value
chmLabel(x) <- value
x |
The NG-CHM object on which to set the label/name. |
value |
The new name (a single character string). |
The modified NG-CHM object.
hm <- chmNew("Old name") chmLabel(hm) <- "A new name"
hm <- chmNew("Old name") chmLabel(hm) <- "A new name"
This function returns a Data Layer contained in a Next Generation Clustered Heat Map.
chmLayer(hm, label)
chmLayer(hm, label)
hm |
The NG-CHM object to get the data layer from. |
label |
The name or index of the data layer to get. If a name, return the layer with that name. If no layer with that name exists or if the index is out of range, return NULL. |
An object of class ngchmLayer or NULL.
# Examples using `chmNew()` require git to be installed and available. ## Not run: # If the NGCHMDemoData package is installed, use it to create an example usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { # Create example NGCHM data(TCGA.GBM.Demo, package = "NGCHMDemoData") matrix <- TCGA.GBM.ExpressionData[1:50, 1:50] hm <- chmNew("New Heat Map") + chmNewDataLayer("my layer", matrix) layer <- chmLayer(hm, "my layer") same_layer <- chmLayer(hm, 1) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) hm <- chmNew("New Heat Map") + chmNewDataLayer("my layer", matrix) layer <- chmLayer(hm, "my layer") same_layer <- chmLayer(hm, 1) ## End(Not run)
# Examples using `chmNew()` require git to be installed and available. ## Not run: # If the NGCHMDemoData package is installed, use it to create an example usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { # Create example NGCHM data(TCGA.GBM.Demo, package = "NGCHMDemoData") matrix <- TCGA.GBM.ExpressionData[1:50, 1:50] hm <- chmNew("New Heat Map") + chmNewDataLayer("my layer", matrix) layer <- chmLayer(hm, "my layer") same_layer <- chmLayer(hm, 1) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) hm <- chmNew("New Heat Map") + chmNewDataLayer("my layer", matrix) layer <- chmLayer(hm, "my layer") same_layer <- chmLayer(hm, 1) ## End(Not run)
This function sets a Data Layer in a Next Generation Clustered Heat Map.
x |
The NG-CHM object to set the data layer of |
label |
The name or index of the data layer to set. If a name, replace the layer with that name. Append a new layer if no layer with that name exists. If an index, replace the specified layer. If zero (0), prepend the new layer. If minus one (-1) or N+1 (for an NG-CHM with N layers), appends a new layer. |
colors |
A colormap for the new layer. If missing, defaults to the color map of the layer being replaced, or to the default new layer color map for a new layer. |
summarizationMethod |
The summarization method for the new layer. If missing, defaults to the summarization method of the layer being replaced, or to the default new layer summarization method for a new layer. |
cuts_color |
The cuts color for the new layer. If missing, defaults to the cuts color of the layer being replaced, or to the default cuts color for a new layer. |
value |
Either a matrix or a data layer to set in the NG-CHM. If value is a matrix, the other data layer parameters (label, colors, summarizationMethod, and cuts_color) are set from the parameters if specified, from the old data layer (if any), or the defaults for a new data layer (see chmNewDataLayer). If value is a data layer, any other data layer parameters specified will override those in the replacement layer. |
An object of class ngchm.
chmNewDataLayer
# If the NGCHMDemoData package is installed, use demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.Demo, package = "NGCHMDemoData") matrix <- TCGA.GBM.ExpressionData[1:50, 1:50] hm <- chmNew("New Heat Map") chmLayer(hm, "Layer 1") <- matrix chmLayer(hm, 1, cuts_color = "#fefefe") <- chmNewDataLayer("New data layer", matrix + 1) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) hm <- chmNew("New Heat Map") chmLayer(hm, "Layer 1") <- matrix chmLayer(hm, 1, cuts_color = "#fefefe") <- chmNewDataLayer("New data layer", matrix + 1)
# If the NGCHMDemoData package is installed, use demo usage if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { data(TCGA.GBM.Demo, package = "NGCHMDemoData") matrix <- TCGA.GBM.ExpressionData[1:50, 1:50] hm <- chmNew("New Heat Map") chmLayer(hm, "Layer 1") <- matrix chmLayer(hm, 1, cuts_color = "#fefefe") <- chmNewDataLayer("New data layer", matrix + 1) } # Small example not requiring NGCHMDemoData matrix <- matrix(rnorm(100), nrow = 10, ncol = 10, dimnames = list(paste0("r", 1:10), paste0("c", 1:10)) ) hm <- chmNew("New Heat Map") chmLayer(hm, "Layer 1") <- matrix chmLayer(hm, 1, cuts_color = "#fefefe") <- chmNewDataLayer("New data layer", matrix + 1)
This function lists the predefined Javascript functions available for use in NGCHM menus.
chmListFunctions(re = ".*")
chmListFunctions(re = ".*")
re |
The regular expression to match. This should be a single character string. Default is ".*", which matches all functions. |
A string containing the names and descriptions of the matching functions.
chmListFunctions() # List all functions. chmListFunctions('^chm') # List all functions whose names start with 'chm'.
chmListFunctions() # List all functions. chmListFunctions('^chm') # List all functions whose names start with 'chm'.
This function lists all NG-CHM (Next-Generation Clustered Heat Map) servers that are currently available.
chmListServers()
chmListServers()
A character vector containing the names of all available servers.
servers <- chmListServers() # Get a list of all available servers.
servers <- chmListServers() # Get a list of all available servers.
This function returns a list of the axis types for which axis- or matrix- menu entries may be defined.
chmListTypes(re = ".*")
chmListTypes(re = ".*")
re |
Only types with names matching re are returned (default ".*") |
a character vector of axis type names
Load an R CHM object from an NG-CHM server. The CHM concerned must have been built using this library, version 0.9.4 or later.
chmLoadCHM(serverOrURL, name) ## S4 method for signature 'ngchmServer,character' chmLoadCHM(serverOrURL, name) ## S4 method for signature 'character,character' chmLoadCHM(serverOrURL, name) ## S4 method for signature 'character,missing' chmLoadCHM(serverOrURL, name)
chmLoadCHM(serverOrURL, name) ## S4 method for signature 'ngchmServer,character' chmLoadCHM(serverOrURL, name) ## S4 method for signature 'character,character' chmLoadCHM(serverOrURL, name) ## S4 method for signature 'character,missing' chmLoadCHM(serverOrURL, name)
serverOrURL |
An object of class 'ngchmServer' representing the server from which the NG-CHM is to be loaded. |
name |
A single character string specifying the name of the NG-CHM to be loaded. |
An object of class 'ngchm' representing the loaded NG-CHM.
Load an NG-CHM from an NG-CHM server.
chmLoadShaidyCHM(mapid, debug = FALSE)
chmLoadShaidyCHM(mapid, debug = FALSE)
mapid |
An NG-CHM ShaidyID that identifies the NG-CHM to download. |
debug |
If TRUE, return a list containing additional information . |
An object of class ngchm.
Deprecated. Users should no longer call this method directly.
chmMake(chm, ...) ## S4 method for signature 'ngchm' chmMake(chm, ...)
chmMake(chm, ...) ## S4 method for signature 'ngchm' chmMake(chm, ...)
chm |
The NGCHM to compile. |
... |
Additional chmMake options that depend on the format of the NGCHM. For details of the additional parameters of format x see ngchmMakeFormat.x (e.g. ngchmMakeFormat.original). |
Compiles the specified Next Generation Clustered Heat Map (NGCHM) in preparation for installation.
The chm
This function makes a specific NG-CHM (Next-Generation Clustered Heat Map) private on a specified server.
chmMakePrivate(server, chm) ## S4 method for signature 'ngchmServer,character' chmMakePrivate(server, chm) ## S4 method for signature 'ngchmServer,ngchm' chmMakePrivate(server, chm) ## S4 method for signature 'character,ngchm' chmMakePrivate(server, chm) ## S4 method for signature 'character,character' chmMakePrivate(server, chm)
chmMakePrivate(server, chm) ## S4 method for signature 'ngchmServer,character' chmMakePrivate(server, chm) ## S4 method for signature 'ngchmServer,ngchm' chmMakePrivate(server, chm) ## S4 method for signature 'character,ngchm' chmMakePrivate(server, chm) ## S4 method for signature 'character,character' chmMakePrivate(server, chm)
server |
An object of class 'ngchmServer' representing the server where the NG-CHM is hosted. |
chm |
A single character string specifying the name of the NG-CHM to be made private. |
No return value. The function is called for its side effect of making the specified NG-CHM private on the specified server.
This function makes a specific NG-CHM (Next-Generation Clustered Heat Map) public on a specified server.
chmMakePublic(server, chm) ## S4 method for signature 'ngchmServer,character' chmMakePublic(server, chm) ## S4 method for signature 'ngchmServer,ngchm' chmMakePublic(server, chm) ## S4 method for signature 'character,ngchm' chmMakePublic(server, chm) ## S4 method for signature 'character,character' chmMakePublic(server, chm)
chmMakePublic(server, chm) ## S4 method for signature 'ngchmServer,character' chmMakePublic(server, chm) ## S4 method for signature 'ngchmServer,ngchm' chmMakePublic(server, chm) ## S4 method for signature 'character,ngchm' chmMakePublic(server, chm) ## S4 method for signature 'character,character' chmMakePublic(server, chm)
server |
An object of class 'ngchmServer' representing the server where the NG-CHM is hosted. |
chm |
A single character string specifying the name of the NG-CHM to be made public. |
No return value. The function is called for its side effect of making the specified NG-CHM public on the specified server.
This function opens a web browser to view the NG-CHM (Next-Generation Clustered Heat Map) Manager on the specified server.
chmManager(server = NULL, viewer = NULL)
chmManager(server = NULL, viewer = NULL)
server |
The NG-CHM server to be browsed. If NULL, the function will use the first server in the list of available servers. |
viewer |
The function to be used to open the web browser. If NULL, the function will use the 'browseURL' function. |
None. This function is used for its side effects of opening a web browser to view the NG-CHM Manager.
This function returns the name of a Next Generation Clustered Heat Map (NGCHM) object.
chmName(chm) ## S4 method for signature 'ngchm' chmName(chm)
chmName(chm) ## S4 method for signature 'ngchm' chmName(chm)
chm |
The CHM for which the name is required. |
A string.
This function creates a Next Generation Clustered Heat Map (NGCHM) object in memory. Additional parameters will be added to the new NGCHM (see chmAdd). The bare NGCHM needs at least one data layer added to it before it can be compiled. This function requires git to be installed.
chmNew( name, ..., rowOrder = chmDefaultRowOrder, rowDist = "correlation", rowAgglom = "ward.D2", colOrder = chmDefaultColOrder, colDist = "correlation", colAgglom = "ward.D2", rowAxisType = NULL, colAxisType = NULL, rowCovariates = NULL, colCovariates = NULL, format = "original", rowGapLocations = NULL, rowGapWidth = 5, colGapLocations = NULL, colGapWidth = 5, overview = c(), logLevel = "INFO", logFile = NULL )
chmNew( name, ..., rowOrder = chmDefaultRowOrder, rowDist = "correlation", rowAgglom = "ward.D2", colOrder = chmDefaultColOrder, colDist = "correlation", colAgglom = "ward.D2", rowAxisType = NULL, colAxisType = NULL, rowCovariates = NULL, colCovariates = NULL, format = "original", rowGapLocations = NULL, rowGapWidth = 5, colGapLocations = NULL, colGapWidth = 5, overview = c(), logLevel = "INFO", logFile = NULL )
name |
The name under which the NGCHM will be saved to the NGCHM server. |
... |
Zero or more initial objects to include in the NGCHM (see chmAdd). |
rowOrder |
A vector, dendrogram, or function specifying the CHM row order. |
rowDist |
Distance method to use by default RowOrder |
rowAgglom |
Agglomeration method to use by default RowOrder |
colOrder |
A vector, dendrogram, or function specifying the CHM column order. |
colDist |
Distance method to use by default ColOrder |
colAgglom |
Agglomeration method to use by default ColOrder |
rowAxisType |
The type(s) of the row labels (default: None). |
colAxisType |
The type(s) of the column labels (default: None). |
rowCovariates |
Covariate(Bar)(s) to add to the rows (default: None). |
colCovariates |
Covariate(Bar)(s) to add to the columns (default: None). |
format |
The format of NGCHM to produce (default: 'original'). |
rowGapLocations |
Locations for row gaps. Specify as a list of integers or |
rowGapWidth |
Width of row gaps (default: 5 rows) |
colGapLocations |
Locations for col gaps. Specify as a list of integers or |
colGapWidth |
Width of col gaps (default: 5 cols) |
overview |
The format(s) of overview image(s) to create (default: None). |
logLevel |
The level of logs to output |
logFile |
The file to which logs should be output |
An object of class ngchm
mychm <- chmNew("test_chm") mychm <- chmNew("test_chm", rowGapLocations = c(3, 5)) mychm <- chmNew("test_chm", rowGapLocations = chmTreeGaps(4)) mychm <- chmNew("test_chm", rowGapWidth = 3)
mychm <- chmNew("test_chm") mychm <- chmNew("test_chm", rowGapLocations = c(3, 5)) mychm <- chmNew("test_chm", rowGapLocations = chmTreeGaps(4)) mychm <- chmNew("test_chm", rowGapWidth = 3)
This function creates a new Color Map suitable for use in constructing Data Layers and Covariates in Next Generation Clustered Heat Maps. Color maps can be used in both discrete and continuous contents. In a discrete context, values specifies the properties of series. In a continuous context, values specifies the break points.
chmNewColorMap( values, colors = NULL, names = NULL, shapes = NULL, zs = NULL, type = "linear", missing.color = NULL, palette = NULL )
chmNewColorMap( values, colors = NULL, names = NULL, shapes = NULL, zs = NULL, type = "linear", missing.color = NULL, palette = NULL )
values |
A vector specifying the series / break points for which the following colors are defined, or a data matrix. |
colors |
Either a string vector specifying the color to use for each series / break point, or a single integer. |
names |
A string vector specifying 'human-readable' names for each series / break point. |
shapes |
A string vector specifying the shape to use for each series. |
zs |
A numeric vector specifying the z order to use for each series. |
type |
The string "linear" (default) or "quantile" (or unique abbreviation thereof). |
missing.color |
A string specifying the color to use for missing data. |
palette |
A function(n) that returns a vector of n colors. |
If values is a matrix, the function will estimate a suitable sequence of color break points. For a quantile color map, the matrix data is ignored. For a linear color map, it will use equispaced values between a low value and a high value. The low value is the median of the minima of each row in the matrix, and the high value is the median of the row maxima. If the low and high values have different signs, the values will be symmetric about zero.
An object of class ngchmColormap
noise.colors <- chmNewColorMap(c(0, 1, 2), c("green", "black", "red"), missing.color = "yellow" ) bar.colors <- chmNewColorMap(c("small", "big"), c("#00FFFF", "#FF00FF"), type = "quantile" )
noise.colors <- chmNewColorMap(c(0, 1, 2), c("green", "black", "red"), missing.color = "yellow" ) bar.colors <- chmNewColorMap(c("small", "big"), c("#00FFFF", "#FF00FF"), type = "quantile" )
This function creates a new Covariate suitable for a covariate bar or attaching to an NGCHM auxilary dataset.
chmNewCovariate( fullname, values, value.properties = NULL, type = NULL, covabbv = NULL )
chmNewCovariate( fullname, values, value.properties = NULL, type = NULL, covabbv = NULL )
fullname |
The full (human readable) name of the covariate. |
values |
A named vector of values (character, logical, or numeric). |
value.properties |
An ngchmColormap mapping values to properties. |
type |
The string "discrete" or the string "continuous". (Defaults to continuous for numeric values, to discrete otherwise.) |
covabbv |
The short R-compatible identifier used to identify the covariate (derived from fullname if not specified). |
An object of class ngchmCovariate.
This function creates a new covariate bar suitable for adding to a Next Generation Clustered Heat Map.
chmNewCovariateBar( covar, display = "visible", thickness = as.integer(10), merge, barType, loBound, hiBound, fgColor, bgColor )
chmNewCovariateBar( covar, display = "visible", thickness = as.integer(10), merge, barType, loBound, hiBound, fgColor, bgColor )
covar |
The covariate to be displayed in the bar. |
display |
Whether the covariate bar will be "hidden" or "visible" (default). |
thickness |
The thickness of the covariate bar in pixels. (Default 10). |
merge |
Algorithm for merging covariates when necessary ("average", "peakColor", "specialColor", or "mostCommon"). |
barType |
Type of covariate bar ("color_plot", "scatter_plot", "bar_plot"). Default "color_plot". |
loBound |
Low bound for bar and scatter plots. Default minimum data value. |
hiBound |
High bound for bar and scatter plots. Default maximum data value. |
fgColor |
Foreground color for bar and scatter plots. Default black. |
bgColor |
Background color for bar and scatter plots. Default white. |
An object of class ngchmBar
bar.data <- ifelse(rnorm(1000) < 0, "negative", "non-negative") names(bar.data) <- sprintf("Sample%d", 1:length(bar.data)) bar.colors <- chmNewColorMap(c("negative", "non-negative"), c("white", "black"), missing.color = "red" ) covar <- chmNewCovariate("Group", bar.data, bar.colors, "discrete") bar <- chmNewCovariateBar(covar)
bar.data <- ifelse(rnorm(1000) < 0, "negative", "non-negative") names(bar.data) <- sprintf("Sample%d", 1:length(bar.data)) bar.colors <- chmNewColorMap(c("negative", "non-negative"), c("white", "black"), missing.color = "red" ) covar <- chmNewCovariate("Group", bar.data, bar.colors, "discrete") bar <- chmNewCovariateBar(covar)
This function creates a new Data Layer suitable for adding to a Next Generation Clustered Heat Map.
chmNewDataLayer(label, data, colors, summarizationMethod, cuts_color)
chmNewDataLayer(label, data, colors, summarizationMethod, cuts_color)
label |
The name under which the data layer will be displayed to the user. |
data |
A matrix containing the data to display. Must have rownames and colnames. |
colors |
A color map specifying how the data should be rendered. If omitted or NULL, a default green-black-red color map will be estimated from the data. |
summarizationMethod |
The method to use when summarizing multiple data points per pixel. Possible values are average (default), sample, and mode. |
cuts_color |
color of cuts |
An object of class ngchmLayer
noise <- matrix(runif(1000) + runif(1000 * 1000), nrow = 1000) rownames(noise) <- sprintf("Row%d", 1:nrow(noise)) colnames(noise) <- sprintf("Col%d", 1:ncol(noise)) noise.colors <- chmNewColorMap(c(0, 1, 2), c("green", "black", "red"), missing.color = "yellow" ) layer <- chmNewDataLayer("Noisy Data", noise, noise.colors)
noise <- matrix(runif(1000) + runif(1000 * 1000), nrow = 1000) rownames(noise) <- sprintf("Row%d", 1:nrow(noise)) colnames(noise) <- sprintf("Col%d", 1:ncol(noise)) noise.colors <- chmNewColorMap(c(0, 1, 2), c("green", "black", "red"), missing.color = "yellow" ) layer <- chmNewDataLayer("Noisy Data", noise, noise.colors)
This function creates a new Dataset suitable for attaching to a Next Generation Clustered Heat Map.
chmNewDataset( name, description, data, row.type = NULL, column.type = NULL, row.covariates = NULL, column.covariates = NULL )
chmNewDataset( name, description, data, row.type = NULL, column.type = NULL, row.covariates = NULL, column.covariates = NULL )
name |
The filename prefix under which the dataset will be saved to the ngchm. |
description |
A description of the dataset. |
data |
A matrix containing the data in the dataset. Must have rownames and colnames. |
row.type |
The type, if any, of the dataset rows. |
column.type |
The type, if any, of the dataset columns. |
row.covariates |
An optional list of row covariates. |
column.covariates |
An optional list of column covariates. |
An object of class ngchmDataset
This function creates a new Dialog suitable for adding to a Next Generation Clustered Heat Map.
chmNewDialog(id, title, fn)
chmNewDialog(id, title, fn)
id |
The html id for the dialog. |
title |
The dialog title / menu entry name. |
fn |
The javascript function for customizing the dialog's contents. |
An object of class ngchmDialog
This function creates a new Javascript function object for adding to a Next Generation Clustered Heat Map menu.
chmNewFunction( name, description, implementation, extraParams = NULL, requires = NULL, global = FALSE )
chmNewFunction( name, description, implementation, extraParams = NULL, requires = NULL, global = FALSE )
name |
The name of the Javascript function |
description |
A short description of the Javascript function |
implementation |
A string containing the javascript code required to define the function. When called the function is passed a list of selected values (e.g. labels). Additional parameters can be declared before the values parameter and must be resolved through currying (binding) before the function is used in menus. |
extraParams |
An optional list of extra parameters. (Default NULL.) |
requires |
An optional vector of (custom) Javascript function names that this function requires. |
global |
A logical: TRUE if should be defined globally, not within a customization section. (Default FALSE.) |
An object of class ngchmJS
alertFn <- chmNewFunction("showAlert", "Display the parameter in an alert box", "function showAlert(label) { alert(label); }", global = TRUE ) dbLookup <- chmNewFunction( "dbLookup", "Lookup the parameter in a database", "function showAlert(database, label) { alert(database[label]); }", c("database") )
alertFn <- chmNewFunction("showAlert", "Display the parameter in an alert box", "function showAlert(label) { alert(label); }", global = TRUE ) dbLookup <- chmNewFunction( "dbLookup", "Lookup the parameter in a database", "function showAlert(database, label) { alert(database[label]); }", c("database") )
This function creates a new Property object for adding to a Next Generation Clustered Heat Map.
chmNewProperty(label, value)
chmNewProperty(label, value)
label |
The property label |
value |
The property value |
An object of class ngchmProperty
prop <- chmNewProperty( "chm.info.caption", "This is a nifty new CHM." )
prop <- chmNewProperty( "chm.info.caption", "This is a nifty new CHM." )
This function creates a new object that represents a NGCHM server.
chmNewServer( serverName, serverPort = 8080, deployServer = NULL, protoOpts = NULL, jarFile = NULL, serverURL = NULL )
chmNewServer( serverName, serverPort = 8080, deployServer = NULL, protoOpts = NULL, jarFile = NULL, serverURL = NULL )
serverName |
The DNS name of the NGCHM server. |
serverPort |
The port on which the server is listening. |
deployServer |
The DNS name to use when deploying a NGCHM (defaults to serverName). |
protoOpts |
A list of protocol-specific parameters |
jarFile |
The location of the heatmap build jar file to use when making a NGCHM (defaults to jar file on serverURL WS). |
serverURL |
The URL used to access the NGCHM server (defaults to serverName:serverPort/chm). |
An object of class ngchmServer
cloudServ <- chmNewServer("dnsname.domain")
cloudServ <- chmNewServer("dnsname.domain")
Return original column order of an NGCHM
chmOriginalColOrder(chm)
chmOriginalColOrder(chm)
chm |
An NGCHM containing at least one layer |
Shaid of a label order suitable for use as the chm's column order.
Return original row order of an NGCHM
chmOriginalRowOrder(chm)
chmOriginalRowOrder(chm)
chm |
An NGCHM containing at least one layer |
Shaid of a label order suitable for use as the chm's row order.
This function creates one or more NG-CHM (Next-Generation Clustered Heat Map) properties.
chmProperties(...)
chmProperties(...)
... |
Named arguments representing the properties to be created. Each argument should be a single value of type character, double, integer, or logical. |
A list of properties. Each property is represented as a list with two elements: 'label' and 'value'.
# Create three properties: 'prop1', 'prop2', and 'prop3'. props <- chmProperties(prop1 = "value1", prop2 = 2, prop3 = TRUE)
# Create three properties: 'prop1', 'prop2', and 'prop3'. props <- chmProperties(prop1 = "value1", prop2 = 2, prop3 = TRUE)
Get the value of an NG-CHM property.
chmProperty(hm, label)
chmProperty(hm, label)
hm |
The NG-CHM object to get the property value from. |
label |
The name of the property to get. If no property with that name exists, return NULL. Well-known property labels used by the NG-CHM system include: * "chm.info.caption" A paragraph describing the NG-CHM's contents (set by user). * "chm.info.built.time" The date and time the NG-CHM was saved (set by system). |
A property value or NULL.
hm <- chmNew("Empty") chmProperty(hm, "chm.info.caption")
hm <- chmNew("Empty") chmProperty(hm, "chm.info.caption")
Set the value of an NG-CHM property.
chmProperty(x, label) <- value
chmProperty(x, label) <- value
x |
The NG-CHM object on which to set the property. |
label |
The name of the property to set. If no property with that name exists, a new property with that name is appended. |
value |
A non-empty vector of character, logical, or numeric values. |
The modified NG-CHM object.
hm <- chmNew("Empty") chmProperty(hm, "chm.info.caption") <- "Nothing to see here"
hm <- chmNew("Empty") chmProperty(hm, "chm.info.caption") <- "Nothing to see here"
Return random column order of an NGCHM
chmRandomColOrder(chm)
chmRandomColOrder(chm)
chm |
An NGCHM containing at least one layer |
Shaid of a label order suitable for use as the chm's column order.
Return random row order of an NGCHM
chmRandomRowOrder(chm)
chmRandomRowOrder(chm)
chm |
An NGCHM containing at least one layer |
Shaid of a label order suitable for use as the chm's row order.
This function registers a Javascript function that will be automatically added to the appropriate axis menu(s) when building a Next Generation Clustered Heat Map for axes that match the function's axis type. This function is intended for use by NGCHM system developers.
chmRegisterAxisFunction(type, label, fn)
chmRegisterAxisFunction(type, label, fn)
type |
The axis type required by this function. |
label |
The name of the axis menu entry to be used for this function. |
fn |
The Javascript function to register. |
None. This function is used for its side effects of registering a new axis function.
This function registers a Javascript function that can be used when building a Next Generation Clustered Heat Map. This function is intended for use by NGCHM system developers.
chmRegisterFunction(fn)
chmRegisterFunction(fn)
fn |
The function to be registered. This should be an object of class 'ngchmJS'. |
The registered function.
This function defines and registers a Javascript function for obtaining a specific metadata value and returning it as a javascript list. The function is suitable for use as an axis type accessor function.
chmRegisterGetMetadataFunction(functionName, metadataColumnName)
chmRegisterGetMetadataFunction(functionName, metadataColumnName)
functionName |
A single character string specifying the name of the function to be registered. |
metadataColumnName |
A single character string specifying the name of the metadata column to be retrieved by the function. |
The registered function.
This function registers a Javascript function that will be automatically added to the matrix menu when building a Next Generation Clustered Heat Map for matrices whose rows and columns match then function's axes types. This function is intended for use by NGCHM system developers.
chmRegisterMatrixFunction(rowtype, columntype, label, fn)
chmRegisterMatrixFunction(rowtype, columntype, label, fn)
rowtype |
A character vector specifying the row type(s) of the matrix function. |
columntype |
A character vector specifying the column type(s) of the matrix function. |
label |
A single character string specifying the label of the matrix function. |
fn |
The function to be registered. This can be either a function or a character string representing the name of a function. |
None. This function is used for its side effects of registering a new function in the NGCHM matrix menues.
This function registers a Javascript function that can included in the toolbox of an NGCHM. This function is intended for use by NGCHM system developers.
chmRegisterToolboxFunction(tbtype, menulabel, jsfn)
chmRegisterToolboxFunction(tbtype, menulabel, jsfn)
tbtype |
A single character string specifying the type of the toolbox function. |
menulabel |
A single character string specifying the menu label of the toolbox function. |
jsfn |
The function to be registered. This should be an object of class 'ngchmJS'. |
None. This function is used for its side effects of registering a new toolbox function.
This function registers a type name used for determining row and column linkouts. This function is intended to be used by NGCHM system developers to record basic information about the semantic interpretation of a type name. Registration of a typename is (currently) not required in order to use it.
chmRegisterType(typename, description)
chmRegisterType(typename, description)
typename |
A character vector specifying the name(s) of the type(s) to be registered. |
description |
A single character string specifying the description of the type(s). |
None. This function is used for its side effects of registering a new type.
This function registers a Javascript function that will be automatically added to a Next Generation Clustered Heat Map as required for converting values from one type into another more basic type. This function is intended for use by NGCHM system developers.
chmRegisterTypeMapper(fromtype, totype, op, ...)
chmRegisterTypeMapper(fromtype, totype, op, ...)
fromtype |
The type of values the function expects as input. |
totype |
The type of values the function will produce. The length of totype must be shorter than fromtype. |
op |
The operation code for performing the conversion |
... |
Additional parameters required for specifying the conversion (op specific) |
NULL
op can have the following values:
'field' Split source into fields separated by 'separator' and select field 'num' (0 origin)
'expr' Compute string expression 'expr'. 'return' value is a vector or a scalar (default)
'javascript' Evaluate javascript function 'fn' (deprecated)
This function defines and registers a Javascript function for converting a list of type values separated by the specified separator into the single values, and registers it as a type mapper.
chmRegisterTypeSplitter(functionName, listtype, itemtype, separator)
chmRegisterTypeSplitter(functionName, listtype, itemtype, separator)
functionName |
A single character string specifying the name of the function to be registered. |
listtype |
A single character string specifying the type of the list to be split. |
itemtype |
A single character string specifying the type of the items in the list after splitting. |
separator |
A single character string specifying the separator to be used for splitting. |
None. This function is used for its side effects of registering a new type splitter.
This function sets the row order for a NG-CHM (Next-Generation Clustered Heat Map) object.
chmRowOrder(chm) <- value ## S4 replacement method for signature 'ngchm,optDendrogram' chmRowOrder(chm) <- value
chmRowOrder(chm) <- value ## S4 replacement method for signature 'ngchm,optDendrogram' chmRowOrder(chm) <- value
chm |
An object of class 'ngchm'. |
value |
An object of class 'optDendrogram' or 'file' specifying the new row order. If value is NULL, the labels will be displayed in the same order they are found in the first data layer. If value is a character vector, the labels will be displayed in that order. If value is a dendrogram, the labels displayed in the order they occur in a depth first traversal of the tree. |
An updated 'ngchm' object with the new row order.
"chmColOrder<-"
This function returns a ngchmServer object that can be used when making and installing a Next Generation Clustered Heat Map.
chmServer(name)
chmServer(name)
name |
The name of the ngchmServer desired. |
An object of class ngchmServer if found, NULL otherwise. If multiple servers of the same name have been defined (in different namespaces), the most recently defined is returned.
The path is a sequence of components separated by slashes (/). If the path begins with a double slash (//) the following component is interpreted as a server name. If the server name is omitted (i.e. empty) the default server will be used. If the path does not begin with a double slash, the current server will be used.
chmSetCollection(path)
chmSetCollection(path)
path |
A single character string specifying the path of the collection to be set. The path should be in the format '//server/collection'. |
If the path begins with a slash, the components (following the server, if specified) are interpreted relative to the root collection of the server concerned. Otherwise, they are interpreted relative to the current collection.
The interpretation of each path component is server specific.
None. This function is used for its side effects of setting the current server and collection.
This function sets the credentials for a specific NG-CHM (Next-Generation Clustered Heat Map) server.
chmSetCredentials(resource, credentials) ## S4 method for signature 'ngchmServer,character' chmSetCredentials(resource, credentials) ## S4 method for signature 'character,character' chmSetCredentials(resource, credentials)
chmSetCredentials(resource, credentials) ## S4 method for signature 'ngchmServer,character' chmSetCredentials(resource, credentials) ## S4 method for signature 'character,character' chmSetCredentials(resource, credentials)
resource |
An object of class 'ngchmServer' or a character string representing the server for which the credentials are to be set. |
credentials |
A single character string specifying the credentials to be set for the server. |
No return value. The function is called for its side effect of setting the credentials for the specified server.
Specify per-user configuration for a specific deploy Server.
chmSetDeployServerConfig(server, config)
chmSetDeployServerConfig(server, config)
server |
An object of class 'chmServer' or a character string specifying the name of the server. |
config |
A list specifying the configuration to be set for the server. |
None. This function is used for its side effects of setting the deployment server configuration.
This function returns the name of a Javascript function thats accepts a string vector as its parameter, and for each string in the vector performs the operation stringop on the string. Stringop must be valid Javascript code that can be appended to a string value. The function returns a vector of the resulting strings.
chmStringopFunction(stringop)
chmStringopFunction(stringop)
stringop |
A javascript code fragment that can be applied to a string to yield another string. |
The name of the function returned for a specific stringop will be constant within an R session, but may differ between R sessions (or if this library is unloaded and reloaded).
A character string specifying the name of the new function.
This function was designed to facilitate setting rowGapLocations and colGapLocations in the
chmNew()
function. See examples section.
chmTreeGaps(numberOfCuts)
chmTreeGaps(numberOfCuts)
numberOfCuts |
Number of tree cuts |
treeCuts object with specified number of tree cuts
mychm <- chmNew("test_chm", rowGapLocations = chmTreeGaps(5))
mychm <- chmNew("test_chm", rowGapLocations = chmTreeGaps(5))
This function removes a specific NG-CHM (Next-Generation Clustered Heat Map) from a specified server.
chmUninstall(chm, ...) ## S4 method for signature 'character' chmUninstall(chm, server = NULL, ...) ## S4 method for signature 'ngchm' chmUninstall(chm, ...)
chmUninstall(chm, ...) ## S4 method for signature 'character' chmUninstall(chm, server = NULL, ...) ## S4 method for signature 'ngchm' chmUninstall(chm, ...)
chm |
A single character string specifying the NG-CHM's name, or an object of class "ngchm" representing the NG-CHM to be uninstalled. |
... |
Additional server (protocol) specific parameters. |
server |
An object of class 'ngchmServer' or a character string representing the server from which the NG-CHM is to be uninstalled. If not provided, the current server is used. |
No return value. The function is called for its side effect of uninstalling the specified NG-CHM from the specified server.
Return the base URL of a Next Generation Clustered Heat Map (NGCHM) that has been installed on a NGCHM server.
chmUrlBase(server) ## S4 method for signature 'ngchmServer' chmUrlBase(server)
chmUrlBase(server) ## S4 method for signature 'ngchmServer' chmUrlBase(server)
server |
The server whose base URL is required. |
The base URL for accessing NGCHMs installed on the server.
This function outputs the Javascript required to customize an NGCHM.
chmWriteCustomJS(chm, filename)
chmWriteCustomJS(chm, filename)
chm |
An object of class 'chm' representing the heat map. |
filename |
A single character string specifying the name of the file where the JavaScript will be written. |
None. This function is used for its side effects of writing the JavaScript to a file.
The return value must be NULL or a numeric matrix, each column of which is a (reduced) dimension. The rows of the returned matrix must be named.
getDimensions(obj, ...) ## Default S3 method: getDimensions(obj, ...) ## S3 method for class 'prcomp' getDimensions(obj, ...) ## S3 method for class 'umap' getDimensions(obj, ...) ## S3 method for class 'Seurat' getDimensions(obj, dimName, ...)
getDimensions(obj, ...) ## Default S3 method: getDimensions(obj, ...) ## S3 method for class 'prcomp' getDimensions(obj, ...) ## S3 method for class 'umap' getDimensions(obj, ...) ## S3 method for class 'Seurat' getDimensions(obj, dimName, ...)
obj |
The object from which to obtain the dimension(s). |
... |
Additional class-specific parameters for specifying the desired dimension. |
dimName |
The name of the dimension matrix to obtain. |
A matrix with one dimension per column and one named row per observation in obj.
Obtain the git hash of an existing file.
gitHashObject(path)
gitHashObject(path)
path |
filename of file to hash |
a string containing the file hash
This function initializes logging for the application.
initLogging(log_level, log_file = NULL)
initLogging(log_level, log_file = NULL)
log_level |
A single character string specifying the log level. This should be one of 'TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR', or 'FATAL'. |
log_file |
An optional character string specifying the name of the file where the log will be written. If this is NULL, the log will be written to the console. |
None. This function is used for its side effects of initializing the logging.
NGCHM provides tools for defining the contents of a new NGCHM, and for compiling and installing it on a NGCHM server.
Typical usage (see example) is to create a base NGCHM using chmNew; extend it with at least one ngchmLayer; typically extend it further with an additional ngchmLayer, row and column dendrograms, classification bars, and popup menu entries; compile and install it on an available ngchmServer.
Note:
chmNew()
requires git to be installed.
chmExportToFile()
, chmExportToHTML()
, and chmExportToPDF()
require
Java 11 and the NGCHMSupportFiles
package. The NGCHMSupportFiles package
can be installed with: install.packages('NGCHMDemoData',
repos = c('https://md-anderson-bioinformatics.r-universe.dev',
'https://cloud.r-project.org'))
When first loaded the NGCHM library reads configuration files in the directories specified by the NGCHMCONFIGPATH environment variable. This is a colon (:) separated list of directory names. If not set it defaults to /etc/ngchm:/usr/local/ngchm:/opt/ngchm:$HOME/.ngchm. See NGCHM-initialization for details.
# Examples using `chmNew()` require git to be installed. # The NGCHMSupportFiles package is required by chmExportToFile and chmExportToPDF # The NGCHMDemoData package is used to create a demo NGCHM ## Not run: if (requireNamespace("NGCHMSupportFiles", quietly = TRUE)) { if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { library(NGCHMSupportFiles) library(NGCHMDemoData) data(TCGA.GBM.EXPR, package = "NGCHMDemoData") chm1 <- chmNew("gbm", TCGA.GBM.EXPR[1:50, 1:50], rowAxisType = "bio.gene.hugo", colAxisType = "bio.tcga.barcode.sample.vial.portion.analyte.aliquot" ) chmExportToFile(chm1, tempfile("gbm", fileext = ".ngchm")) chmExportToPDF(chm1, tempfile("gbm", fileext = ".pdf")) } } mat <- matrix(rnorm(100), nrow = 10) rownames(mat) <- sprintf("ABCA%d", 1:10) colnames(mat) <- sprintf("Sample%d", 1:10) chm <- chmNew("my-chm", mat) chmSetCollection("//server/collection") chmInstall(chm) ## End(Not run)
# Examples using `chmNew()` require git to be installed. # The NGCHMSupportFiles package is required by chmExportToFile and chmExportToPDF # The NGCHMDemoData package is used to create a demo NGCHM ## Not run: if (requireNamespace("NGCHMSupportFiles", quietly = TRUE)) { if (requireNamespace("NGCHMDemoData", quietly = TRUE)) { library(NGCHMSupportFiles) library(NGCHMDemoData) data(TCGA.GBM.EXPR, package = "NGCHMDemoData") chm1 <- chmNew("gbm", TCGA.GBM.EXPR[1:50, 1:50], rowAxisType = "bio.gene.hugo", colAxisType = "bio.tcga.barcode.sample.vial.portion.analyte.aliquot" ) chmExportToFile(chm1, tempfile("gbm", fileext = ".ngchm")) chmExportToPDF(chm1, tempfile("gbm", fileext = ".pdf")) } } mat <- matrix(rnorm(100), nrow = 10) rownames(mat) <- sprintf("ABCA%d", 1:10) colnames(mat) <- sprintf("Sample%d", 1:10) chm <- chmNew("my-chm", mat) chmSetCollection("//server/collection") chmInstall(chm) ## End(Not run)
An NG-CHM is produced by creating a heat map object with chmNew()
, possibly modifying or augmenting it
using additional functions, such as chmAddLayer()
, chmAddCovariateBar()
, etc., and then
either saving it to a server using chmInstall()
or saving it to a standalone file using chmExportToFile()
.
Currently:
Axis function View Ideogram is added for the appropriate axis types.
When first loaded the NGCHM library reads configuration files in the configuration path specified by the NGCHMCONFIGPATH environment variable. The configuration path is a colon (:) separated list of directory names. If not set it defaults to /etc/ngchm:/usr/local/ngchm:/opt/ngchm:$HOME/.ngchm.
For each configuration directory in the configuration path, the NGCHM package reads the contents of the configuration files in the conf.d subdirectory in order (as determined by the R sort function). Other subdirectories are not scanned unless instructed to by an entry in a configuration file.
Configuration files may be either text files (.txt extension), R scripts (.R extension), or javascript files (.js extension).
Here is an example directory structruce for a server named 'my_server':
. |-- conf.d | \-- 00-servers.txt \-- my_server \-- config.txt
Here are the contents of an example 00-servers.txt file:
[servers] my-server = /usr/local/ngchm/my_server
Here are the contents of an example config.txt file:
serverProtocol = shaidy accessMethod = api basePath = <URL to server. e.g. "https://mydomain.edu/server/api"> serverURL = <URL to server. e.g. "https://mydomain.edu/server">
None. This function is used for its side effects of loading configuration files.
A text configuration file consists of one or more sections. Each section begins with a single line containing the section type enclosed in square brackets. Subsequent lines in the section are either blank or contain a definition of the form "name separator value". The default separator is the equals sign (=).
The 'servers' section defines available servers. The name field defines the name by which the server is known to the library. The value field specifies a directory containing a specification of the server's properties. The server specification directory must contain a config.txt that contains lines of the form "name separator value". The config.txt file must define the value of 'serverProtocol' to be the name of a ngchmServerProtocol. It must also define the values of any mandatory parameters required by ngchmServerProtocol, and may optionally define any optional parameters.
R scripts are sourced. They can be used to define local NGCHM related functions.
Javascript files define context specific menu entries.
Add a data file to a local shaidy repository
ngchmAddDatasetBlob(shaidyRepo, format, filename, properties = NULL)
ngchmAddDatasetBlob(shaidyRepo, format, filename, properties = NULL)
shaidyRepo |
The shaidy repository |
format |
The format of the data file |
filename |
The filesystem path to the data file |
properties |
A list of additional properties to save with file |
The file's shaid
Add a matrix reference to a collection
ngchmAddMatrixToCollection(collection, name, shaid)
ngchmAddMatrixToCollection(collection, name, shaid)
collection |
A list containing details of a collection |
name |
The name to associate with the matrix reference |
shaid |
The shaid of the matrix to add to the collection |
An updated list contaiing details of the collection
Add an object reference to a collection
ngchmAddObjectToCollection(repo, uuid, shaid)
ngchmAddObjectToCollection(repo, uuid, shaid)
repo |
The repository containing the collection |
uuid |
A collection uuid |
shaid |
The shaid of the object to add to the collection |
An updated list containing details of the collection
Class representing an axis of a Next Generation Clustered Heat Map (NG-CHM).
Class representing an axis function for Next Generation Clustered Heat Map (NGCHM).
Class representing a type attached to an axis in a Next Generation Clustered Heat Map (NGCHM).
Class representing a Covariate Bar on a Next Generation Clustered Heat Map (NGCHM).
Recursively determine if collection uuid is contained in collection A collecton always contains itself.
ngchmCollectionInCollection(collection, uuid)
ngchmCollectionInCollection(collection, uuid)
collection |
A list containing details of a collection |
uuid |
A string containing the UUID to check |
TRUE iff collection contains uuid, otherwise FALSE
Create a recursive description of a collection
ngchmCollectionTree(collection, depth = 0)
ngchmCollectionTree(collection, depth = 0)
collection |
A list containing details of a collection |
depth |
The indentation depth to use |
a string vector describing the contents of the collection
Class representing a Color Map on a Next Generation Clustered Heat Map (NGCHM).
Class representing a Covariate attached to a Dataset
This function creates and registers a protocol implementation for manipulating an NGCHM server.
ngchmCreateServerProtocol( protocolName, chmFormat, requiredParams, optionalParams, paramValidator, findCollection, createCollection, installMethod, uninstallMethod, makePrivate, makePublic, setCredentials )
ngchmCreateServerProtocol( protocolName, chmFormat, requiredParams, optionalParams, paramValidator, findCollection, createCollection, installMethod, uninstallMethod, makePrivate, makePublic, setCredentials )
protocolName |
A single character string specifying the name of the protocol. |
chmFormat |
A single character string specifying the format of the heat map. Defaults to "original". |
requiredParams |
A character vector specifying the required parameters for the protocol, if any. |
optionalParams |
A character vector specifying the optional parameters for the protocol, if any. |
paramValidator |
A function(list) for validating the parameters specified for a new server. |
findCollection |
A function(server,collection,path) that finds a collection on the server. |
createCollection |
A function(server,collection,name) that creates a collection on the server. |
installMethod |
A function(server,chm) that installs a heat map on the server. |
uninstallMethod |
A function(server,chmname) that uninstalls a heat map from the server. |
makePrivate |
A function(server,chmname) that makes a heat map private on the server. |
makePublic |
A function(server,chmname) that makes a heat map public on the server. |
setCredentials |
A function(server,credentialstring) that sets the credentials for the server. |
An object of class 'ngchmServerProtocol' representing the new server protocol.
Class representing custom CSS for a Next Generation Clustered Heat Map (NGCHM).
Class representing a Dataset attached to a NGCHM
Find a repository, if any, that contains the requested shaid
ngchmFindRepo(shaid, required = TRUE)
ngchmFindRepo(shaid, required = TRUE)
shaid |
The shaid to search for |
required |
Abort if requireed and shaid not found in a known repo |
The first repository containing the shaid, otherwise NULL. The temporary repositories are searched before source repositories.
Compute shaid for a data file
ngchmGetDataFileShaid(format, filename)
ngchmGetDataFileShaid(format, filename)
format |
The format of the data file |
filename |
The filesystem path to the data file |
The shaid of the data file
Get the library's internal ngchm environment to help debugging.
ngchmGetEnv()
ngchmGetEnv()
A list representing the current environment for NG-CHM.
This function returns a 'handle' suitable for use with the server's view/WS URL
ngchmGetHandleHTTR(server)
ngchmGetHandleHTTR(server)
server |
An object of class ngchmServer |
An HTTR handle
Get the axis labels of a shaidy dataset or dendrogram
ngchmGetLabels(shaid, axis = NULL)
ngchmGetLabels(shaid, axis = NULL)
shaid |
The shaid of the dataset or dendrogram to get the labels of |
axis |
For datasets, the axis of the labels to get |
a list of shaids containing the labels
Get the axis labels of a shaidy dataset or dendrogram
ngchmGetLabelsStr(shaid, axis = NULL)
ngchmGetLabelsStr(shaid, axis = NULL)
shaid |
The shaid of the dataset or dendrogram to get the labels of |
axis |
For datasets, the axis of the labels to get |
A string vector containing the axis labels of the dataset or dendrogram
This function gets a protocol parameter for a specified NG-CHM (Next-Generation Clustered Heat Map) server.
ngchmGetProtoParam(server, option, default = NULL)
ngchmGetProtoParam(server, option, default = NULL)
server |
An object of class 'ngchmServer' representing the server. |
option |
A single character string specifying the name of the protocol parameter. |
default |
An optional default value to return if the protocol parameter is not found. Defaults to NULL. |
The value of the protocol parameter if it is found, otherwise the specified default value.
This function gets a server protocol for NG-CHM (Next-Generation Clustered Heat Map) by its name.
ngchmGetServerProtocol(protocolName)
ngchmGetServerProtocol(protocolName)
protocolName |
A single character string specifying the name of the protocol. |
An object of class 'ngchmServerProtocol' representing the server protocol.
This function initializes a Shaidy repository for NG-CHM (Next-Generation Clustered Heat Map).
ngchmInitShaidyRepository(shaidyDir)
ngchmInitShaidyRepository(shaidyDir)
shaidyDir |
A single character string specifying the directory where the Shaidy repository will be initialized. |
None. This function is used for its side effects of initializing the Shaidy repository.
Class representing a custom Javascript function for a Next Generation Clustered Heat Map (NGCHM).
Class representing a Layer on a Next Generation Clustered Heat Map (NGCHM).
List defined server protocols
ngchmListServerProtocols()
ngchmListServerProtocols()
A character vector
Load a data matrix from a local shaidy repository
ngchmLoadDatasetBlob(shaidyRepo, shaid, datatype)
ngchmLoadDatasetBlob(shaidyRepo, shaid, datatype)
shaidyRepo |
The shaidy repository |
shaid |
The shaid of the dataset blob to load |
datatype |
Prototype of matrix data elements (defaults to 0.0) |
a list containing details of the loaded dataset
Make an original format NGCHM.
ngchmMakeFormat.original( chm, server, deleteOld = TRUE, useJAR = NULL, javaTraceLevel = NULL, javaOptions = NULL, buildArchive = NULL )
ngchmMakeFormat.original( chm, server, deleteOld = TRUE, useJAR = NULL, javaTraceLevel = NULL, javaOptions = NULL, buildArchive = NULL )
chm |
The original format CHM to compile. |
server |
The server for which to compile the NGCHM.
Default |
deleteOld |
If TRUE, delete any old CHM of this name before beginning build. (Default is TRUE.) |
useJAR |
If defined, the location (filename) of the chmbuilder jar file. The package will not download a current jar file from the server. It is the caller's responsibility to ensure the builder jar file is compatible with the server on which the NGCHM will be installed. (Default is not defined.) |
javaTraceLevel |
Trace level option passed to the Java process. Default is getOption("NGCHM.Java.Trace','PROGRESS'). |
javaOptions |
Additional options to pass to the Java process. Default is getOption('NGCHM.Java.Options','-Xmx2G'). |
buildArchive |
If TRUE, build a tar archive of the generated NGCHM. Default is getOption('NGCHM.Build.Archive',TRUE). |
The CHM
Make a shaidy format NGCHM.
ngchmMakeFormat.shaidy(chm)
ngchmMakeFormat.shaidy(chm)
chm |
The shaidy format CHM to compile. |
The CHM
Class representing a matrix function for Next Generation Clustered Heat Map (NGCHM).
Class representing a Menu Item for a Next Generation Clustered Heat Map (NGCHM).
Class representing meta data attached to an NG-CHM
This function is deprecated and will be removed in a future version. Please use chmNewCovariateBar. This function creates a new Classification Bar suitable for adding to a Next Generation Clustered Heat Map.
ngchmNewBar( label, type, data, colors = NULL, display = "visible", thickness = as.integer(10), merge, barType, loBound, hiBound, fgColor, bgColor )
ngchmNewBar( label, type, data, colors = NULL, display = "visible", thickness = as.integer(10), merge, barType, loBound, hiBound, fgColor, bgColor )
label |
The name by which the classification bar will be known. |
type |
The string "discrete" or the string "continuous". |
data |
A vector of the data to be displayed in the classification bar. names(data) must be defined. |
colors |
A color map specifying how the data should be rendered. |
display |
Whether the classification bar will be "hidden" or "visible" (default). |
thickness |
The thickness of the classification bar in pixels. (Default 10). |
merge |
Algorithm for merging classifications when necessary ("average", "peakColor", "specialColor", or "mostCommon"). |
barType |
Type of covariate bar ("color_plot", "scatter_plot", "bar_plot"). Default "color_plot". |
loBound |
Low bound for bar and scatter plots. Default minimum data value. |
hiBound |
High bound for bar and scatter plots. Default maximum data value. |
fgColor |
Foreground color for bar and scatter plots. Default black. |
bgColor |
Background color for bar and scatter plots. Default white. |
An object of class ngchmBar
Create a new collection in a local shaidy repository
ngchmNewCollection(shaidyRepo, labels = data.frame())
ngchmNewCollection(shaidyRepo, labels = data.frame())
shaidyRepo |
The shaidy repository |
labels |
Initial labels for collection (a data.frame of (Name,Value) tuples) |
a string containing the UUID of the newly created repository
Class representing an overview of a Next Generation Clustered Heat Map (NGCHM).
Class representing a Generic Property for a Next Generation Clustered Heat Map (NGCHM).
Check that all required parameters are specified, and all specified parameters are either required or optional.
ngchmProtoParamCheck(params, required, optional)
ngchmProtoParamCheck(params, required, optional)
params |
A list of parameters to be checked. |
required |
A character vector specifying the required parameters. |
optional |
A character vector specifying the optional parameters. |
None. This function is used for its side effects of checking the parameters and potentially stopping execution with an error message.
This function pushes a source repository for NG-CHM (Next-Generation Clustered Heat Map) onto the Shaidy stack.
ngchmPushSourceRepository(shaidyDir, accessMethod = "file")
ngchmPushSourceRepository(shaidyDir, accessMethod = "file")
shaidyDir |
A single character string specifying the directory of the source repository. |
accessMethod |
A single character string specifying the access method for the source repository. Defaults to "file". |
None. This function is used for its side effects of pushing the source repository onto the Shaidy stack.
This function pushes a source server for NG-CHM (Next-Generation Clustered Heat Map) onto the Shaidy stack.
ngchmPushSourceServer(server)
ngchmPushSourceServer(server)
server |
An object of class 'ngchmServer' or a single character string specifying the name of the server. |
None. This function is used for its side effects of pushing the source server onto the Shaidy stack.
This function pushes a temporary repository for NG-CHM (Next-Generation Clustered Heat Map) onto the Shaidy stack.
ngchmPushTempRepository(shaidyDir)
ngchmPushTempRepository(shaidyDir)
shaidyDir |
A single character string specifying the directory of the temporary repository. |
None. This function is used for its side effects of pushing the temporary repository onto the Shaidy stack.
This function registers an ngchmServer that can be used when making and installing a Next Generation Clustered Heat Map.
ngchmRegisterServer(uuid, server)
ngchmRegisterServer(uuid, server)
uuid |
A string that identifies the server namespace. |
server |
The ngchmServer to register. |
the server that was registered
Class representing a link related to a NGCHM
Class representing a group of related links to a NGCHM
Render a shaidy NGCHM
ngchmRenderChm(repo, shaid)
ngchmRenderChm(repo, shaid)
repo |
The repository containing the chm |
shaid |
The shaid of the chm to render |
Nothing
Return response content interpreted as JSON
ngchmResponseJSON(httrResponse)
ngchmResponseJSON(httrResponse)
httrResponse |
The httr response object |
The response parsed as JSON and returned as an R object
Row center a shaidy dataset
ngchmRowCenter(shaidyRepo, shaid)
ngchmRowCenter(shaidyRepo, shaid)
shaidyRepo |
The shaidy repository |
shaid |
The shaid of the dataset to row center |
A list of shaids for the row centered dataset
Save a numeric matrix as a blob in a shaidy repository
ngchmSaveAsDatasetBlob(shaidyRepo, format, mat)
ngchmSaveAsDatasetBlob(shaidyRepo, format, mat)
shaidyRepo |
The shaidy repository |
format |
The format in which to save the matrix |
mat |
The data matrix |
The shaid of the saved blob
Save a dendrogram as a blob in a shaidy repository
ngchmSaveAsDendrogramBlob(shaidyRepo, ddg)
ngchmSaveAsDendrogramBlob(shaidyRepo, ddg)
shaidyRepo |
The shaidy repository |
ddg |
The dendrogram |
The shaid of the saved blob
Save an NGCHM as a shaidy blob
ngchmSaveChmAsBlob(shaidyRepo, chm)
ngchmSaveChmAsBlob(shaidyRepo, chm)
shaidyRepo |
The shaidy repository to write to |
chm |
The NGCHM to write |
The shaid of the saved NGCHM
Class representing a Next Generation Clustered Heat Map (NGCHM) server.
Class representing a deployment method for a Next Generation Clustered Heat Map (NGCHM) server.
Class representing a Template attached to a NGCHM
Get the tiles for a shaidy dataset
ngchmTileDataset(repo, dataset, rowOrder, colOrder)
ngchmTileDataset(repo, dataset, rowOrder, colOrder)
repo |
The shaidy repository in which to create the tile |
dataset |
The shaid of the dataset to tile |
rowOrder |
The row order of the tiles |
colOrder |
The column order of the tiles |
a list of shaids containing the tiles
Class representing a type mapper function for Next Generation Clustered Heat Map (NGCHM).
This function unregisters a server for NG-CHM (Next-Generation Clustered Heat Map) by its UUID and optionally by its name.
ngchmUnregisterServer(uuid, name = NULL)
ngchmUnregisterServer(uuid, name = NULL)
uuid |
A single character string specifying the UUID of the server. |
name |
The names(s) of the ngchmServer(s) to unregister. If not specified, all ngchmServers in the namespace are unregistered. Defaults to NULL. |
None. This function is used for its side effects of unregistering the server.
Class representing the properties of a data point in a Next Generation Clustered Heat Map (NGCHM).
Class representing ngchmVersion2 object
name
The name under which the NGCHM will be saved to the NGCHM server.
version
Integer version number (default: 2)
format
(default: "original")
uuid
character
baggage
optCharacter
inpDir
character
outDir
character
saveDir
(default: tempdir())
propFile
(default: "chm.properties")
layers
List of data layers
colormaps
Color map
rowMenu
optList
colMenu
optList
datasets
optList
dialogs
optList
tags
optCharacter
elementMenu
optList
rowTypeFunctions
optList
colTypeFunctions
optList
elementTypeFunctions
optList
axisTypes
optList
css
optList
extrafiles
optCharacter
extrascripts
optCharacter
properties
optList
overviews
optList
javascript
optList
rowOrder
A vector, dendrogram, or function specifying the CHM row order
rowDist
Distance method to use by default RowOrder. (default: "correlation", which is 1 minus the Pearson correlation among the rows.)
rowAgglom
Agglomeration method to use by default RowOrder. Choices are those from stats::hclust. (default: "ward.D2")
colOrder
A vector, dendrogram, or function specifying the CHM column order.
colDist
Distance method to use by default ColOrder. (default: "correlation", which is 1 minus the Pearson correlation among the cols.)
colAgglom
Agglomeration method to use by default ColOrder. Choices are those from stats::hclust. (default: "ward.D2")
rowOrderMethod
character (default: "User")
colOrderMethod
character (default: "User")
rowCutLocations
Explicit list of row cut locations. If specified, rowTreeCuts is set to NULL.
rowTreeCuts
Number of tree cuts for row. If specified, rowCutLocations is set to NULL.
rowCutWidth
Width of row cuts (default: 5 rows)
rowTopItems
optCharacter
rowDisplayLength
optInteger
rowDisplayAbbreviation
optCharacter
colCutLocations
Explicit list of col cut locations. If specified, colTreeCuts is set to NULL.
colTreeCuts
Number of tree cuts for col. If specified, colCutLocations is set to NULL.
colCutWidth
Width of col cuts (defautl: 5 columns)
colTopItems
optCharacter
colDisplayLength
optInteger
colDisplayAbbreviation
optCharacter
rowMeta
optList
colMeta
optList
rowCovariateBars
optList
colCovariateBars
optList
relatedLinks
optList
relatedGroups
optList
templates
optList
width
default: 500
height
default: 500
Open the NG-CHM on the specified server in the viewer.
## S3 method for class 'ngchmVersion2' plot(x, server = NULL, viewer = NULL, ...)
## S3 method for class 'ngchmVersion2' plot(x, server = NULL, viewer = NULL, ...)
x |
The NGCHM to view. |
server |
The server containing the NG-CHM. Defaults to option "NGCHM.Server" or the first server. |
viewer |
The viewer to use. Defaults to option "viewer" or browseURL. |
... |
Ignored. |
No return value. The function is called for its side effect of plotting the specified NG-CHM.
This function takes an object of class 'ngchm.type.info' and returns a formatted string that provides a detailed description of the NGCHM type.
## S3 method for class 'ngchm.type.info' print(x, ...)
## S3 method for class 'ngchm.type.info' print(x, ...)
x |
An object of class 'ngchm.type.info' as returned by chmGetTypeInfo. |
... |
Additional arguments (not used). |
A string that provides a detailed description of the NGCHM type.
Print a shaidy repository
## S3 method for class 'shaidyRepo' print(x, ...)
## S3 method for class 'shaidyRepo' print(x, ...)
x |
The shaidy repository to print |
... |
Unused extra parameters |
The shaidy repository
Add data file(s) and properties to a local shaidy repository
shaidyAddFileBlob( shaidyRepo, blob.type, blob.file, filename, properties = NULL, shaid = NULL )
shaidyAddFileBlob( shaidyRepo, blob.type, blob.file, filename, properties = NULL, shaid = NULL )
shaidyRepo |
The shaidy repository |
blob.type |
The blob.type of the data file |
blob.file |
Name of the file(s) within the blob |
filename |
The filesystem path(s) to the file(s) to insert |
properties |
A list of additional properties to save with the file(s) |
shaid |
Shaid to store the blob as. |
The file's shaid
Determine if one more blobs exist in a shaidy repository
shaidyBlobExists(repo, shaids)
shaidyBlobExists(repo, shaids)
repo |
The shaidy repository |
shaids |
A shaid or list of shaids |
a boolean vector
Copy a blob from one repository to another
shaidyCopyBlob(src, shaid, dst)
shaidyCopyBlob(src, shaid, dst)
src |
The source repository |
shaid |
The shaid of the blob to copy |
dst |
The destination repository |
the shaid
Create a prototype blob in a shaidy repository
shaidyCreateProtoBlob(shaidyRepo, blob.type)
shaidyCreateProtoBlob(shaidyRepo, blob.type)
shaidyRepo |
The shaidy repository |
blob.type |
The blob.type of the prototype blob |
The file path of the prototype blob
Finalize a prototype blob
shaidyFinalizeProtoBlob(shaidyRepo, shaid, protoblob)
shaidyFinalizeProtoBlob(shaidyRepo, shaid, protoblob)
shaidyRepo |
The shaidy repository |
shaid |
The shaid to assign the protoblob |
protoblob |
The prototype blob to finalize |
The shaid (invisibly)
The protoblob must have been created in the specified shaidy repository and with the same blob type as the shaid. When this function returns the protoblob will no longer be accessible . If a blob with the same shaid already exists in this repository, the protoblob is quitely removed without affecting the existing blob.
Find the first repository, if any, that contains the requested shaid
shaidyFindRepo(repos, shaid)
shaidyFindRepo(repos, shaid)
repos |
The list of repositories to search |
shaid |
The shaid to search for |
The first repository containing the shaid, otherwise NULL
Get an object's component shaids
shaidyGetComponents(object) ## S4 method for signature 'ngchm' shaidyGetComponents(object) ## S4 method for signature 'ngchmDataset' shaidyGetComponents(object) ## S4 method for signature 'ngchmCovariate' shaidyGetComponents(object)
shaidyGetComponents(object) ## S4 method for signature 'ngchm' shaidyGetComponents(object) ## S4 method for signature 'ngchmDataset' shaidyGetComponents(object) ## S4 method for signature 'ngchmCovariate' shaidyGetComponents(object)
object |
The object, such as a chm, dataset, etc., for which to get the component shaids |
A list of shaids.
Get shaid for an object
shaidyGetShaid(object) ## S4 method for signature 'ngchm' shaidyGetShaid(object)
shaidyGetShaid(object) ## S4 method for signature 'ngchm' shaidyGetShaid(object)
object |
The object, such as a chm, dataset, etc., for which to get the shaid |
The shaid of the object.
Compute the shaid to assign a protoblob
shaidyHashProtoBlob(blob.type, protoblob)
shaidyHashProtoBlob(blob.type, protoblob)
blob.type |
The blob.type of the prototype blob |
protoblob |
The prototype blob |
The shaid to assign the protoblob
This function initializes a Shaidy repository in a specified directory with specified blob types.
shaidyInitRepository(shaidyDir, blob.types)
shaidyInitRepository(shaidyDir, blob.types)
shaidyDir |
A single character string specifying the directory where the Shaidy repository will be initialized. |
blob.types |
A character vector specifying the blob types for the Shaidy repository. |
None. This function is used for its side effects of initializing the Shaidy repository.
Load the provid -> shaid DB for a local shaidy repository
shaidyLoadProvenanceDB(shaidyDir)
shaidyLoadProvenanceDB(shaidyDir)
shaidyDir |
Basepath to a local shaidy repository. |
A shaidyProvenanceDB
Load the provid -> labels DB for a local shaidy repository.
shaidyLoadProvidDB(shaidyDir)
shaidyLoadProvidDB(shaidyDir)
shaidyDir |
Basepath to a local shaidy repository. |
A shaidyProvidDB
Load a shaidy repository
shaidyLoadRepository(accessMethod, shaidyDir)
shaidyLoadRepository(accessMethod, shaidyDir)
accessMethod |
Method for accessing repository. |
shaidyDir |
Basepath to shaidy repository. |
A shaidyRepo
Create in memory shaid cache
shaidyNewCache(shaidyDir)
shaidyNewCache(shaidyDir)
shaidyDir |
Basepath to a local shaidy repository. |
An in memory shaid cache
Create a provid from a list of label values
shaidyProvenance(...)
shaidyProvenance(...)
... |
shaidyRepo followed by a list of name=value labels to store in the provid |
A string containing the provid for the list of label values.
Get the methods for the repository API called api
shaidyRepoAPI(api)
shaidyRepoAPI(api)
api |
The name of a repository API |
A list of repository methods
This class is to facilitate specification of row/col gaps in chmNew()
.
Note: user-facing function use the term 'gap', while internal functions that
interact with java programs in the NGCHM viewer project use the term 'cut'.
numberOfCuts
Integer number of cuts
If not numeric, print error message and stop.
verifyNumeric(variableToCheck)
verifyNumeric(variableToCheck)
variableToCheck |
The variable to check for being numeric. |
TRUE