Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of heatmap in circos

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces what is the use of heatmap in circos. It is very detailed and has a certain reference value. Interested friends must finish reading it!

Heatmap maps a series of values into a color gradient and is one of the most commonly used charts. In circos, set it through the block of plot.

The usage is as follows:

The data of heatmap is the same as scatter plot and histogram, with at least 4 columns. The first three columns define the regions on the chromosome, the fourth column specifies the value of each region, and the other columns can be attributes in the configuration file, as shown in the following example

The color attribute in heatmap is special. In a heat map, you need a color gradient to map different value to this color gradient. So the color here corresponds to a list. There are two ways to set it.

1. Using built-in list

In the etc directory, there are many built-in color configurations, including many built-in color gradients, as shown below

Etc/colors,brewer.conf

Blues-3-seq and blues-3-seq-rev are the names extracted from two colors, and there should be three colors.

Blues-3-seq-1

Blues-3-seq-2

Blues-3-seq-3

The configuration file is written as follows

You can also combine multiple color gradients to use

two。 Use custom colors

It is written as follows

In heat maps, the most important thing is to understand the correspondence between value and color. There are two kinds of mapping relationships in heatmap.

1. Linear mapping

By default, there is a linear mapping between value and color. The value of color is a list, and for each value, the specific color can be obtained by calculating the corresponding subscript color_index.

The calculation formula of subscript is as follows:

It can be seen from the formula that the relationship between them is a linear mapping. When we do not specify values for max and min in the configuration file, circos automatically calculates these two values based on column 4 of the file file. Of course, we can also specify it manually in the configuration file.

When the min and max specified by us do not match the data, for example, the data range is [2,6], and the configuration file specifies [1 min 5], the subscript exceeds the limit when calculated by the above formula. In this case, the color is defined as the first color value in list for values less than min; for values greater than max, the color is defined as the last color value in list.

Specifically, the attributes of linear mapping are controlled by the color_mapping parameter, and there are three values.

Color_mapping = 0

Color_mapping = 1

Color_mapping = 2

By default, color_mapping = 0. The value of color_mapping sets an offset. For the n colors set by color, each color is divided into two parts, counting from 0, 00..nn. When color_mapping = 1, it shifts one bit backward to 011.. nn; when color_mapping = 2, it offsets two digits backwards to 112233.

When it comes to the color, the specific diagram is as follows:

two。 Nonlinear mapping

Turn on log mapping by adding the following parameters to the configuration file

When the data is unevenly distributed, log mapping is more appropriate.

The above is all the content of this article "what is the use of heatmap in circos?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report