Gene screening method and device and gene clustering method and device

By performing gene screening on spatial transcription data, the degree of diffusion of genes is calculated and genes with low diffusion are screened out, the problem of low quality of transcript data is solved, and the quality of gene data and the accuracy of downstream tasks are improved.

CN119207589APending Publication Date: 2024-12-27SHENZHEN HUADA SANJIAN QIFA TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310761165.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The gene data in the transcript data obtained based on spatial transcriptome sequencing technology is of low quality, which affects the accuracy of downstream tasks.

Method used

A gene screening method is proposed. By obtaining initial distribution data from the spatial transcription data of the target slice, constructing target distribution data, calculating the diffusion degree of each type of gene, and screening multiple genes based on the diffusion degree to obtain the genes of the target category . The method includes constructing the original and target distribution of the article, calculating the transport plan to determine the degree of diffusion, and screening out genes with low diffusion through curve fitting and second-order derivative methods.

Benefits of technology

Effectively denoised transcript data, improve the quality of gene data, improve the accuracy of downstream tasks, especially in cell category determination and clustering analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207589A_ABST
    Figure CN119207589A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a gene screening method and device and a gene clustering method and device, and belongs to the technical field of gene sequencing. The gene screening method comprises the following steps: acquiring initial distribution data of multiple types of genes in a target slice from spatial transcription data of the target slice; constructing corresponding target distribution data based on the initial distribution data of each type of genes, wherein the target distribution data indicates that the corresponding type of genes are uniformly distributed in a two-dimensional space; calculating the diffusion degree of each type of genes according to the initial distribution data and the target distribution data; and screening the multiple types of genes based on the diffusion degree of each type of genes to obtain a target type of genes. According to the embodiment of the invention, genes can be screened, so that the quality of gene data in transcripts can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of gene sequencing, and in particular to a gene screening method and device, and a gene clustering method and device. Background Art

[0002] Spatial transcriptomics (ST) sequencing technology is a technology that can simultaneously obtain tissue spatial information and gene expression information. Based on ST technology, cells in tissue sections can be visualized and quantitatively analyzed, thereby achieving downstream tasks such as cell type determination.

[0003] At present, the quality of gene data in transcript data obtained based on ST technology is low, which affects the accuracy of downstream tasks. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a gene screening method and device, a gene clustering method and device, which aim to screen genes to reduce noise data in transcript data. This method can improve the quality of gene data in transcripts.

[0005] To achieve the above object, the first aspect of the embodiment of the present application proposes a gene screening method, the method comprising:

[0006] Acquire initial distribution data of multiple types of genes in the target slice from the spatial transcription data of the target slice;

[0007] Constructing corresponding target distribution data based on the initial distribution data of each type of gene, wherein the target distribution data indicates that the corresponding type of genes are evenly distributed in the two-dimensional space;

[0008] Calculating the diffusion degree of each type of gene according to the initial distribution data and the target distribution data;

[0009] The multiple types of genes are screened based on the diffusion degree of each type of genes to obtain genes of the target category.

[0010] In some embodiments, the initial distribution data includes a plurality of initial position data and an initial number of genes of a corresponding category corresponding to each initial position, the target distribution data includes a plurality of target position data and a target number of genes of a corresponding category corresponding to each target position, and the calculation of the diffusion degree of each type of gene according to the initial distribution data and the target distribution data includes:

[0011] Determine first coordinate data of the initial position data of each type of gene in a preset two-dimensional coordinate system, and determine second coordinate data of the target position data of each type of gene in the preset two-dimensional coordinate system;

[0012] Constructing an original distribution of items using the first coordinate data and the corresponding initial quantity, and constructing a target distribution of items using the second coordinate data and the corresponding target quantity;

[0013] Determine a target transportation plan from the original distribution of the items to the target distribution of the items, the target transportation plan corresponding to the minimum transportation cost;

[0014] The diffusion degree of each type of gene is calculated according to the target transport plan corresponding to each type of gene.

[0015] In some embodiments, determining a target transportation plan from the original distribution of the items to the target distribution of the items includes:

[0016] Determine an item transportation plan for transporting items from any first coordinate data to any second coordinate data, and obtain a transportation plan matrix, wherein the item transportation plan includes the quantity of items to be transported;

[0017] Calculate the transportation cost of transporting a unit quantity of goods from any first coordinate data to any second coordinate data to obtain a transportation cost matrix;

[0018] A cost function for calculating total transportation cost based on the transportation plan matrix and the transportation cost matrix;

[0019] Based on the preset constraints, the transportation plan corresponding to the minimum value of the cost function is determined to obtain the target transportation plan, wherein the preset constraints include that the number of items transported from any first coordinate data to any second coordinate data is not less than 0, the number of remaining items corresponding to any first coordinate data after the transportation is completed is 0, and the number of items corresponding to any second coordinate data is the target number.

[0020] In some embodiments, the step of calculating the diffusion degree of each type of gene according to the target transport plan corresponding to each type of gene includes:

[0021] Calculate the target transportation cost of each type of gene according to the target transportation plan matrix corresponding to the target transportation plan of each type of gene and the transportation cost matrix;

[0022] The degree of spread of each type of gene is calculated based on the target transport cost of each type of gene.

[0023] In some embodiments, the constructing corresponding target distribution data based on the initial distribution data of each type of gene includes:

[0024] Calculating the distribution area of ​​each type of gene according to the initial position data corresponding to each type of gene;

[0025] Calculate the number of targets corresponding to each target position in the target distribution of each type of gene based on the initial number of each type of gene corresponding to different initial positions;

[0026] The target distribution data of each type of gene is determined according to the number of initial positions of each type of gene, the distribution area of ​​each type of gene and the target number.

[0027] In some embodiments, the calculating the distribution area of ​​each type of gene according to the initial position data corresponding to each type of gene includes:

[0028] Connecting any two initial positions in the initial position data corresponding to each type of gene to obtain multiple connecting lines corresponding to each type of gene;

[0029] The areas of the smallest polygons containing the multiple lines are determined respectively to obtain the distribution area of ​​each type of gene.

[0030] In some embodiments, the step of calculating the target quantity corresponding to each target position in the target distribution of each type of gene based on the initial quantity corresponding to each type of gene at different initial positions includes:

[0031] The sum of the number of genes of each type is calculated based on the initial number of genes of each type corresponding to different initial positions;

[0032] The ratio between the sum of the number of genes in each category and the initial position number of genes in the corresponding category was calculated to obtain the target number corresponding to each category of genes.

[0033] In some embodiments, determining the target distribution data of each type of gene according to the number of initial positions of each type of gene, the distribution area of ​​each type of gene, and the target number includes:

[0034] Constructing a regular graph based on the distribution area of ​​each type of gene, wherein a plurality of position points are evenly arranged in the regular graph, and the number of the plurality of position points is the same as the number of initial positions of the corresponding type of gene;

[0035] The position data of multiple position points corresponding to each type of gene are determined as the target position data of each type of gene, and the number of genes corresponding to each target position is set as the target number to obtain the target distribution data of each type of gene.

[0036] In some embodiments, screening the multiple types of genes based on the diffusion degree of each type of genes to obtain genes of the target category includes:

[0037] Genes of multiple categories are ranked in order from low to high based on the degree of diffusion to obtain a ranking sequence;

[0038] A coordinate scatter plot is constructed with the value corresponding to the diffusion degree as the vertical axis and the sorting number value of each category as the horizontal axis;

[0039] Performing curve fitting on the coordinate scatter plot to obtain a fitting curve;

[0040] The multiple types of genes are screened based on the degree of change in the slope of the fitting curve to obtain genes of the target category.

[0041] In some embodiments, screening the multiple types of genes based on the degree of change in the slope of the fitting curve to obtain genes of the target category includes:

[0042] Obtaining a fitting function corresponding to the fitting curve;

[0043] Calculating the second-order derivative of the fitting function;

[0044] Determine the target diffusion degree value corresponding to the maximum value of the second-order derivative;

[0045] The multiple types of genes are screened based on the target diffusion degree value to obtain genes of the target category.

[0046] In some embodiments, screening the multiple types of genes based on the diffusion degree of each type of genes to obtain genes of the target category includes:

[0047] Obtaining a preset diffusion degree threshold;

[0048] The multiple types of genes are screened based on the diffusion degree threshold to obtain genes of the target category.

[0049] In some embodiments, the initial distribution data of multiple types of genes in the target slice are obtained from the spatial transcription data of the target slice:

[0050] Obtain the number of capture points corresponding to each type of gene in the spatial transcription data of the target slice;

[0051] The data of genes whose corresponding number of capture points is less than a preset number threshold are deleted to obtain denoised spatial transcription data;

[0052] Initial distribution data of multiple types of genes in the target slice are obtained from the denoised spatial transcription data.

[0053] To achieve the above object, a second aspect of the embodiments of the present application proposes a gene clustering method, the method comprising:

[0054] Acquire spatial transcription data of target slices;

[0055] Performing gene screening on the spatial transcription data to obtain genes of a target category, wherein the genes of the target category are genes of the target category obtained by screening using the gene screening method of the first aspect;

[0056] The genes of the target category are clustered to obtain a gene clustering result.

[0057] To achieve the above-mentioned purpose, a third aspect of the embodiment of the present application provides a gene screening device, the gene screening device comprising:

[0058] A first acquisition unit is used to acquire initial distribution data of multiple types of genes in the target slice from the spatial transcription data of the target slice;

[0059] A construction unit, used to construct target distribution data of each type of genes based on the initial distribution data of each type of genes, wherein the target distribution data indicates that the corresponding type of genes are evenly distributed in the two-dimensional space;

[0060] A calculation unit, used for calculating the diffusion degree of each type of gene according to the initial distribution data and the target distribution data;

[0061] The first screening unit is used to screen the multiple types of genes based on the diffusion degree of each type of genes to obtain genes of the target category.

[0062] To achieve the above-mentioned purpose, a fourth aspect of the embodiments of the present application provides a gene clustering device, the device comprising:

[0063] A second acquisition unit is used to acquire spatial transcription data of the target slice;

[0064] A second screening unit is used to perform gene screening on the spatial transcription data to obtain genes of a target category, wherein the genes of the target category are genes of the target category obtained by screening using the gene screening method of the first aspect;

[0065] The clustering unit is used to cluster the genes of the target category to obtain gene clustering results.

[0066] To achieve the above-mentioned purpose, the fifth aspect of an embodiment of the present application proposes an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the gene screening method described in the first aspect or the gene clustering method described in the second aspect.

[0067] To achieve the above objectives, the sixth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the gene screening method described in the first aspect or the gene clustering method described in the second aspect.

[0068] To achieve the above-mentioned purpose, the seventh aspect of an embodiment of the present application proposes a computer program product, which includes a computer program, and the computer program is read and executed by a processor of a computer device, so that the computer device executes the gene screening method described in the first aspect or the gene clustering method described in the second aspect.

[0069] The gene screening method and device, gene clustering method and device proposed in the embodiment of the present application, construct target distribution data representing uniform distribution of genes through the initial distribution data of genes, determine the diffusion degree of genes according to the target distribution data and the initial distribution data, screen multiple types of genes according to the diffusion degree, and obtain genes of target categories. Since genes with small diffusion degrees have good spatial differences and spatial aggregation in space, they can have good performance in various downstream tasks. The gene screening method provided in the embodiment of the present application can screen out genes of target categories with small diffusion degrees according to the diffusion degree of genes, thereby improving the quality of gene data in transcripts. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0071] Figure 1 is a flow chart of the gene screening method provided in the embodiments of the present application;

[0072] Figure 2 yes Figure 1 Flow chart of step S101 in FIG.

[0073] Figure 3A This is a schematic diagram of the distribution of all cells in Arabidopsis seeds;

[0074] Figure 3B This is a schematic diagram of the distribution of the AT4G00860 gene in Arabidopsis seeds;

[0075] Figure 4 yes Figure 1 Flow chart of step S102 in FIG.

[0076] Figure 5 It is a schematic diagram of the capture quantity of AT4G00860 gene in each spot;

[0077] Figure 6 yes Figure 4 Flow chart of step S401 in FIG.

[0078] Figure 7 yes Figure 4 Flow chart of step S402 in FIG.

[0079] Figure 8 yes Figure 4 Flow chart of step S403 in FIG.

[0080] Fig. 9 yes Figure 1 Flow chart of step S103 in FIG.

[0081] Fig. 10A It is a schematic diagram of the original distribution of items;

[0082] Fig. 10B It is a schematic diagram of the distribution of item targets;

[0083] Fig.11 yes Fig. 9 Flow chart of step S903 in FIG.

[0084] Fig.12 yes Fig. 9 Flow chart of step S904 in FIG.

[0085] Fig.13 yes Figure 1 Flow chart of step S104 in FIG.

[0086] Fig.14 is a schematic diagram of the fitting curve;

[0087] Fig.15 yes Fig.13 Flow chart of step S1304 in FIG.

[0088] Fig.16 yes Figure 1 Another flowchart of step S104 in;

[0089] Fig.17 is a flow chart of the gene clustering method provided in the embodiment of the present application;

[0090] Fig.18A This is a comparison diagram of the adjusted Rand Index;

[0091] Fig.18B This is a schematic diagram of accuracy comparison;

[0092] Fig.19 is a flow chart of a gene screening device provided in an embodiment of the present application;

[0093] Fig. 20 is a flow chart of a gene clustering device provided in an embodiment of the present application;

[0094] Fig.21 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0095] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0096] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations:

[0097] Spatial Transcriptomics (ST) sequencing technology: a technology that analyzes mRNA from a spatial level, used to analyze all mRNA in a single tissue section. There are four capture areas on each slide used for library construction by 10x Genomics spatial transcriptomics, and the size of each capture area is 6.5x6.5mm. Each capture area contains 5,000 barcoded spots (barcoded spots), each spot has a diameter of 55μm, and the center distance between spots is 100μm. Each spot includes multiple capture probes that can bind to mRNA, and each probe carries a unique barcode (spatial barcodes) to mark the spatial position of the captured mRNA. Through on-machine sequencing, the sequence of each mRNA transcript can be mapped back to the original position in the tissue section, thereby providing data support for downstream tasks.

[0098] It should be noted that, in the present application embodiment, the noise data in the transcript data obtained based on the ST technology refers to invalid genes. Invalid genes refer to genes with large diffusion, i.e., the spatial aggregation of invalid genes is weak. Effective genes refer to genes with small diffusion, i.e., the spatial aggregation of effective genes is strong. The present application embodiment is by filtering out invalid genes and retaining effective genes, so that the transcript data can be denoised, thereby improving the accuracy when performing downstream tasks according to the transcript data. It is understandable that the genes with weak spatial aggregation in the transcript data may be caused by the occurrence of gene diffusion phenomenon in the ST process, or the gene itself is uniformly expressed in the tissue region. For genes that are uniformly expressed themselves, the spatial aggregation of this type of gene is weak, does not have spatial differences, and is unhelpful to downstream tasks, and may even affect the accuracy of downstream tasks, so it is also necessary to filter out the data corresponding to this type of gene.

[0099] In the related art, the following reasons may easily lead to gene diffusion of mRNA during ST treatment:

[0100] (1) When a frozen tissue section is attached to the spatial transcription chip, the tissue section is fixed, permeabilized, and other treatments are performed to lyse the cells and release the tissue's mRNA. Ideally, the released mRNA will be captured by the corresponding spot. However, in reality, when cell lysis is incomplete, the cell will only release a small amount of mRNA, resulting in insufficient utilization of the primers of the spot corresponding to the cell. At this time, the spot will capture the mRNA released by the cells in the surrounding tissue area. When the cell is overlyzed, the cell releases too much mRNA, resulting in the inability of the primers of the spot corresponding to the cell to capture all mRNA. At this time, the excess mRNA drifts to the surrounding area and is captured by other spots. It can be understood that since the cells are lysed in a liquid environment, the diffusion phenomenon of mRNA is a directionless random event.

[0101] (2) During the reverse transcription and amplification process, RNA may diffuse. In the reverse transcription reaction, RNA needs to bind to the reverse transcriptase to form a complex. The RNA in the complex may be destroyed or leaked out due to the structure of the enzyme or the reaction conditions. During the cDNA synthesis process, RNA needs to bind to the primer to form a complex. The primer may cause RNA diffusion due to incomplete binding or inappropriate reaction conditions.

[0102] (3) When processing transcript data generated by ST, using incorrect algorithms, parameters or quality control standards may also introduce noise, leading to an increase in the false positive rate. Noise refers to data that is incorrectly identified as having transcript expression at a certain spot position.

[0103] In addition, compared with the 55μm spot diameter on the 10X Vsim chip, the spot diameter on the Stereo-seq chip is 220nm. Therefore, when using the Stereo-seq chip for ST processing, multiple spots simultaneously capture the transcripts of a cell, and the diffusion of mRNA between spots is more difficult to control.

[0104] In the related art, in order to reduce the impact of the above-mentioned gene diffusion phenomenon, a statistical distribution model is set to simulate the mRNA diffusion law. The diffused mRNA is calculated and merged into the spot corresponding to the gene given by the model, and the number of genes in the corresponding spot is adjusted to form new denoised sequencing data. In other words, the method in the related art is to adjust the data so that the new sequencing data is close to the sequencing data in a rational state.

[0105] However, in actual applications, it is found that the diffusion of mRNA does not necessarily follow the statistical distribution model, that is, it is impossible to fit the diffusion through the statistical distribution model. Therefore, the method of directly adjusting the number of spots captured in the sequencing data through statistical laws in related technologies cannot reduce the impact of gene diffusion, but may increase error information.

[0106] Based on this, the embodiments of the present application provide a gene screening method and device, a gene clustering method and device, which can reduce the false positive rate by filtering out invalid genes while reducing the increase of error information. The gene screening method provided in the embodiments of the present application is described below.

[0107] Reference Figure 1 In some embodiments, the gene screening method provided in the embodiments of the present application includes but is not limited to steps S101 to S104.

[0108] Step S101, obtaining initial distribution data of multiple types of genes in the target slice from the spatial transcription data of the target slice;

[0109] Step S102, constructing corresponding target distribution data based on the initial distribution data of each type of gene, wherein the target distribution data indicates that the corresponding type of genes are evenly distributed in the two-dimensional space;

[0110] Step S103, calculating the diffusion degree of each type of gene according to the initial distribution data and the target distribution data;

[0111] Step S104 , screening the multiple types of genes based on the diffusion degree of each type of gene to obtain genes of the target category.

[0112] Steps S101 to S104 shown in the embodiment of the present application construct target distribution data representing uniform distribution of genes through the initial distribution data of genes, and determine the degree of diffusion of genes according to the target distribution data and the initial distribution data, and screen multiple types of genes according to the degree of diffusion to filter out genes with large diffusion degrees and obtain genes of target categories. It can be seen from this that the gene screening method provided in the embodiment of the present application directly removes invalid genes and retains valid genes with small diffusion degrees, which can realize denoising of transcription data, thereby reducing the situation where the transcription data is affected by the presence of noise on downstream tasks.

[0113] In step S101 of some embodiments, the target slice refers to a frozen embedded tissue slice to be subjected to ST treatment, and the target slice is a biological slice obtained in compliance with relevant legal provisions, and the biological slice includes plant slices and animal slices. The target slice is subjected to ST treatment to obtain spatial transcription data. Among them, the target slice includes multiple cells, each cell includes multiple categories of genes, and the gene categories included in each cell may be the same or different. The initial distribution data is used to describe the distribution of each type of gene in the target slice. For example, the target slice includes A cells and B cells, wherein A cells include P genes and D genes, and B cells include P genes and E genes. The initial distribution data of P genes, the initial distribution data of D genes, and the initial distribution data of E genes are obtained from the spatial transcription data.

[0114] Reference Figure 2 In some embodiments, step S101 includes but is not limited to steps S201 to S202.

[0115] Step S201, obtaining the number of capture points corresponding to each type of gene in the spatial transcription data of the target slice;

[0116] Step S202, deleting the data of genes whose corresponding number of capture points is less than a preset number threshold, to obtain denoised spatial transcription data;

[0117] Step S203, obtaining initial distribution data of multiple types of genes in the target slice from the denoised spatial transcription data.

[0118] In step S201 of some embodiments, the capture point refers to the spot on the spatial transcription chip. According to the spatial transcription data, it is determined how many spots each type of gene is captured by, and the number of capture points is obtained. For example, if the P gene is captured by 10 spots, the number of capture points corresponding to the P gene is 10. If the D gene is captured by 3 spots, the number of capture points corresponding to the D gene is 3. If the E gene is captured by 15 spots, the number of capture points corresponding to the E gene is 15. It is understandable that the spatial transcription data can be in the form of a TPM (Transcripts Per Million) matrix, or in the form of a gem (Graph-based Excision of Multiplicities) file, which is not specifically limited in the embodiments of the present application.

[0119] In step S202 of some embodiments, the number of capture points corresponding to each type of gene is compared with a preset number threshold. When the number of capture points corresponding to a certain type of gene is less than the preset number threshold, the data corresponding to the type of gene is deleted from the spatial transcription data to obtain the denoised spatial transcription data. It is understandable that the preset number threshold can be adaptively set according to actual conditions, and the embodiments of the present application are not specifically limited to this. For example, taking the preset number threshold as 4 as an example, in the example of step S201, the data corresponding to the D gene is deleted from the spatial transcription data, and the denoised spatial transcription data obtained includes the data corresponding to the P gene and the data corresponding to the E gene.

[0120] In step S203 of some embodiments, the initial distribution data corresponding to each type of remaining genes is obtained from the denoised spatial transcription data. For example, taking Arabidopsis seeds as an example. Figure 3A , is the distribution map of all cells in Arabidopsis seeds obtained using ST technology. Among them, Figure 3A The horizontal and vertical axes of the spatial transcription chip represent the number of the capture point on the spatial transcription chip. The number of the capture point can be determined according to the size of the spatial transcription chip. When the spatial transcription chip is a 10X Vsim chip, the units of the horizontal and vertical axes can be μm. When the spatial transcription chip is a Stereo-seq chip, the units of the horizontal and vertical axes can be nm. Figure 3B , is a schematic diagram of the distribution of the gene named AT4G00860 in Arabidopsis seeds, which is also the initial distribution data of the AT4G00860 gene. Figure 3B The horizontal and vertical axes represent the numbers of the capture points on the spatial transcription chip. Figure 3B The units of the horizontal and vertical axes are similar Figure 3A , the embodiments of this application will not be described in detail.

[0121] The advantage of deleting gene data by the number of capture points and the preset number threshold in steps S201 to S203 is that when the number of capture points is less than the preset number threshold, it indicates that the gene expression level of the corresponding category is low, and this type of gene may only exist in specific cells. In other words, this type of gene may interfere with the results of downstream task data analysis, so deleting this type of gene can reduce the impact on downstream tasks.

[0122] In step S102 of some embodiments, target distribution data is constructed for each type of gene based on the corresponding initial distribution data. The target distribution data refers to the uniform distribution of the corresponding gene in two-dimensional space. The advantage of setting the target distribution data to uniform distribution is that, since the initial distribution data may be the distribution data formed after the gene diffusion phenomenon, or the distribution data of the uniform expression of the gene itself, the spatial aggregation of the corresponding category of genes can be determined based on the initial distribution data and the target distribution data, that is, the diffusion degree of the corresponding category of genes can be determined.

[0123] Reference Figure 4 In some embodiments, step S102 includes but is not limited to steps S401 to S403.

[0124] Step S401, calculating the distribution area of ​​each type of gene according to the initial position data corresponding to each type of gene;

[0125] Step S402, calculating the target quantity corresponding to each target position in the target distribution of each type of gene based on the initial quantity corresponding to each type of gene at different initial positions;

[0126] Step S403, determining target distribution data of each type of gene according to the number of initial positions of each type of gene, the distribution area of ​​each type of gene and the target number.

[0127] It should be noted that the initial distribution data includes multiple initial position data and the initial number of genes of the corresponding category corresponding to each initial position data. The initial position data refers to the position data of the gene in the two-dimensional space corresponding to the target slice, that is, the position data of the spot that captures the gene. Therefore, a type of gene may include multiple position data (refer to Figure 3B The initial number refers to the number of genes of the corresponding category captured by the spot corresponding to the position data. Figure 5 The horizontal axis represents the number of the spot that can capture the AT4G00860 gene, and the vertical axis represents the number of captured AT4G00860 genes.

[0128] Correspondingly, the target distribution data also includes multiple target position data, and the target number of corresponding category genes corresponding to each target position data. It can be understood that the target position data refers to the position data corresponding to each spot in the uniform distribution. The target number refers to the number of genes of the same category obtained by each spot. It can be understood that since the target distribution data is uniformly distributed, the number of genes of the same category obtained by each spot should be the same, that is, the target number is the same.

[0129] In step S401 of some embodiments, the distribution area refers to the area enclosed by the distribution area of ​​the gene on the target slice. The distribution area can be determined according to the initial position data. The distribution area is determined according to the initial position data corresponding to each type of gene.

[0130] Reference Figure 6 In some embodiments, step S401 includes but is not limited to steps S601 to S602.

[0131] Step S601, connecting any two initial positions in the initial position data corresponding to each type of gene to obtain multiple connecting lines corresponding to each type of gene;

[0132] Step S602, respectively determine the area of ​​the minimum polygon containing multiple lines to obtain the distribution area of ​​each type of gene.

[0133] In steps S601 to S602 of some embodiments, each initial position data corresponds to an initial position, that is, corresponds to a spot. For each type of gene, the area enclosed by all the initial positions corresponding to this type of gene may be polygons of different shapes. Among them, the area corresponding to the polygon with the smallest area is the distribution area. In an embodiment of the present application, the distribution area can be calculated based on the convex hull algorithm. Specifically, for each type of gene, the multiple initial positions corresponding to this type of gene are arbitrarily connected in pairs to obtain multiple lines of this type of gene. Determine the area of ​​the minimum polygon including the multiple lines, and use the area as the distribution area. It can be understood that the distribution area can also be determined according to the Gaussian area formula and the triangulation method.

[0134] The advantage of using the area of ​​the minimum polygon as the distribution area in steps S601 to S602 is that multiple initial positions of the same type of gene are equivalent to a point set. The minimum polygon corresponding to a point set is unique, but the maximum polygon does not necessarily exist or is unique. Therefore, using the area of ​​the minimum polygon as the distribution area can obtain a uniquely determined distribution area. In addition, the area and / or perimeter of the minimum polygon are smaller than those of other polygons, so the point set is the most compact in the minimum polygon. In other words, the distribution area is the area when the corresponding category gene is most densely distributed.

[0135] In step S402 of some embodiments, for each type of gene, the sum of the initial quantities corresponding to the genes of the type at different initial positions should be equal to the sum of the target quantities corresponding to the genes at different target positions. Therefore, based on the characteristic that the target distribution data is uniformly distributed, the target quantity corresponding to each target position can be calculated based on the initial quantities corresponding to different initial positions.

[0136] Reference Figure 7In some embodiments, step S402 includes but is not limited to steps S701 to S702.

[0137] Step S701, calculating the total number of each type of gene based on the initial number of each type of gene corresponding to different initial positions;

[0138] Step S702, calculating the ratio between the sum of the number of genes of each category and the initial position number of genes of the corresponding category, and obtaining the target number corresponding to each category of genes.

[0139] In step S701 of some embodiments, for each type of gene, the initial numbers corresponding to the genes of this type at different initial positions are summed up to obtain the total number of genes of this type.

[0140] In step S702 of some embodiments, the initial position number is the sum of the number of all capture point spots of the corresponding category of genes. The sum of the number of genes is calculated by ratio with the initial position number to obtain the target number of genes of the corresponding category. For example, for the P gene, it is captured by 20 capture point spots, and the sum of the number of genes of this type captured by the 20 capture point spots is 100, then the target number of the P gene = 100 / 20 = 5, indicating that each target position spot should be allocated 5 units of mRNA to form uniformly distributed target distribution data.

[0141] In step S403 of some embodiments, the number of initial positions is the number of capture spots. The target position data of each gene is determined according to the number and distribution area of ​​the initial positions corresponding to each type of gene, thereby obtaining uniformly distributed target distribution data according to the target position data and the target number.

[0142] Reference Figure 8 In some embodiments, step S403 includes but is not limited to steps S801 to S802.

[0143] Step S801, constructing a regular graph based on the distribution area of ​​each type of gene, wherein a plurality of position points are evenly arranged in the regular graph, and the number of the plurality of position points is the same as the number of initial positions of the corresponding type of gene;

[0144] Step S802 , determining the position data of multiple position points corresponding to each type of gene as target position data of each type of gene, and setting the number of genes corresponding to each target position as the target number, to obtain target distribution data of each type of gene.

[0145] In step S801 of some embodiments, the regular pattern refers to a pattern with central symmetry, such as a square, a circle, a regular polygon, etc. For ease of explanation, in the following embodiments, the regular pattern is a square as an example. For each type of gene, the area of ​​the regular pattern corresponding to the gene can be equal to the distribution area, such as 100 cm 2 . Alternatively, the difference between the area of ​​the regular figure and the distribution area is within a preset area range, and the preset area range can be adaptively set according to actual needs. Multiple position points are evenly distributed in the regular figure, that is, multiple spots are evenly distributed. It can be understood that uniform distribution means that the spacing between adjacent position point spots is equal. The number of position point spots is equal to the number of initial positions (i.e., capture point spots), such as both are 20.

[0146] In step S802 of some embodiments, each position point spot is a target position, and the position data of the position point spot is the target position data. The target distribution data of each type of gene is constructed based on the target position data and the target number determined in step S402. For example, the target distribution data of the P gene is constructed to include 20 position point spots, and each position point spot can capture the uniform distribution of 5 units of mRNA.

[0147] The benefit of step S801 to step S802 is that, since the distribution area obtained according to step S401 is the area when the corresponding category genes are most densely distributed, the target distribution data constructed based on the distribution area is also the most densely evenly distributed. In the subsequent steps, when the diffusion degree of the corresponding category genes is determined based on the target distribution data and the initial distribution data, the accuracy of determining the diffusion degree of the corresponding category genes can be improved based on the densest characteristic of the target distribution data.

[0148] In step S103 of some embodiments, the transportation volume required for each type of gene to be transformed from the corresponding initial distribution data to the corresponding target distribution data is calculated, and the diffusion degree of the corresponding type of gene is determined according to the transportation volume. The transportation volume may be the transportation cost, which is not specifically limited in the embodiments of the present application.

[0149] Reference Fig. 9 In some embodiments, step S103 includes but is not limited to steps S901 to S904.

[0150] Step S901, determining first coordinate data of initial position data of each type of gene in a preset two-dimensional coordinate system, and determining second coordinate data of target position data of each type of gene in a preset two-dimensional coordinate system;

[0151] Step S902, constructing an original distribution of items using the first coordinate data and the corresponding initial quantity, and constructing a target distribution of items using the second coordinate data and the corresponding target quantity;

[0152] Step S903, determining a target transportation plan from the original distribution of items to the target distribution of items, and a minimum transportation cost corresponding to the target transportation plan;

[0153] Step S904, calculating the diffusion degree of each type of gene according to the target transportation plan corresponding to each type of gene.

[0154] In step S901 of some embodiments, the preset two-dimensional coordinate system refers to a two-dimensional coordinate system pre-constructed based on the initial position and the target position, the horizontal coordinate of the preset two-dimensional coordinate system is used to represent the coordinates or labels of the initial position and the target position in the horizontal direction, and the vertical coordinate of the preset two-dimensional coordinate system is used to represent the coordinates or labels of the initial position and the target position in the vertical direction. The initial position data of each initial position is mapped to the preset two-dimensional coordinate system to obtain the corresponding first coordinate data. For example, for the P gene, a first coordinate data in the preset two-dimensional coordinate system is (x0, y0). Similarly, the target position data of each target position is mapped to the preset two-dimensional coordinate system to obtain the corresponding second coordinate data. For example, for the P gene, a second coordinate data in the preset two-dimensional coordinate system is (x1, y1).

[0155] In step S902 of some embodiments, the initial quantity corresponding to the first coordinate data is obtained according to the initial position data corresponding to the first coordinate data, that is, the first coordinate data is mapped to the initial quantity through the initial position data to obtain a mapping relationship of (x0, y0, UMI0), where UMI0 represents the initial quantity. Similarly, the second coordinate data is mapped to the target quantity through the target position data to obtain a mapping relationship of (x1, y1, UMI1), where UMI1 represents the target quantity. Fig. 10A , is a schematic diagram of the original distribution of items. The original distribution of items refers to the distribution constructed based on the mapping relationship (x0, y0, UMI0). Fig. 10B , which is a schematic diagram of item target distribution. Item target distribution refers to the distribution constructed based on the mapping relationship (x1, y1, UMI1).

[0156] In step S903 of some embodiments, the transportation plan refers to a plan for transporting genes from the corresponding original distribution of items to the target distribution of items, and the target transportation plan refers to a transportation plan with the least total transportation cost. Among them, the total transportation cost is calculated based on the transportation distance and the transportation volume. The transportation distance refers to the distance between the first coordinate data and the second coordinate data, and the transportation volume refers to the number of units of mRNA transported from the first coordinate data to the second coordinate data. For example, including the first coordinate data (4, 2) and (2, 6), wherein the initial number corresponding to the first coordinate data (4, 2) is 6, and the initial number corresponding to the first coordinate data (2, 6) is 1. Assuming that the target number is 5 and the second coordinate data is (2, 2), the transportation plan includes the following two types: the first type, transporting 5 units of mRNA from the first coordinate data (4, 2) to the second coordinate data (2, 2), at this time The distance is the distance between the first coordinate data (4, 2) and the second coordinate data (2, 2), and the transportation volume is 5. The second type is to transport 1 unit of mRNA from the first coordinate data (2, 6) to the second coordinate data (2, 2), and to transport 4 units of mRNA from the first coordinate data (4, 2) to the second coordinate data (2, 2). In this case, the total transportation cost includes the cost of transporting 1 unit of mRNA from the first coordinate data (2, 6) to the second coordinate data (2, 2), and the cost of transporting 4 units of mRNA from the first coordinate data (4, 2) to the second coordinate data (2, 2). The target transportation plan is the transportation plan with the least total transportation cost among the above two transportation plans.

[0157] Reference Fig.11 In some embodiments, step S903 includes but is not limited to steps S1101 to S1104.

[0158] Step S1101, determining an item transportation plan for transporting items from any first coordinate data to any second coordinate data, and obtaining a transportation plan matrix, wherein the item transportation plan includes the quantity of items to be transported;

[0159] Step S1102, calculating the transportation cost of transporting a unit quantity of items from any first coordinate data to any second coordinate data, and obtaining a transportation cost matrix;

[0160] Step S1103, calculating a cost function of the total transportation cost based on the transportation plan matrix and the transportation cost matrix;

[0161] Step S1104, based on preset constraints, determine the transportation plan corresponding to the minimum value of the cost function to obtain a target transportation plan. The preset constraints include that the number of items transported from any first coordinate data to any second coordinate data is not less than 0, the number of remaining items corresponding to any first coordinate data after the transportation is completed is 0, and the number of items corresponding to any second coordinate data is the target number.

[0162] In step S1101 of some embodiments, for each type of gene, the type of gene may include multiple first coordinate data and multiple second coordinate data, and determine an item transportation plan for transporting items from any first coordinate data to any second coordinate data. The item transportation plan includes the number of transported items, that is, the transportation volume of transported mRNA. Specifically, the item transportation plan T is shown in the following formula (1). Formula (1) represents transporting w units of mRNA from the first coordinate data (x0, y0) to the second coordinate data (x1, y1).

[0163] T(x0,y0,x1,y1)=w......Formula (1)

[0164] Among them, formula (1) is the corresponding item transportation plan when the initial quantity is in a continuous state. However, in practical applications, the initial quantity is mostly in a discrete state. Therefore, the item transportation plan T shown in formula (1) needs to be transformed as follows.

[0165] Specifically, assuming that gene P is captured by n capture points, the discrete initial position of gene P can be expressed as The discrete target positions of gene P can be expressed as Correspondingly, the discrete representation of the original distribution of items is The discrete representation of the target distribution of items is Among them, δ x represents the Dirac function, δ x is the weight corresponding to each probe bin. A capture point spot includes multiple probe bins. The discretized item transportation plan, that is, the transportation plan matrix can be expressed as T∈R n×n .

[0166] In step S1102 of some embodiments, the transportation cost refers to the cost required to transport 1 unit of mRNA from the first coordinate data to the second coordinate data. In a continuous state, the transportation cost of transporting 1 unit of mRNA from the first coordinate data (x0, y0) to the second coordinate data (x1, y1) can be expressed as C(x0, y0, x1, y1). Specifically, in an embodiment of the present application, the transportation cost is constructed using the distance function between the first coordinate data (x0, y0) and the second coordinate data (x1, y1). Among them, the distance function can be any one of Euclidean distance, Manhattan distance, Jaccard distance, Minkowski distance, etc. The embodiment of the present application takes Euclidean distance as an example to construct the transportation cost shown in the following formula (2).

[0167] C(x0,y0,x1,y1)=(x0-x1) 2 +(y0-y1) 2 ......Formula (2)

[0168] In the discrete state, the transportation cost of transporting 1 unit of mRNA from the original distribution of items to the target distribution of items, that is, the transportation cost matrix is ​​expressed as C ij =||X i -X j ||.

[0169] In step S1103 of some embodiments, in a continuous state, a cost function of total transportation cost as shown in the following formula (3) is calculated based on the item transportation plan T and the transportation cost C(x0, y0, x1, y1).

[0170]

[0171] In the discrete state, the cost function of total transportation cost is expressed as shown in the following formula (4).

[0172]

[0173] In step S1104 of some embodiments, for the continuous state, preset constraints as shown in the following equations (5) to (7) are set.

[0174] T(x0,y0,x1,y1)≥0......Formula (5)

[0175] ∫∫(x0,y0,x,y)=p(x0,y0)for all start locations(x0,y0)...Equation (6)

[0176] ∫∫(x1,y1,x,y)=p(x1,y1)for all start locations(x1,y1)...Equation (7)

[0177] When the position corresponding to the first coordinate data is taken as the starting position and the position corresponding to the second coordinate data is taken as the end position, formula (5) indicates that the number of mRNA transported from each possible starting position to each possible end position is not less than 0 units. In formula (6), p(x0, y0) represents any first coordinate data in the original distribution of the item P(x, y). The constraint condition of formula (6) indicates that the number of mRNA corresponding to the first coordinate data should be fully transported, that is, the number of mRNA corresponding to the first coordinate data should be 0 after the transport is completed. In formula (7), p(x1, y1) represents any second coordinate data in the target distribution of the item. The constraint condition of formula (7) indicates that the number of mRNA corresponding to the second coordinate data should be equal to the target number.

[0178] In the discrete state, the preset constraints are expressed as shown in the following equations (8) to (10).

[0179]

[0180]

[0181]

[0182] Among them, a i represents the original distribution of items, b j Represents the target distribution of items. The meaning of the preset constraint condition corresponding to formula (8) refers to the description of formula (5), the meaning of the preset constraint condition corresponding to formula (9) refers to the description of formula (6), and the meaning of the preset constraint condition corresponding to formula (10) refers to the description of formula (7), which will not be repeated in this embodiment of the application.

[0183] Taking the discrete state as an example, the cost function total cost shown in equation (4) is minimized based on the preset constraints shown in equations (8) to (10), that is, the following equation (11) is calculated. The target transportation plan is obtained according to the solution of equation (11).

[0184]

[0185] In step S904 of some embodiments, the target transportation plan is the transportation plan with the lowest transportation cost. The transportation cost is related to the transportation distance and the transportation volume. The longer the transportation distance and / or the larger the transportation volume, the greater the cost of transforming from the original distribution of items to the target distribution of items, that is, the more concentrated the multiple first coordinate data in the original distribution of items are. Therefore, the diffusion degree corresponding to each type of gene can be determined according to the target transportation plan.

[0186] Reference Fig.12 In some embodiments, step S904 includes but is not limited to steps S1201 to S1202.

[0187] Step S1201, calculating the target transportation cost of each type of gene according to the target transportation plan matrix and the transportation cost matrix corresponding to the target transportation plan of each type of gene;

[0188] Step S1202, calculating the diffusion degree of each type of gene based on the target transportation cost of each type of gene.

[0189] In step S1201 of some embodiments, the target transportation plan matrix T can be obtained according to the solution result of formula (11): * As shown in the following formula (12), according to the target transportation plan matrix T * The target transportation cost W(P,Q) of the corresponding category gene is calculated by the corresponding transportation cost matrix.

[0190] W(P,Q)=( <T * ,C>) 1 / 2 ......Formula (12)

[0191] In step S1202 of some embodiments, the larger the value corresponding to the target transportation cost W(P,Q), the greater the cost required to transform the genes of the corresponding category from the original distribution of the items to the target distribution of the items, and the cost includes the transportation distance and the transportation volume. It can be seen that the target transportation cost W(P,Q) can also reflect the degree of diffusion of the original distribution of the genes of the corresponding category. Specifically, the larger the value corresponding to the target transportation cost W(P,Q), the more concentrated the distribution of the genes of the corresponding category. Conversely, it indicates that the distribution of the genes of the corresponding category is more dispersed.

[0192] The benefit of steps S901 to S904 is that, since the target transportation plan is the transportation plan with the lowest transportation cost, determining the diffusion degree according to the target transportation plan can maximize the diffusion degree, so that different diffusion degrees can be clearly distinguished.

[0193] In step S104 of some embodiments, the greater the diffusion degree, the more dispersed the corresponding gene is distributed in the target slice, that is, the worse the spatial aggregation of this type of gene is. The smaller the diffusion degree, the more concentrated the corresponding gene is distributed in the target slice, that is, the better the spatial aggregation of this type of gene is. Among them, the situation that the gene is dispersed in the target slice may be caused by the gene diffusion phenomenon, or the gene itself is evenly distributed. Genes with a large diffusion degree are called invalid genes, and those with a large diffusion degree are called valid genes. Multiple types of genes are screened according to the diffusion degree to filter out invalid genes in multiple types of genes and retain valid genes in multiple types of genes. Among them, valid genes are genes of the target category.

[0194] Reference Fig.13 In some embodiments, step S104 includes but is not limited to steps S1301 to S1304.

[0195] Step S1301, sorting genes of multiple categories in order from low to high based on diffusion degree to obtain a sorting sequence;

[0196] Step S1302, constructing a coordinate scatter plot with the numerical value corresponding to the diffusion degree as the ordinate and the sorting number value of each category as the abscissa;

[0197] Step S1303, performing curve fitting on the coordinate scatter plot to obtain a fitting curve;

[0198] Step S1304 , screening multiple types of genes based on the degree of change in the slope of the fitting curve to obtain genes of the target category.

[0199] In step S1301 of some embodiments, each category of genes corresponds to a diffusion degree, and the diffusion degrees are sorted in ascending order to obtain a sorted sequence.

[0200] In step S1302 of some embodiments, a vertical axis is constructed based on the numerical range of the sorting sequence, and a horizontal axis is constructed based on the sorting number corresponding to each type of gene in the sorting sequence, so that a coordinate scatter plot of all categories of genes in the target slice is obtained according to the horizontal axis, the vertical axis, the diffusion degree, and the sorting number.

[0201] In step S1303 of some embodiments, a curve fitting process is performed on multiple points in the coordinate scatter plot to obtain a fitting curve. Fig.14 As shown, it is a schematic diagram of the fitting curve of all categories of genes corresponding to all cells on the target slice corresponding to Arabidopsis seeds. It can be understood that the curve fitting method includes spline interpolation, a fitting method based on a neural network, a fitting method based on a genetic algorithm, etc., which is not specifically limited in the embodiments of the present application.

[0202] In step S1304 of some embodiments, the slope is calculated according to the fitting curve to determine the inflection point of the fitting curve. It is understandable that the diffusion degree of the corresponding category gene after the inflection point is much greater than the diffusion degree of the corresponding category gene before the inflection point. Therefore, multiple types of genes can be distinguished according to the inflection point, and the genes after the inflection point are defined as invalid genes and filtered out. The genes before the inflection point are defined as valid genes and retained, and the retained genes are the genes of the target category. It is understandable that the method for determining the inflection point includes calculating the tangent slope method, the second-order derivative method, etc., which is not specifically limited in the embodiments of the present application.

[0203] Reference Fig.15 In some embodiments, step S1304 includes but is not limited to steps S1501 to S1504.

[0204] Step S1501, obtaining a fitting function corresponding to the fitting curve;

[0205] Step S1502, calculating the second-order derivative of the fitting function;

[0206] Step S1503, determining the target diffusion degree value corresponding to the maximum value of the second-order derivative;

[0207] Step S1504, screening multiple types of genes based on the target diffusion degree value to obtain genes of the target category.

[0208] In the embodiment of the present application, the method of determining the inflection point of the fitting curve is explained by taking the second-order derivative method as an example.

[0209] In steps S1501 to S1504 of some embodiments, while curve fitting is performed on the coordinate scatter plot, a corresponding fitting function is obtained. The fitting function is second-order differentiated to determine the rate of change of the tangent slope of each point on the fitting curve, i.e., the second-order derivative. When the second-order derivative value of a certain point is the largest, it indicates that the curvature of the point reaches the maximum value, i.e., the fitting curve exhibits the greatest degree of curvature at this point, so the point is an inflection point. The diffusion degree corresponding to the point is used as the target diffusion degree value. Genes with a value greater than the target diffusion degree are filtered out, and the remaining genes are used as genes of the target category.

[0210] The advantage of constructing a coordinate scatter plot from step S1301 to step S1304 and determining the target category gene according to the fitting curve corresponding to the coordinate scatter plot is that the change in the diffusion degree of all categories of genes in the target slice can be intuitively understood, and the relationship between the diffusion degree and different categories of genes can be determined. In addition, it is possible to determine whether there are outliers from the fitting curve, thereby reducing gene screening errors.

[0211] Reference Fig.16 In some other embodiments, step S104 includes but is not limited to steps S1601 to S1602.

[0212] Step S1601, obtaining a preset diffusion degree threshold;

[0213] Step S1602 , screening multiple types of genes based on the diffusion degree threshold to obtain genes of the target category.

[0214] In step S1601 of some embodiments, the diffusion threshold is a pre-set threshold for gene category screening. The diffusion threshold can be determined according to screening requirements, screening experience, etc., and this embodiment of the application does not specifically limit this.

[0215] In step S1602 of some embodiments, gene screening is performed according to the diffusion degree threshold and the diffusion degree corresponding to each type of gene. Specifically, genes with a diffusion degree greater than the diffusion degree threshold are invalid genes and are filtered out. Genes with a diffusion degree less than or equal to the diffusion degree threshold are valid genes and are retained. The retained genes are genes of the target category.

[0216] It is understandable that the target category genes can be used for downstream bioinformatics analysis, including cluster analysis, finding highly variable genes, differentially expressed gene analysis, marker gene identification, cell category identification, cell annotation and other tasks, which are not specifically limited in the present embodiment. However, in order to illustrate that the gene screening method provided in the embodiment of the present application can improve the accuracy of downstream tasks, cluster analysis is used as an example for explanation.

[0217] The gene clustering method provided in the examples of the present application is described below.

[0218] Reference Fig.17 In some embodiments, the gene clustering method includes but is not limited to steps S1701 to S1703.

[0219] Step S1701, obtaining spatial transcription data of a target slice;

[0220] Step S1702, performing gene screening on the spatial transcription data to obtain genes of the target category;

[0221] Step S1703, clustering the genes of the target category to obtain gene clustering results.

[0222] In some embodiments, step S1701 to step S1702, the spatial transcription data of the target slice is obtained, and the method for obtaining the gene of the target category by gene screening of the spatial transcription data is the same as the description of any of the above-mentioned embodiments, and the embodiments of the present application will not be repeated here. In step S1703, the gene of the target category is clustered to determine the similarity and difference between the genes of the target category, and obtain the corresponding clustering result. Wherein, the clustering method includes hierarchical clustering method, K-means clustering method, etc. Based on the clustering result, cells can be divided into different groups, and the cell colony can be used to determine cell category, differentiation state, function and biological process, etc.

[0223] Reference Fig.18A , is a schematic diagram of the adjusted Rand Index (ARI) obtained by clustering different data. Raw means clustering using unscreened genes, and GF means clustering using target category genes.

[0224] Reference Fig.18B , is a schematic diagram of the accuracy obtained by clustering different data. Raw means clustering is performed using genes that have not been screened, and GF means clustering is performed using genes of the target category.

[0225] Depend on Fig.18A and Fig.18B It can be seen that, compared with data without gene screening, clustering according to the data corresponding to the target category gene can improve the accuracy of the clustering results. The gene screening method provided in the embodiment of the present application can filter out invalid genes, so that valid genes with spatial aggregation can be highlighted, thereby improving the accuracy of clustering when clustering according to the target category gene is performed.

[0226] The gene screening device provided in the embodiments of the present application is described below.

[0227] Reference Fig.19 In some embodiments, the present application also provides a gene screening device, which includes:

[0228] A first acquisition unit 1901 is used to acquire initial distribution data of multiple types of genes in the target slice from the spatial transcription data of the target slice;

[0229] A construction unit 1902 is used to construct target distribution data of each type of gene based on the initial distribution data of each type of gene, wherein the target distribution data indicates that the corresponding type of gene is evenly distributed in the two-dimensional space;

[0230] A calculation unit 1903 is used to calculate the diffusion degree of each type of gene according to the initial distribution data and the target distribution data;

[0231] The first screening unit 1904 is used to screen multiple types of genes based on the diffusion degree of each type of gene to obtain genes of the target category.

[0232] It can be seen that the contents of the above-mentioned gene screening method embodiment are all applicable to the embodiment of the present gene screening device. The functions specifically implemented by the present gene screening device embodiment are the same as those in the above-mentioned gene screening method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned gene screening method embodiment.

[0233] The gene clustering device provided in the embodiments of the present application is described below.

[0234] Reference Fig. 20 In some embodiments, the present application also provides a gene clustering device, which includes:

[0235] The second acquisition unit 2001 is used to acquire the spatial transcription data of the target slice;

[0236] The second screening unit 2002 is used to perform gene screening on the spatial transcription data to obtain genes of a target category, where the genes of the target category are genes of the target category obtained by screening using the gene screening method described in any of the above embodiments;

[0237] The clustering unit 2003 is used to cluster the genes of the target category to obtain gene clustering results.

[0238] It can be seen that the contents of the above-mentioned gene clustering method embodiment are all applicable to the embodiment of the present gene clustering device. The functions specifically implemented by the present gene clustering device embodiment are the same as those of the above-mentioned gene clustering method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned gene clustering method embodiment.

[0239] Reference Fig.21 , Fig.21 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0240] The processor 2101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0241] The memory 2102 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 2102 can store an operating system and other application programs. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 2102, and the processor 2101 is used to call and execute the gene screening method or gene clustering method of the embodiments of this application;

[0242] Input / output interface 2103, used to implement information input and output;

[0243] Communication interface 2104, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0244] A bus 2105 that transmits information between the various components of the device (e.g., the processor 2101, the memory 2102, the input / output interface 2103, and the communication interface 2104);

[0245] The processor 2101 , the memory 2102 , the input / output interface 2103 and the communication interface 2104 are connected to each other in communication within the device via the bus 2105 .

[0246] The embodiment of the present application further provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes and implements the above-mentioned gene screening method or gene clustering method.

[0247] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0248] It should be understood that in the present disclosure, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0249] It should be understood that in the description of the embodiments of the present application, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to not include the number, and above, below, within, etc. are understood to include the number.

[0250] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0251] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0252] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0253] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0254] It should also be understood that the various implementation methods provided in the embodiments of the present application can be combined arbitrarily to achieve different technical effects.

[0255] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Technical personnel familiar with the art can also make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.

Claims

1. A gene screening method, characterized in that: The method comprises: Acquire initial distribution data of multiple types of genes in the target slice from the spatial transcription data of the target slice; Constructing corresponding target distribution data based on the initial distribution data of each type of gene, wherein the target distribution data indicates that the corresponding type of genes are evenly distributed in the two-dimensional space; Calculating the diffusion degree of each type of gene according to the initial distribution data and the target distribution data; The multiple types of genes are screened based on the diffusion degree of each type of genes to obtain genes of the target category.

2. The method according to claim 1, characterized in that The initial distribution data includes a plurality of initial position data and an initial number of genes of a corresponding category corresponding to each initial position, the target distribution data includes a plurality of target position data and a target number of genes of a corresponding category corresponding to each target position, and the calculation of the diffusion degree of each type of gene according to the initial distribution data and the target distribution data includes: Determine first coordinate data of the initial position data of each type of gene in a preset two-dimensional coordinate system, and determine second coordinate data of the target position data of each type of gene in the preset two-dimensional coordinate system; Constructing an original distribution of items using the first coordinate data and the corresponding initial quantity, and constructing a target distribution of items using the second coordinate data and the corresponding target quantity; Determine a target transportation plan from the original distribution of the items to the target distribution of the items, the target transportation plan corresponding to the minimum transportation cost; The diffusion degree of each type of gene is calculated according to the target transport plan corresponding to each type of gene.

3. The method according to claim 2, characterized in that The determining of a target transportation plan from the original distribution of the items to the target distribution of the items includes: Determine an item transportation plan for transporting items from any first coordinate data to any second coordinate data, and obtain a transportation plan matrix, wherein the item transportation plan includes the quantity of items to be transported; Calculate the transportation cost of transporting a unit quantity of goods from any first coordinate data to any second coordinate data to obtain a transportation cost matrix; A cost function for calculating total transportation cost based on the transportation plan matrix and the transportation cost matrix; Based on the preset constraints, the transportation plan corresponding to the minimum value of the cost function is determined to obtain the target transportation plan, wherein the preset constraints include that the number of items transported from any first coordinate data to any second coordinate data is not less than 0, the number of remaining items corresponding to any first coordinate data after the transportation is completed is 0, and the number of items corresponding to any second coordinate data is the target number.

4. The method according to claim 2, characterized in that: Calculating the diffusion degree of each type of gene according to the target transport plan corresponding to each type of gene includes: Calculate the target transportation cost of each type of gene according to the target transportation plan matrix corresponding to the target transportation plan of each type of gene and the transportation cost matrix; The degree of spread of each type of gene is calculated based on the target transport cost of each type of gene.

5. The method according to claim 2, characterized in that: The method of constructing corresponding target distribution data based on the initial distribution data of each type of gene includes: Calculating the distribution area of ​​each type of gene according to the initial position data corresponding to each type of gene; Calculate the number of targets corresponding to each target position in the target distribution of each type of gene based on the initial number of each type of gene corresponding to different initial positions; The target distribution data of each type of gene is determined according to the number of initial positions of each type of gene, the distribution area of ​​each type of gene and the target number.

6. The method according to claim 5, characterized in that The calculating the distribution area of ​​each type of gene according to the initial position data corresponding to each type of gene comprises: Connecting any two initial positions in the initial position data corresponding to each type of gene to obtain multiple connecting lines corresponding to each type of gene; The areas of the smallest polygons containing the multiple lines are determined respectively to obtain the distribution area of ​​each type of gene.

7. The method according to claim 5, characterized in that The calculating the target quantity corresponding to each target position in the target distribution of each type of gene based on the initial quantity corresponding to each type of gene at different initial positions includes: The sum of the number of genes of each type is calculated based on the initial number of genes of each type corresponding to different initial positions; The ratio between the sum of the number of genes in each category and the initial position number of genes in the corresponding category was calculated to obtain the target number corresponding to each category of genes.

8. The method according to claim 5, characterized in that Determining target distribution data of each type of gene according to the number of initial positions of each type of gene, the distribution area of ​​each type of gene and the target number includes: Constructing a regular graph based on the distribution area of ​​each type of gene, wherein a plurality of position points are evenly arranged in the regular graph, and the number of the plurality of position points is the same as the number of initial positions of the corresponding type of gene; The position data of multiple position points corresponding to each type of gene are determined as the target position data of each type of gene, and the number of genes corresponding to each target position is set as the target number to obtain the target distribution data of each type of gene.

9. The method according to claim 1, characterized in that: The method of screening the multiple types of genes based on the diffusion degree of each type of genes to obtain genes of the target category includes: Genes of multiple categories are ranked in order from low to high based on the degree of diffusion to obtain a ranking sequence; A coordinate scatter plot is constructed with the value corresponding to the diffusion degree as the vertical axis and the sorting number value of each category as the horizontal axis; Performing curve fitting on the coordinate scatter plot to obtain a fitting curve; The multiple types of genes are screened based on the degree of change in the slope of the fitting curve to obtain genes of the target category.

10. The method according to claim 9, characterized in that The method of screening the multiple types of genes based on the degree of change of the slope of the fitting curve to obtain genes of the target category includes: Obtaining a fitting function corresponding to the fitting curve; Calculating the second-order derivative of the fitting function; Determine the target diffusion degree value corresponding to the maximum value of the second-order derivative; The multiple types of genes are screened based on the target diffusion degree value to obtain genes of the target category.

11. The method according to claim 1, characterized in that: The method of screening the multiple types of genes based on the diffusion degree of each type of genes to obtain genes of the target category includes: Obtaining a preset diffusion degree threshold; The multiple types of genes are screened based on the diffusion degree threshold to obtain genes of the target category.

12. The method according to claim 1, characterized in that The initial distribution data of multiple types of genes in the target slice are obtained from the spatial transcription data of the target slice: Obtain the number of capture points corresponding to each type of gene in the spatial transcription data of the target slice; The data of genes whose corresponding number of capture points is less than a preset number threshold are deleted to obtain denoised spatial transcription data; Initial distribution data of multiple types of genes in the target slice are obtained from the denoised spatial transcription data.

13. A gene clustering method, characterized in that: The method comprises: Acquire spatial transcription data of target slices; Performing gene screening on the spatial transcription data to obtain genes of a target category, wherein the genes of the target category are genes of the target category obtained by screening using the gene screening method according to any one of claims 1 to 12; The genes of the target category are clustered to obtain a gene clustering result.

14. A gene screening device, characterized in that: The gene screening device comprises: A first acquisition unit is used to acquire initial distribution data of multiple types of genes in the target slice from the spatial transcription data of the target slice; A construction unit, used to construct target distribution data of each type of genes based on the initial distribution data of each type of genes, wherein the target distribution data indicates that the corresponding type of genes are evenly distributed in the two-dimensional space; A calculation unit, used for calculating the diffusion degree of each type of gene according to the initial distribution data and the target distribution data; The first screening unit is used to screen the multiple types of genes based on the diffusion degree of each type of genes to obtain genes of the target category.

15. A gene clustering device, characterized in that: The device comprises: A second acquisition unit is used to acquire spatial transcription data of the target slice; A second screening unit is used to perform gene screening on the spatial transcription data to obtain genes of a target category, wherein the genes of the target category are genes of the target category obtained by screening using the gene screening method according to any one of claims 1 to 12; The clustering unit is used to cluster the genes of the target category to obtain gene clustering results.

16. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the gene screening method according to any one of claims 1 to 12 or the gene clustering method according to claim 13 is implemented.

17. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the gene screening method according to any one of claims 1 to 12 or the gene clustering method according to claim 13 is implemented.

18. A computer program product, comprising a computer program, wherein the computer program is read and executed by a processor of a computer device, so that the computer device executes the gene screening method described in any one of claims 1 to 12 or the gene clustering method in claim 13.

Citation Information

Cited By

  • Multi-slice registration method and device, electronic equipment and storage medium

    CN119446255A