dynamicHeatmap {dynamicHeatmap} | R Documentation |
Run clustering calculations and show the gene expresion data in the Dynamic Heatmap Viewer.
dynamicHeatmap(exprData, expDesign, geneId, analysisOptions, metric, linkage, sortSamplesByClass, sortSamplesClassName, useSamplesCenteredCorrelation, projectPath, outputName)
exprData |
A matrix of gene expression data for samples. Rows are genes and columns are arrays. Its column names must be provided. |
expDesign |
A matrix/data frame of sample classes and names. |
geneId |
A matrix/data frame of gene IDs. |
analysisOptions |
A character string specifying one of the Hierarchical clustering option: "CenterAndScaleGenes", "CenterGenes", or "None". |
metric |
A character string specifying one of the distance matrix: "1-Correlation", "Euclidean". |
linkage |
A character string specifying one of the linkage: "Average", "Complete", "Single", "Ward". |
sortSamplesByClass |
A logical variable. If it is |
sortSamplesClassName |
A character string specifying the sample class name for ordering in the heatmap. |
useSamplesCenteredCorrelation |
A logical variable. If it is |
projectPath |
A character string specifying the full project path. |
outputName |
A character string specifying the output folder name. |
Please see the BRB-ArrayTools manual (https://brb.nci.nih.gov/BRB-ArrayTools/Documentation.html) for details.
dataset<-"Brca" # Gene IDs geneId <- read.delim(system.file("extdata", paste0(dataset, "_GENEID.txt") , package = "dynamicHeatmap"), as.is = TRUE, colClasses = "character") # Expression data, and here are log ratio. x <- read.delim(system.file("extdata", paste0(dataset, "_LOGRAT.TXT") , package = "dynamicHeatmap"), header = FALSE) # Gene filter information, 1 - pass the filter, 0 - filtered geneFilter <- scan(system.file("extdata", paste0(dataset, "_FILTER.TXT") , package = "dynamicHeatmap"), quiet = TRUE) # Class information expDesign <- read.delim(system.file("extdata", paste0(dataset, "_EXPDESIGN.txt") , package = "dynamicHeatmap"), as.is = TRUE) # Filter out genes. geneId <- geneId[geneFilter == 1, ] x <- x[geneFilter == 1, ] # Pick the first column as the array IDs. exprData <- x colnames(exprData) <- expDesign[, 1] projectPath <- tempdir() outputName = "DynamicHeatmap" dynamicHeatmap(exprData, expDesign, geneId, analysisOptions = "CenterAndScaleGenes", # "CenterAndScaleGenes", "CenterGenes", "None" metric = "1-Correlation", # "1-Correlation", "Euclidean" linkage = "Average", # "Average", "Complete", "Single", "Ward" sortSamplesByClass = FALSE, sortSamplesClassName = "BRCA1.v.notBRCA1", useSamplesCenteredCorrelation = FALSE, projectPath, outputName)