Learn R Programming

inDAGO (version 1.0.0)

HeatmapExpPlotly: HeatmapExpPlotly

Description

Create an interactive heatmap of top variable genes using Heatmaply.

Usage

HeatmapExpPlotly(x, ColorPanel, scale, cluster, show_names, NumGenes)

Value

A Plotly object (heatmaply) representing the interactive heatmap.

Arguments

x

Numeric matrix of log-CPM values (genes × samples), e.g., from edgeR::cpm().

ColorPanel

Character. Name of a continuous palette from the paletteer package.

scale

Character. Scaling mode: "row", "column", or "none".

cluster

Character or logical. Clustering option for dendrogram: "both", "row", "column", or "none".

show_names

Character. One of "both", "row", "column", or "none" to display row/column labels.

NumGenes

Integer. Number of top-variance genes to include in the heatmap.

Details

This function selects the highest-variance genes from a log-CPM matrix, transposes the data, and renders an interactive heatmap via "heatmaply", using "pheatmap" call.

  1. Compute per-gene variance and select the top NumGenes.

  2. Transpose the subsetted matrix so samples are rows.

  3. Generate a temporary static heatmap with pheatmap to extract dendrograms.

  4. Render an interactive heatmap with heatmaply::heatmaply().