Skip to contents

Specifically, it does the following:

  1. for non-numerical variables in annoDf,create the color mapping using colors in getDistinctColors() because their default colors are not very distinct.

  2. for numerical variables, apply setColMapAndLegend()

Usage

setAnnoLegend(
  mat1,
  annoDf,
  annoColMapList = NULL,
  annoParaList = list(),
  on = 1:2,
  rmLegendOutliers = T,
  intAsDiscreteCutoff = 6
)

Arguments

annoDf

data.frame; annotation

annoColMapList

list of color mappings for each annotation, NULL; its value is passed to col in ComplexHeatmap::HeatmapAnnotation(). names(annoColMapList) are among colnames(annoDf)

annoParaList

list of annotation parameters except col in ComplexHeatmap::HeatmapAnnotation(), list();

on

1:2; for row or column annotation

rmLegendOutliers

logical, TRUE; passed to setColMapAndLegend()

intAsDiscreteCutoff

integer, 6; passed to setColMapAndLegend()

Value

a list() of the following items:

  1. ha: an object of ComplexHeatmap::HeatmapAnnotation() where the col and legend tick and labels are reset based on rmLegendOutliers

  2. newDf: infinite values in numerical columns of annoDf, if present, are set to NA

Examples

# none