作者:Zuguang Gu8
编译:Steven Shen
原文:Chapter 1 Introduction


第一章 介绍

Complex heatmaps are efficient to visualize associations between different sources of data sets and reveal potential patterns. Here the ComplexHeatmap package provides a highly flexible way to arrange multiple heatmaps and supports self-defined annotation graphics.

复杂的热图可以有效地可视化不同数据源之间的关联并揭示潜在模式。 这里的 ComplexHeatmap 包提供了一种高度灵活的方式来排列多个热图并支持自定义注释图形。

1.1 一般性设计

A single heatmap is composed of the heatmap body and the heatmap components. The heatmap body can be split by rows and columns. The heatmap components are titles, dendrograms, matrix names and heatmap annotations, which are put on the four sides of the heamap body. The heatmap components are reordered or split according to the heatmap body.

单个热图由热图主体和热图组件组成。热图主体可以按行和列分割。热图组件是标题、树形图、矩阵名称和热图注释,它们放在 heamap 体的四个侧面上。热图组件根据热图主体进行重新排序或拆分。
1. 介绍 - 图1

A heatmap list is concatenation of a list of heatmaps and heatmap annotations. Surrounding the heatmap list, there are global-level titles and legends.

热图列表是热图和热图注释列表的串联。围绕热图列表,有全局性标题和图例。

One important things for the heatmap list is that rows for all heatmaps and annotations (it is row annotation if the heatmap list is horizontal.) are all adusted so that the same row in all heatmaps and annotations corresponds to a same feature.

热图列表的一个重要内容是所有热图和注释的行(如果热图列表是水平的,则是行注释。)都被调整,以便所有热图和注释中相同的行对应于相同的特征。

1. 介绍 - 图2

The heatmaps and annotations (now it is column annotation) can also be arranged vertically.

热图和注释(现在是列注释)也可以垂直排列。
1. 介绍 - 图3

And the heatmap list can also be split by rows and by columns.

热图列表也可以按行和按列拆分。

The ComplexHeatmap package is implemented in an object-oriented way. To describe a heatmap list, there are following classes:

  • Heatmap class: a single heatmap containing heatmap body, row/column names, titles, dendrograms and row/column annotations.
  • HeatmapList class: a list of heatmaps and heatmap annotations.
  • HeatmapAnnotation class: defines a list of row annotations and column annotations. The heatmap annotations can be components of heatmap, also they can be independent as heatmaps.

ComplexHeatmap R 包是通过以面向对象的方式实现的。要描述热图列表,可以使用以下类:

  • Heatmap 类:包含热图主体,行/列名称,标题,树形图和行/列注释的单个热图。
  • HeatmapList 类:热图和热图注释列表。
  • HeatmapAnnotation 类:定义行注释和列注释的列表。热图注释可以是热图的组件,也可以作为热图独立存在。

There are also several internal classes:

  • SingleAnnotation class: defines a single row annotation or column annotation. The HeatmapAnnotation object contains a list of SingleAnnotation objects.
  • ColorMapping class: mapping from values to colors. The color mappings of the main matrix and the annotations are controlled by ColorMapping class.
  • AnnotationFunction class: constructs user-defined annotations. This is the base of creating user-defined annotation graphics.

还有几个内部类:

  • SingleAnnotation 类:定义单行注释或列注释。HeatmapAnnotation 对象包含 SingleAnnotation 对象的列表。
  • ColorMapping 类:从值到颜色的映射。主矩阵和注释的颜色映射由 ColorMapping 类控制。
  • AnnotationFunction 类:构造用户定义的注释。这是创建用户定义的注释图形的基础。

ComplexHeatmap is implemented under grid system, so users need to know basic grid functionality to get full use of the package.

ComplexHeatmap 是基于网格( grid )系统实现的,因此用户需要了解基本网格功能才能充分利用该软件包。

1.2 以下章节的简要说明

This chapter describes the configurations of a single heatmap.

This chapter describes the concept of the heatmap annotation and demonstrates how to make simple annotations as well as complex annotations. Also, the chapter explains the difference between column annotations and row annotations.

This chapter describes how to concatenate a list of heatmaps and annotations and how adjustment is applied to keep the correspondence of the heatmaps.

This chapter describes how to configurate the heatmap legends and annotation legends, also how to create self-defined legends.

This chapter describes methods to add more self-defined graphics to the heatmaps after the heatmaps are generated.

This chapter describes how to make oncoPrints and how to integrate other functionalities from ComplexHeatmap to oncoPrints.

This chapter describes how to make enhanced UpSet plots.

This chapter describes functions implemented in ComplexHeatmap for specific use, e.g. visualizing distributions.

More simulated and real-world examples are demonstrated in this chapter.

—— 本章完 ——