hclust_and_heat: Hierarchical Clustering & visualization by heatmap

View source: R/hclust_and_heat.R

hclust_and_heatR Documentation

Hierarchical Clustering & visualization by heatmap

Description

Hierarchical cluster analysis and visualization by ezlimmaplot ezheat.

Usage

hclust_and_heat(
  object,
  annot,
  sc = c("z", "ctr", "none"),
  clip = NA,
  dist.method = "euclidean",
  hc.method = "ward.D2",
  deepSplit = 1,
  minClusterSize = 10,
  verbose = TRUE,
  pheno.df = NULL,
  labrows = "",
  labcols = "",
  color.v = NULL,
  annotation_colors = NULL,
  main = "Log2 Expression",
  name = "hclust_heat",
  reorder_cols = FALSE,
  gaps_col = NULL,
  width = NA,
  height = NA,
  plot = TRUE
)

Arguments

object

Matrix-like object with features (e.g. genes) as rows and samples as columns.

annot

Feature annotation.

sc

Row scaling. Should rows be centered ('ctr'), z-scored ('z'), or neither ('none').

clip

Values with magnitude > clip are reset to value clip. If given, must be > 0.

dist.method

The distance measure to be used.

hc.method

The agglomeration method to be used.

deepSplit

For method "hybrid", can be either logical or integer in the range 0 to 4. For method "tree", must be logical. In both cases, provides a rough control over sensitivity to cluster splitting. The higher the value (or if TRUE), the more and smaller clusters will be produced. For the "hybrid" method, a finer control can be achieved via maxCoreScatter and minGap below.

minClusterSize

Minimum cluster size.

verbose

Logical; print pruning messages to console?

pheno.df

Data frame with rows as samples and columns as phenotypes.

labrows

Labels for rows, e.g. gene symbols. This can be of length 1 (in which case it is recycled), of length nrow(object).

labcols

Labels for columns. This can be of length 1 (in which case it is recycled), of length ncol(object).

color.v

Color palette for heatmap. If NULL, it's set to colorRampPalette(rev(brewer.pal(n=9, name='RdYlBu')))(50).

annotation_colors

list for specifying annotation_row and annotation_col track colors manually. It is possible to define the colors for only some of the features. See pheatmap examples.

main

Main title of plot.

name

Name of file to create. Set to NA to plot to screen instead of to file.

reorder_cols

Logical; should columns be reordered with hierarchical clustering?

gaps_col

vector of column indices after which to insert gaps.

width

Manual option for determining the output file width in inches.

height

Manual option for determining the output file height in inches.

plot

Logical; should plot be generated?

Value

A data.frame of the clusters assignment and feature annotation.


jdreyf/jdcbioinfo documentation built on April 15, 2024, 6:37 p.m.