zheat_v2: Z-score normalized heatmap of gene expression

zheat_v2R Documentation

Z-score normalized heatmap of gene expression

Description

A function to generate a z-score normalized heatmap of gene expression from a DESeq2 counts object.

Usage

zheat_v2(
  genes = NULL,
  counts,
  conditions,
  order.by = NULL,
  sort.genes.by = NULL,
  title = "DEGs",
  labgenes = NULL,
  zscore = TRUE,
  avgExp = FALSE,
  rclus = FALSE,
  hmcol = NULL,
  retClus = FALSE,
  annoCols = "Dark2",
  border_color = "grey60",
  cellheight = NA,
  fontsize = 10
)

Arguments

genes

A character vector of genes to subset from rownames(counts) to create the heatmap

counts

Normalized count matrix with rows as genes and columns as samples. Use 'counts(dds, normalized=TRUE)'.

conditions

Character vector indicating conditions belonging to each sample (same order as colnames(counts))

order.by

Character vector indicating the arbitrary appearance order of the conditions level. Default is the default order of levels(conditions).

sort.genes.by

Character vector indicating the samples for sorting heatmap rows (genes).

title

Character vector indicating the title of the figure

labgenes

Character vector corresponding to rownames(counts) of genes to be labelled on the side of the heatmap. Leave as NULL to label all genes. Use "" to label no genes.

zscore

Boolean indicating if counts should be z-score normalized (default=TRUE)

avgExp

Boolean indicating if values should be averaged within each condition (i.e. plot one value per condition). Default=FALSE.

rclus

Boolean indicating if rows (genes) should be clustered. Leave FALSE for genes to be ordered on decreasing expression in 'con'.

hmcol

Color ramp palette of length 100 for custom heatmap colouring. Leave NULL for defaults.

retClus

Boolean indicating if clustered row names should be returnd. Default=FALSE.

annoCols

Character vector indicating RColorBrewer palette name or colours for annotation colours if rclus is provided a data.frame.

border_color

color of cell borders on heatmap, use NA if no border should be drawn.

Value

Heatmap of z-score normalized gene expression with control condition samples appearing first.


kevincjnixon/BinfTools documentation built on July 10, 2024, 11:46 a.m.