dynamicHeatmap {dynamicHeatmap}R Documentation

dynamicHeatmap() function

Description

Run clustering calculations and show the gene expresion data in the Dynamic Heatmap Viewer.

Usage

dynamicHeatmap(exprData, expDesign, geneId, analysisOptions, metric,
  linkage, sortSamplesByClass, sortSamplesClassName,
  useSamplesCenteredCorrelation, projectPath, outputName)

Arguments

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 TRUE, no sample clustering calculation will be performed, and the heatmap orders the samples in the chosen class. If it is FALSE, a sample clustering calculation will be performed, and the heatmap orders the samples according to the clustering result.

sortSamplesClassName

A character string specifying the sample class name for ordering in the heatmap.

useSamplesCenteredCorrelation

A logical variable. If it is TRUE, the sample clustering calculation uses the "1-Correlation" distances. If it is FALSE, the sample clustering calculation uses the uncentered correlation distances.

projectPath

A character string specifying the full project path.

outputName

A character string specifying the output folder name.

Details

Please see the BRB-ArrayTools manual (https://brb.nci.nih.gov/BRB-ArrayTools/Documentation.html) for details.

Examples

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)
                 

[Package dynamicHeatmap version 0.2 Index]