heatMap: Generate a heatmap from the matrix of expression values.

Description Usage Arguments Value

Description

Takes ExpressionSet object and creates a highly customizable heatmap, which can display bars that contain information about samples and/or gene clusters. Genes are plotted in rows and samples in columns.

Usage

1
2
3
4
5
heatMap(cellData, clusterCellsBy = "hierarchical",
  clusterGenesBy = "hierarchical", cellGroups, cellOrder, geneGroups,
  geneOrder, center = NA, bars, colors, logNumeric = TRUE,
  mapColors = c("midnightblue", "dodgerblue3", "mistyrose", "red2", "red4"),
  w = 8, h = 10, font = 10, save = FALSE)

Arguments

cellData

ExpressionSet object created with readCells (and preferably transformed with prepCells). It is also helpful to first run reduceGenes_var and reduceGenes_pca to keep the number of displayed genes reasonable.

clusterCellsBy

Character string that can take on the values 'hierarchical' or 'groups' to indicate whether the samples should be clustered with hiearchical clustering or by specified groupings.

clusterGenesBy

Character string that can take on the values 'hierarchical' or 'groups' to indicate whether the genes should be clustered with hiearchical clustering or by specified groupings.

cellGroups

Character string indicating the title of the column containing the sample group designations in pData. Length should equal the number of samples in pData. An example input would be 'KM_Groups', i.e. the title of one of the columns generated in pData by the clusterCells function. Groups are organized from left-to-right according to the alphabetical order of the factor levels in cellGroups.

cellOrder

Vector of integers indicating the order of the sample groups to be plotted from left-to-right on the heatmap. The position in the vector indicates the order on the heatmap (i.e. first, second, third, etc.), and the integer specifies the original alphabetical position of the group. E.g., for three groups plotted from left-to-right by default alphabetical order as, 'A', 'B', 'C', the vector c(3,1,2) would plot them as 'C', 'A', 'B'.

geneGroups

Character string indicating the title of the column containing the gene group designations in fData. Length should equal the total number of genes in fData. All genes present in the expression table should have a group value in the fData column. An example input would be 'KM_Groups', i.e. the title of one of the columns generated in fData by the clusterGenes function. Groups are organized from bottom-to-top according to the alphabetical order of the factor levels in geneGroups

geneOrder

Vector of integers indicating the order of the gene groups to be plotted from bottom-to-top on the heatmap. The position in the vector indicates the order on the heatmap (i.e. first, second, third, etc.), and the integer specifies the original alphabetical position of the group. E.g., for three groups plotted from bottom-to-top by default alphabetical order as, 'A', 'B', 'C', the vector c(3,1,2) would plot them as 'C', 'A', 'B'.

center

Numeric specifying a value for the center of the lookup table for expression values. Default is to use the center of minimum and maximum expression values.

bars

Vector of character strings specifying the titles of the columns in pData that contain the names of groups or values for each sample for which a color bar should be generated. If the column contains characters or factors, each level will be plotted with a different color. If the column is numeric, a color gradient spanning two colors will be created.

colors

Vector of character strings specifying the titles of the columns in pData that contain the colors to be used for plotting bars. The order of the title names should match the order of the title names in bars to which the colors correspond. If the corresponding bar column is a character or factor, the number of colors specified should equal the number of factor levels in the bar column. The order of colors corresponds to the order of factor levels in the bar column. If the corresponding bar column is numeric, two colors should be specified.

logNumeric

Boolean specifying whether the numeric values in bars should be transformed to log2 space.

mapColors

Vector of character strings specifying the colors to be used for the lookup table of expression values. Low to high values are specified from left-to-right in the vector.

save

Boolean specifying whether to save the resultant heatmap as a .tiff file.

Value

Highly customizeable heatmap plot in a new window.


joeburns06/hocuspocus documentation built on May 19, 2019, 2:59 p.m.