Population haplotype visualization analysis method and system
By using cell coloring and hierarchical clustering algorithms to generate cluster trees in Excel spreadsheets, the problem of existing tools being unable to display haplotype information in detail is solved, enabling detailed visualization and interactive analysis of genome haplotypes and simplifying the data processing workflow.
Patent Information
- Application Number
- CN202210706798.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-06-21
AI Technical Summary
Existing genome haplotype display tools cannot display detailed information about each individual SNP, and the charts cannot be edited subsequently, which increases the complexity of genome data analysis.
By utilizing the cell coloring and border features of Excel documents, combined with a hierarchical clustering algorithm, a clustering tree is generated and the genotype matrix and standardized sequencing depth are displayed in an Excel spreadsheet. Different colors are used to represent different genotypes, enabling a visual analysis of population haplotypes.
It enables detailed visualization and interactive analysis of genome haplotypes, simplifies data processing, detects copy number changes and structural variations, and supports subsequent research.
Smart Images

Figure CN114898801B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of biological analysis, in particular to a population haplotype visualization analysis method and system. BACKGROUND
[0002] In recent years, the reduction in the cost of deoxyribonucleic acid (DNA) sequencing has led to an explosive growth in genomic datasets. To date, more than 700 plant reference genomes have been sequenced and assembled. In addition, the size of plant populations used for re-sequencing studies has dramatically increased, leading to a rapid accumulation of plant genomic datasets. For example, as recently as 3365 chickpea genomes have been sequenced.
[0003] Adjacent single nucleotide polymorphism (SNP) sites in a genome are often inherited together in blocks, which are referred to as haplotype blocks. The identification of haplotypes is important in the analysis of genomes as it facilitates the reduction of genotyping costs, reduces the complexity of association studies, and is the basis for haplotype-based breeding. Haplotype-based association studies have been shown to be effective in identifying genes associated with complex traits. A number of tools have been developed for describing and visualizing haplotypes in a genome. However, the increase in both population size and genome size has presented some problems for the display of genomic haplotypes. While some existing tools can effectively produce heat maps or charts displaying haplotypes in a genome, they rarely display the details of each single SNP or any other value or information of the genotype, which is essential for researchers to better understand the sequencing results. In addition, the charts displayed by the existing tools cannot be edited afterwards, which is inconvenient for subsequent reanalysis of data and charts.
[0004] Based on the above problems, the present application uses the functions of coloring cells and adding cell border notes in excel documents, and combines clustering algorithms (hierarchical clustering algorithm) to visualize haplotype and genotype analysis. This method can automatically detect haplotypes for any given gene or genomic region of interest, and represent the genotype of each SNP in the excel cell with different colors. The analysis method of the present application can also flexibly display more customized information, including the significance (P-value) of whole genome association study, gene function annotation, and sequencing depth of each window, so as to detect copy number variation and structural variation, thus well making up for the defects of the existing gene analysis tools that the information cannot be displayed completely and the charts cannot be edited, and providing guidance for population haplotype genetic research. SUMMARY
[0005] In view of the above problems existing in the prior art, the present application provides a population haplotype visualization analysis method and system. The technical scheme of the present application is as follows:
[0006] In a first aspect, the present application provides a haplotype population visualization analysis method, comprising: displaying a clustering tree, sample information and a genotype matrix of each polymorphic site of each sample by using an Excel document, and displaying a normalized depth of each window by using different colors.
[0007] Further, the analysis method comprises the following steps:
[0008] Step 1: obtaining a haplotype population file containing data of a variant site, an alignment file and sample information;
[0009] Step 2: generating variant site genotype information and variant site annotation information according to the obtained variant site data, calculating a sample distance matrix according to the variant site genotype information, generating a clustering tree, and further obtaining a maximum depth of the clustering tree;
[0010] Step 3: calculating a normalized sequencing depth of each window according to the alignment file data and in combination with a user-specified base window size;
[0011] Step 4: drawing a clustering tree by using an Excel table according to the maximum depth of the clustering tree;
[0012] Step 5: further importing sample information and variant site annotation information into the Excel table in which the clustering tree is drawn, drawing a genotype matrix of each polymorphic site of each sample, and finally drawing a normalized depth of each window by using different colors in the Excel table according to the calculation result of Step 3.
[0013] Further, the Step 2 of calculating a sample distance matrix and generating a clustering tree is to calculate Euclidean distances between two samples by using an Agglomerative Hierarchical Clustering algorithm, to classify haplotypes by using a dynamicTreeCut algorithm, and then to generate a clustering tree.
[0014] Further, the Step 3 of calculating a normalized sequencing depth of each window is to use the following formula: normalized sequencing depth of each window = ((total depth of each window) ÷ (size of each window)) ÷ (average sequencing depth of sample).
[0015] Further, the step 4 of drawing the clustering tree in the Excel document comprises: according to the user-specified Excel cell width for drawing the clustering tree, dividing the maximum depth of the clustering tree obtained in the step 2 by the user-specified Excel cell width for drawing the clustering tree to obtain the tree height represented by each table in the Excel document; and then traversing the clustering tree obtained in the step 2, starting from the edges corresponding to the leaf nodes, drawing in the Excel table using the single-line border of the Excel cell, starting from one cell, and representing each edge through a plurality of cells until the edge corresponding to the root node is drawn, wherein the number of cells used in the Excel table for each edge of the clustering tree is equal to the height of the edge divided by the tree height represented by each table.
[0016] Preferably, the step 5 of drawing the genotype matrix of each polymorphic site of each sample in the Excel table uses different cell background colors to represent different genotypes, wherein a red background color represents a non-reference genome genotype, a blue background color represents a reference genome genotype, a yellow background color represents a heterozygous genotype, and a gray background color represents a deletion.
[0017] Preferably, the step 5 of drawing each window normalized depth in the Excel table uses different colors, and each window normalized depth is represented by an increasing depth from gray to yellow to red.
[0018] In a second aspect, the present application provides a population haplotype visualization analysis system, comprising:
[0019] an input module configured to input a population haplotype file to be analyzed, wherein the population haplotype file comprises a variant site file, an alignment file, and sample information data;
[0020] an analysis module configured to obtain a clustering tree and calculate normalized sequencing depths;
[0021] a visualization module configured to draw and display the clustering tree, a genotype matrix, a normalized sequencing depth heat map, sample information, and variant annotation information in an Excel table according to the clustering tree and the normalized sequencing depths provided by the analysis module.
[0022] Further, the analysis module is based on an Agglomerative Hierarchical Clustering algorithm to calculate the Euclidean distance between each pair of samples, and based on a dynamicTreeCut algorithm to classify haplotypes.
[0023] Population haplotype analysis is an important basis for haplotype-guided breeding. The present application realizes the interaction and visualization of population haplotype by using an excel table, realizes the integrity of haplotype analysis and visualization of a specific genomic region, and facilitates subsequent analysis and research of researchers. In addition, the method can simplify the analysis process, magnify a lot of detailed information of genes, facilitate the discovery of new variations, and specific application examples show that the method has good interactivity. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 The working principle and flowchart of the analysis method of the present application.
[0025] Figure 2 The application example of population haplotype visualization of the dogtail grass seed crushing related gene (SEVIR_5G085400v2) in Example 1 of the present application, wherein Figure A is a complete diagram of the cluster tree, genotype matrix, and standardized sequencing depth heat map generated by visualization; Figure B is the background information of the samples for population haplotype analysis, including sample name and sample collection latitude and longitude, and ancestor clustering; Figure C is the geographical location of the samples marked on the map through the information of Figure B; Figure D is the annotation information of each nucleotide polymorphism site; and Figure E is the standardized depth of each window, and the color from gray to yellow to red represents the increase of the standardized depth in turn.
[0026] Figure 3 For Figure 2 Figure A (1) of the present application is an enlarged view of the cluster tree.
[0027] Figure 4 For Figure 2 Figure A (2) of the present application is an enlarged view of the detailed information of each sample.
[0028] Figure 5 For Figure 2 Figure A (3) of the present application is an enlarged view of the annotation information of each small indel polymorphism site.
[0029] Figure 6 For Figure 2 Figure A (4) of the present application is an enlarged view of the standardized depth in each window.
[0030] Figure 7 For Figure 2 Figure C of the present application is an enlarged view.
[0031] Figure 8 For Figure 2 Figure D of the present application is an enlarged view.
[0032] Figure 9An application example of population haplotype visualization of the dogtail grass leaf angle related gene (SEVIR_5G394700v2) in Example 2 of the present application, wherein Fig. A is a tree structure of hierarchical clustering; Fig. B is detailed information of each sample; Fig. C is annotation information of each small indel polymorphism site; Fig. D is the genotype of each sample at each polymorphism site; and Fig. E is the normalized depth in each window.
[0033] Figure 10 Fig. A is an enlarged view of Fig. A. Figure 9
[0034] Figure 11 Fig. B is an enlarged view of Fig. B. Figure 9
[0035] Figure 12 Fig. C is an enlarged view of Fig. C. Figure 9
[0036] Figure 13 Fig. D is an enlarged view of Fig. D. Figure 9
[0037] Figure 14 Fig. E is an enlarged view of Fig. E. Figure 9 DETAILED DESCRIPTION The present application provides a population haplotype visualization analysis method, which comprises: displaying a clustering tree, sample information, and the genotype of each polymorphism site of each sample by using an Excel document, and displaying the normalized depth of each window by using different colors. As shown in the accompanying drawings, the analysis method specifically comprises the following steps:
[0038] Figure 1 Step 1: obtaining nucleotide diversity data and corresponding variant site annotation information from an input variant site file; obtaining sample information data, an alignment file from the input file, the sample information data such as the latitude and longitude of sample collection, ancestral clustering, growth habit, etc., which can have any column data without limitation; the alignment file is used for subsequent calculation of sequencing depth. The sample list can also be obtained from the input file for subsequent filtering of the samples; and the genomic region is used for subsequent filtering of the variant sites.
[0039]
[0040] Step 2, according to the obtained nucleotide diversity data and sample information data, firstly filtering the sample and diversity data, then calculating the sample distance matrix, and generating a cluster tree, and further obtaining the maximum depth of the cluster tree; the process is to calculate the Euclidean distance between each two samples by using the Agglomerative Hierarchical Clustering algorithm, and to classify the haplotype by using the dynamicTreeCut algorithm, and then generate a cluster tree;
[0041] Step 3, according to the alignment file data, and combining the window size provided by the user (if the user does not specify, then the program defaults the window size to 50 bases), calculating the normalized sequencing depth of each window to determine whether there is a copy number variation and a structural variation; the formula is as follows:
[0042] The normalized sequencing depth of each window = ((the total depth of each window) ÷ (the size of each window)) ÷ (the average sequencing depth of the sample);
[0043] Step 4, according to the maximum depth of the cluster tree, using an Excel table to draw a cluster tree, specifically including: according to the user-specified Excel cell width used to draw the cluster tree, dividing the maximum depth of the cluster tree obtained in step 2 by the user-specified Excel cell width used to draw the cluster tree to obtain the tree height represented by each table in the Excel document; next, traversing the cluster tree obtained in step 2, starting from the edge corresponding to the leaf node, starting to draw in the Excel table using the single-line border of the Excel cell, representing each edge through several cells, until the edge corresponding to the root node is drawn, and the number of cells used in the Excel table for each edge of the cluster tree is equal to the height of the edge divided by the tree height represented by each table.
[0044] Step 5, further importing sample information and variant site annotation information in the Excel table in which the cluster tree is drawn, and drawing the genotype matrix of each polymorphic site of each sample, which uses different cell background colors to represent different genotypes in the Excel table, a red background color represents a non-reference genome genotype, a blue background color represents a reference genome genotype, a yellow background color represents a heterozygous genotype, and a gray background color represents a deletion; finally, according to the calculation result of step 3, drawing each window normalized depth in the Excel table, and each window normalized depth is represented by an increasing depth from gray to yellow to red.
[0045] The application also provides a population haplotype visualization analysis system, comprising:
[0046] An input module is configured to input a population haplotype file to be analyzed, wherein the population haplotype file comprises a variant site file, an alignment file, a sample list file, a sample information file and a genomic region file.
[0047] An analysis module is configured to obtain a clustering tree and calculate a normalized sequencing depth, wherein the analysis module is based on an Agglomerative Hierarchical Clustering algorithm to calculate the Euclidean distance between each pair of samples, and based on a dynamicTreeCut algorithm to classify haplotypes.
[0048] A visualization module is configured to draw a clustering tree, a genotype matrix and a normalized sequencing depth heat map by an Excel table according to the clustering tree and the normalized sequencing depth provided by the analysis module, and display sample information and variant annotation information.
[0049] In the description of the present application, it should be noted that, in the examples, the specific conditions are not specified, and the conventional conditions or the conditions recommended by the manufacturer are used. The reagents or instruments used are not specified by the manufacturer, and are conventional products that can be purchased on the market.
[0050] The present application will be further described in detail below in combination with the accompanying drawings and specific examples, which are an explanation of the present application rather than a limitation.
[0051] Example 1
[0052] The present embodiment provides a population haplotype visualization analysis method for a dogtail grass seed breakage related gene, comprising the following steps:
[0053] (1) The experimental data is downloaded from NCBI (No. PRJNA560514, PRJNA265547, PRJNA527194), and the data is generated by Sujan Mamidi et al. in 2020 in Nature Biotechnology, entitled "A genome resource for green millet Setaria viridis enables discovery of agronomically valuable loci", which generates whole genome resequencing data of 500 samples.
[0054] (2) Using the method of the present application, we analyze and visualize the population haplotype of the gene SEVIR_5G085400v2 related to the breakage of dogtail grass seeds. The visualization result is mainly divided into five parts, the first part shows the clustering relationship of the samples Figure 2 A(1) and Figure 3); the second part shows the background information of these samples, including sample name and latitude and longitude of sample collection, and ancestral clustering ( Figure 2 A(2) and Figure 4 ; Figure 2 B); the third part is the annotation information of each nucleotide polymorphism site ( Figure 2 A(3) and Figure 5 ; Figure 2 D and Figure 8 ); the fourth part shows the normalized depth of each window, and the color from gray to yellow to red represents the increase of normalized depth ( Figure 2 A(4) and Figure 6 ; Figure 2 E); the fifth part is the main part of visualization, which shows the genotype of each nucleotide polymorphism site of each sample, and different colors represent different nucleotides ( Figure 2 A(MainPanel)). Using the information of the second part, we quickly generated the distribution of these samples on the map ( Figure 2 C and Figure 7 ).
[0055] Example 2
[0056] The present embodiment provides a population haplotype visualization analysis method for leaf angle related genes of green millet Setaria viridis, comprising the following steps:
[0057] (1) The experimental data is downloaded from NCBI (number: PRJNA560514, PRJNA265547, PRJNA527194), and the data is published by Sujan Mamidi et al. in Nature Biotechnology in 2020, the article name is “A genome resource for green millet Setaria viridis enables discovery of agronomically valuable loci”, which generates whole genome resequencing data of 500 samples.
[0058] (2) Using the method of the present application, we perform population haplotype analysis and visualization for the gene SEVIR_5G394700v2 related to green millet Setaria viridis seed shattering. The visualization result mainly includes five parts, the first part shows the clustering tree indicating the clustering relationship of these samples ( Figure 9 A and Figure 10 ); the second part shows the background information of these samples, including sample name and latitude and longitude of sample collection, and ancestral clustering ( Figure 9 B and Figure 11) ; the third part is the annotation information of each small indel polymorphism site Figure 9 C and Figure 12 ) ; the fourth part is the main part of visualization, which shows the genotype of each sample at each small indel polymorphism site, and different colors represent different genotypes Figure 9 D and Figure 13 ) ; the fifth part shows the normalized depth of each window, and the color changes from gray to yellow to red, representing the increase of the normalized depth Figure 9 E and Figure 14 ).
[0059] The above embodiments only express several embodiments of the present application, which are described in detail and specifically, but cannot be understood as the limitation of the patent scope of the present application. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which belong to the protection scope of the present application. Therefore, the protection scope of the present application patent should be subject to the appended claims.
Claims
1. A method for population haplotype visualization analysis, the method comprising: The analysis method is to display a cluster tree, a genotype matrix of each polymorphic site of each sample, a per-window normalized sequencing depth heat map, and sample information and variation site annotation information by using an Excel document; The analysis method comprises the following steps: Step 1, obtaining a population haplotype file containing variation site data, alignment file data and sample information data; Step 2, generating variation site genotype information and variation site annotation information according to the variation site data, calculating a sample distance matrix and generating a cluster tree according to the variation site genotype information, and further obtaining a maximum depth of the cluster tree; the calculation of the sample distance matrix and the generation of the cluster tree are performed by using an Agglomerative Hierarchical Clustering algorithm to calculate the Euclidean distance between each two samples, and a dynamicTreeCut algorithm to classify haplotypes, and then generating a cluster tree; Step 3, calculating the normalized sequencing depth of each window according to the alignment file data and in combination with a user-specified base window size; wherein the normalized sequencing depth of each window = ((total depth of each window) ÷ (size of each window)) ÷ (average sequencing depth of the sample); Step 4, using an Excel table to draw the cluster tree according to the maximum depth of the cluster tree obtained in step 3: dividing the maximum depth of the cluster tree obtained in step 2 by the Excel cell width specified by the user for drawing the cluster tree to obtain the tree height represented by each column of the table in the Excel document; then traversing the cluster tree obtained in step 2, starting from the edges corresponding to the leaf nodes, and drawing in the Excel table using the solid line of the border of an Excel cell, starting from a cell, passing through several cells to represent each edge, until the edge corresponding to the root node is drawn, and the number of cells passed through by each edge of the cluster tree in the Excel table is equal to the height of the edge divided by the tree height represented by each column of the table; Step 5, importing the sample information and the variation site annotation information into the Excel table in which the cluster tree is drawn, drawing a genotype matrix of each polymorphic site of each sample, and finally displaying a per-window normalized sequencing depth heat map in the Excel table by using different cell background colors according to the calculation result of step 3; The final visual result consists of five parts, The first part is a region for displaying the cluster tree; The second part is a region for displaying the sample information; The third part is a region for displaying the genotype matrix of each polymorphic site of each sample, which is respectively listed as columns and residue positions of sample sequences as rows, and different cell background colors are used to represent different genotypes; The fourth part is a region for displaying the variation site annotation information corresponding to each polymorphic site; The fifth part is a region for displaying a per-window normalized sequencing depth heat map, which uses a gradient color scale to represent the change of the normalized depth of each window in turn. Wherein, the information of the same sample is displayed in the same row, and the information of the same sequence residue position is displayed in the same column.
2. The method of claim 1, wherein: The different genotypes are represented by different cell background colors, specifically, a red background color represents a non-reference genome genotype, a blue background color represents a reference genome genotype, a yellow background color represents a heterozygous genotype, and a gray background color represents a deletion.
3. The method of claim 1 or 2, wherein: The step 5 forms a normalized sequencing depth heat map of each window in the Excel table by using different cell background colors, and the normalized sequencing depth of each window is represented by an increasing depth from gray to yellow to red.
4. A population haplotype visualization analysis system for running the method of claims 1-3, characterized by: The method comprises the following steps: An input module is configured to input a population haplotype file to be analyzed, wherein the population haplotype file comprises a variant site file, an alignment file, and sample information data; An analysis module is configured to obtain a clustering tree and calculate normalized sequencing depth; A visualization module is configured to draw and display the clustering tree, a genotype matrix of each polymorphic site of each sample, a normalized sequencing depth heat map, sample information, and variant annotation information in an Excel table according to the clustering tree and the normalized sequencing depth provided by the analysis module. The analysis module is configured to generate variant site genotype information and variant site annotation information according to the variant site data, calculate a sample distance matrix and generate a clustering tree according to the variant site genotype information, further obtain the maximum depth of the clustering tree, and calculate the normalized sequencing depth of each window according to the alignment file data and in combination with a base window size specified by a user; the calculation of the sample distance matrix and the generation of the clustering tree are based on an Agglomerative Hierarchical Clustering algorithm to calculate the Euclidean distance between each pair of samples and a dynamicTreeCut algorithm to classify haplotypes and then generate the clustering tree. The normalized sequencing depth of each window is ((total depth of each window) ÷ (size of each window)) ÷ (average sequencing depth of the sample). The visualization module is configured to divide the maximum depth of the clustering tree obtained by the analysis module by the width of an Excel cell used to draw the clustering tree to obtain the height of each column of the table in the Excel document; then, the clustering tree obtained by the analysis module is traversed, and a solid line of a border of an Excel cell is used to draw from one cell to several cells to represent each edge of the clustering tree, until the edge corresponding to the root node is drawn, wherein the number of cells passed through by each edge of the clustering tree in the Excel table is equal to the height of the edge divided by the height of each column of the table; further, the sample information and the variant site annotation information are imported into the Excel table in which the clustering tree is drawn, the genotype matrix of each polymorphic site of each sample is drawn, and the normalized sequencing depth heat map of each window is displayed in the Excel table by using different cell background colors according to the calculation result of step 3. The final visualization result is composed of five parts, The first part is a region showing the cluster tree; The second part is a region showing the sample information; The third part is a region showing the genotype matrix of each polymorphic site of each sample, respectively taking sample list as column and residue position of sample sequence as row, and using different cell background color to represent different genotypes; The fourth part is a region showing the variation site annotation information corresponding to each polymorphic site; The fifth part is a region showing the window normalized sequencing depth heat map, using gradient color scale to represent the change of the window normalized depth in turn; Wherein, the information of the same sample is displayed in the same row, and the information of the same sequence residue position is displayed in the same column.