knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Linkouts allow for a deeper exploration of the NG-CHM data by providing direct links to NCBI Databases, GeneCards, etc. This vignette demonstrates how to add linkouts to an NG-CHM.

These examples build on the setup from Getting Started.

Set Axis Type for Linkouts

To add linkouts, specify the axis type with chmAddAxisType(). For the demo data in this example, row labels correspond to genes, and are specified as HUGO gene symbols. The column labels are full 28-character TCGA aliquot barcodes.

hm <- chmNew("tcga-brca", matrix_data)
hm <- chmAddAxisType(hm, "row", "bio.gene.hugo")
hm <- chmAddAxisType(hm, "column", "bio.tcga.barcode.sample.vial.portion.analyte.aliquot")

Available Axis Types

The available axis types are:

Back to top

Resulting NG-CHM

Below is the resulting NG-CHM. To access the linkouts, click on the row or column labels to select them, then right click on the selection. This will open the label menu, displaying the linkout options.

library(NGCHMDemoData)
library(NGCHMSupportFiles)
library(NGCHM)
matrix_data_file <- system.file("extdata", "TCGA.BRCA.Expression.csv", package = "NGCHMDemoData")
matrix_data <- as.matrix(read.csv(matrix_data_file, header = TRUE, row.names = 1, check.names = FALSE, stringsAsFactors = FALSE))
covariate_data_file <- system.file("extdata", "TCGA.BRCA.TP53Mutation.csv", package = "NGCHMDemoData")
covariate_data <- as.matrix(read.csv(covariate_data_file, row.names = 1, check.names = FALSE, stringsAsFactors = FALSE))
covariate_vector <- as.vector(covariate_data) # create vector of mutation data
names(covariate_vector) <- rownames(covariate_data) # set the names
hm <- chmNew("TCGA BRCA Expression", matrix_data)
hm <- chmAddAxisType(hm, "row", "bio.gene.hugo")
hm <- chmAddAxisType(hm, "column", "bio.tcga.barcode.sample.vial.portion.analyte.aliquot")
invisible(chmExportToHTML(hm, "linkouts.html", overwrite = TRUE))
htmltools::tags$iframe(src = "linkouts.html", height = 800, width = "100%")

Back to top



MD-Anderson-Bioinformatics/NGCHM-R documentation built on June 9, 2025, 8:04 p.m.