aoMatrix: plot an ordered (sorted) matrix

Description Usage Arguments Details

View source: R/aheatmap.R

Description

this is an enhancement of aMatrix where one can specify Rowv and Colv as in heatmap.2 typical application is that one can need to order according to a phenotype, i.e. EMT score

Usage

1
2
3
4
5
aoMatrix(mat, color = bluered(50), display_numbers = TRUE, scale = "none",
  Rowv = NULL, Colv = NULL, clustering_distance_rows,
  clustering_distance_cols, clustering_method = "ward.D2", return = FALSE,
  annotation = NA, annotation_colors = NA, labRow = NA, labCol = NA,
  ...)

Arguments

mat

a matrix to be plotted

color

color pallete ( a vector of colors)

display_numbers

whether to display numbers

scale

ways to scale the values

Rowv

either NULL or a vector of integers for row ordering

Colv

either NULL or a vector of integers for column ordering

clustering_distance_rows

distance measure used in clustering rows. Possible values are "correlation" for Pearson correlation and all the distances supported by dist, such as "euclidean", etc. If the value is none of the above it is assumed that a distance matrix is provided.

clustering_distance_cols

distance measure used in clustering columns. Possible values the same as for clustering_distance_rows.

clustering_method

clustering method used. Accepts the same values as hclust.

return

whether to return a list of orders

annotation

data frame that specifies the annotations shown on top of the columns. Each row defines the features for a specific column. The columns in the data and rows in the annotation are matched using corresponding row and column names. Note that color schemes takes into account if variable is continuous or discrete.

...

additional parameters to be passed to aheatmap (pheatmap)

Details

The working horce is aMatrix (more precisely its code). We only need to computer row order and column order and pass the reordered matrix to aMatrix. Ordering is determined first by looking at Rowv and Colv. If either one is not specified, order is computed based on clustering with a given distance and linkage rule. If even clustering is not specified, then there is no ordering.


nickytong/GenAnalysis documentation built on July 20, 2019, 8:57 a.m.