Method and device for extracting object contour, electronic equipment and medium
Patent Information
- Application Number
- CN202280102024.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2025-07-04
AI Technical Summary
At subcellular-level high resolution, it is difficult to accurately extract object contours from sequenced expression maps of plant tissues due to edge diffusion problems, which in turn affects the registration of expression maps and tissue images.
By dividing the object into subgraphs, calculating the distance between any two coordinate points in the expression map to derive the divergence value, generating mutation points and fitting distributions, forming a candidate set to extract the object contour, solving the contour caused by edge diffusion Difficulty in extraction.
It achieves clear extraction of object contours at sub-cell level resolution and improves the registration accuracy of expression maps and tissue images.
Smart Images

Figure CN120266484A_ABST
Abstract
Description
Method, device, electronic device and medium for extracting object contour Technical Field
[0001] The present disclosure relates to the field of bioinformatics, and in particular to a method, device, electronic device, and medium for extracting object contours. Background Art
[0002] Compared to traditional spatial omics techniques, spatiotemporal omics (stereo-seq) sequencing can achieve subcellular resolution. With this increased resolution, image registration is required for spatiotemporal expression analysis at subcellular resolution. Specifically, image registration is performed by comparing gene expression maps with their actual spatial locations in tissue images to determine the expression level for each cell.
[0003] Summary of the Invention
[0004] The present disclosure aims to provide a method, device, electronic device and medium for extracting the contour of an object, so as to solve the edge diffusion problem of a tissue object.
[0005] Based on the above-mentioned purpose, the present disclosure provides a method for extracting the contour of an object, comprising: dividing the object into at least one subgraph, and for each subgraph, obtaining an expression atlas of the subgraph; for each expression graph in the expression atlas, calculating the distance between any two coordinate points in the expression graph, so as to derive the divergence value of the gene associated with the expression graph based on the distance; obtaining a mutation point according to the derived divergence value, and generating a first subset based on the mutation point; fitting the distribution of the divergence values of the genes on the subgraph, and taking the genes within a predetermined interval in the fitted distribution as a second subset; generating a candidate set based on the first subset and the second subset; and extracting the contour of the object according to the candidate set.
[0006] The present disclosure also provides a method for extracting the outline of an object, comprising: for each subgraph, obtaining an expression atlas of the subgraph; for each expression graph in the expression atlas, calculating the distance between any two coordinate points in the expression graph, so as to derive a divergence value of a gene associated with the expression graph based on the distance; obtaining a mutation point according to the derived divergence value, and generating a first subset based on the mutation point; fitting the distribution of the divergence values of the genes on the subgraph, and taking the genes within a predetermined interval in the fitted distribution as a second subset; generating a candidate set based on the first subset and the second subset; and extracting the outline of the object according to the candidate set.
[0007] The present disclosure also provides a device for extracting the contour of an object, including: an acquisition module, which divides the object into at least one subgraph, and for each subgraph, obtains an expression atlas of the subgraph; an export module, which calculates the distance between any two coordinate points in each expression graph in the expression atlas, so as to export the divergence value of the gene associated with the expression graph based on the distance; a first generation module, which obtains a mutation point according to the exported divergence value, and generates a first subset based on the mutation point; a second generation module, which fits the distribution of the divergence values of the genes on the subgraph, and takes the genes within a predetermined interval in the fitted distribution as a second subset; a fourth generation module, which generates a candidate set based on the first subset and the second subset; and an extraction module, which extracts the contour of the object according to the candidate set.
[0008] In addition, the present disclosure also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the above-mentioned method for extracting object contours.
[0009] Furthermore, the present disclosure also provides a non-transitory computer-readable storage medium having computer instructions stored thereon, which implement the above-mentioned method for extracting object contours when executed by a processor.
[0010] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Some exemplary embodiments of the present inventive concept may be more clearly understood from the following detailed description taken in conjunction with the accompanying drawings, in which:
[0012] Figures 1A and 1B are schematic diagrams showing the original expression level graph and staining graph of genes;
[0013] FIG2 is a flowchart of a method for extracting a contour of an object according to an embodiment of the present disclosure;
[0014] FIG3 is a schematic diagram showing a trend diagram of a divergence value according to an embodiment of the present disclosure;
[0015] FIG4 is a flowchart of a method for extracting a contour of an object according to another embodiment of the present disclosure;
[0016] 5A to 5C are schematic diagrams showing the registration of expression maps and de-diffused expression maps with original staining maps;
[0017] FIG6 is a schematic diagram of an apparatus for extracting a contour of an object according to an embodiment of the present disclosure; and
[0018] FIG7 shows a schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0020] In practice, it is found that the registration operation of animal tissues can achieve good results through trajectory lines. However, in plant tissues (such as seeds, roots, stems, leaves, flowers, etc.), it is difficult to observe clear trajectory lines due to the combination characteristics of staining and chips. In addition, due to the unique biological characteristics of plant cells, the sequencing expression map of plant tissues has a serious diffusion problem. In the area of several to dozens of blocks (bins) at the edge of the plant tissue, the expression intensity may be higher than the expression intensity within the tissue, that is, diffusion occurs around the edge of the tissue object. This makes it difficult to extract the outline of the tissue object, and then it is difficult to align the expression map and tissue image at the block level.
[0021] Figures 1A and 1B are schematic diagrams showing raw gene expression profiles and staining patterns. Specifically, Figure 1A shows an expression profile for a subgraph of Arabidopsis seeds on the left, and the corresponding staining pattern on the right; Figure 1B shows an expression profile on a chip of Arabidopsis seeds on the left, and the corresponding staining pattern on the right.
[0022] Referring to the stained images in Figures 1A and 1B, we can see that the edges of the original expression maps diffuse irregularly and to varying degrees, making it difficult to accurately extract the tissue contour. Consequently, in the subsequent registration with the tissue image, the precise locations of the characteristic points of the tissue contour cannot be determined, resulting in low registration accuracy.
[0023] FIG2 is a flowchart of a method 200 for extracting a contour of an object according to an embodiment of the present disclosure.
[0024] In step S210 , the object is divided into at least one subgraph, and for each subgraph, an expression quantity atlas of the subgraph is obtained.
[0025] For example, the object may be plant tissue. When dividing it into sub-images, the tissue in a complete chip can be cropped into multiple sub-images, the tissue border of each sub-image can be identified, and the areas that are not valid tissues in the cropped sub-images can be removed to obtain sub-images of valid tissues in the chip.
[0026] After dividing the object into at least one subgraph, a gene expression file and corresponding tissue region are generated for each gene in each subgraph. Furthermore, an expression map is obtained for each gene expression file, and the obtained expression maps constitute an expression atlas for that subgraph.
[0027] It should be understood that a gene expression file and corresponding tissue region can be generated for each of the multiple genes in each subgraph to obtain its expression map. The expression levels in the expression map of each gene may be clustered or sparse. Clustered expression levels have a low degree of dispersion and can represent the outline of the object, while sparse expression levels have a high degree of dispersion and cannot depict the outline of the object.
[0028] Therefore, when constructing an expression atlas, an expression map of each gene on a subgraph can be generated to obtain an initial expression atlas. Subsequently, expression maps with coordinate points below a predetermined threshold are removed from the initial expression atlas to obtain an expression atlas.
[0029] In some embodiments, the predetermined threshold may be 30. That is, if the number of coordinate points in an expression map is less than 30, the gene associated with the expression map is considered unable to accurately depict the contour of the object. It should be understood that the predetermined threshold may be set to other values, such as 20, 40, etc., depending on the computational complexity and the accuracy requirements of contour extraction.
[0030] In addition, it should be understood that when obtaining the expression quantity atlas of the subgraphs, multiple subgraphs can be processed in parallel to further improve the processing speed.
[0031] In step S220 , for each expression graph in the expression graph set, the distance between any two coordinate points in the expression graph is calculated to derive a divergence value of a gene associated with the expression graph based on the distance.
[0032] In some embodiments, in order to obtain the distance between each coordinate point in the expression level map, first obtain the three-dimensional representation (x, y, umi) of each coordinate point in the expression level map, where umi (unique molecular identifier) is a unique molecular identifier. Then, for any two points in the expression level map, m and point n , calculate the distance between edge(pointm ,point n ). The distance can be any of the following: Euclidean distance, Jaccard distance, Minkowski distance, Manhattan distance, etc. Taking Euclidean distance as an example, the L2 norm can be used to calculate the distance edge(point m ,point n ).
[0033] Furthermore, for the multiple distances calculated, the standard deviation std(edge(point m ,point n )) and mean mean(edge(point m ,point n )), and the coefficient of variation is obtained by dividing the two, which is used as the divergence value of the gene associated with the expression level map. Specifically, the divergence value of the gene can be derived by the following equation (1):
[0034]
[0035] It should be understood that, as previously mentioned, an expression atlas consists of expression maps whose coordinate points exceed a predetermined threshold. This means that the coordinate points are clustered together, so there may be overlap between any two points. When calculating distance, it is necessary to remove overlapped edges to avoid affecting the accuracy of the divergence value.
[0036] In step S230 , a trend graph of the divergence values of the genes on the subgraph is generated according to the derived divergence values to obtain mutation points in the trend graph, and a first subset sset 1 is generated based on the mutation points.
[0037] As mentioned above, the expression atlas is composed of expression graphs in which the number of coordinate points in the acquired expression graphs is above a predetermined threshold. Therefore, divergence values are derived for multiple genes on the subgraph, and these divergence values are sorted in a predetermined order, such as ascending or descending, to generate a trend graph of the divergence values, which can be a line graph. This can be used to know the flat area where most of the divergence values are located and the sudden change area where the divergence values suddenly change. As an example, the first point in the trend graph that changes from a flat area to a sudden change area is taken as the mutation point (i.e., the inflection point of the trend graph).
[0038] In some embodiments, a mutation point is obtained based on a gradient change. For example, for each gene in the sudden change region of the trend graph, the gradient between the gene and the two adjacent genes is calculated, and the gradient can be the difference in the y-axis direction divided by the difference in the x-axis direction. Subsequently, for each gene in the sudden change region of the trend graph, the difference between the two calculated gradients is obtained, and the gene with the largest gradient difference is identified as the mutation point in the trend graph. It should be understood that the two adjacent genes can be two genes that are immediately adjacent, i.e., the two genes on the left and right of the current gene.
[0039] See Figure 3, which shows a schematic diagram of a trend graph of divergence values according to an embodiment of the present disclosure. In Figure 3, the horizontal axis represents the number of genes, and the vertical axis represents the divergence value. As can be seen from Figure 3, most divergence values are distributed between 0.45 and 0.60, and 0.45-0.60 is the flat area of the trend graph. The divergence value suddenly rises at 0.60, so 0.60 is used as the mutation point of the trend graph.
[0040] It should be understood that, although a sudden rise point is used as an example of a mutation point in FIG3 , a point where a sudden drop occurs in the trend graph may also be used as a mutation point.
[0041] Furthermore, after obtaining the mutation point, a first subset sset 1 is generated based on the mutation point. It can be understood that the mutation point reflects the critical situation of the divergence value of the gene, so a first predetermined number of points around the mutation point can be extracted, and the genes corresponding to the extracted points are used as the first subset sset 1.
[0042] In some embodiments, the first predetermined number may be set to 10, or may be set to other values such as 8, 15, 20, etc. according to computational complexity and accuracy of contour extraction.
[0043] It should be understood that the first predetermined number of points around the mutation point can be points symmetrically distributed around the mutation point, or can be points before the mutation point, that is, points located in the flat region of the divergence value. Alternatively, the first subset sset 1 can be formed by extracting i points before the mutation point and j points after the mutation point, as long as the sum of i and j is the first predetermined number.
[0044] In step S240 , the distribution of the divergence values of the genes on the subgraph is fitted, and the genes within a predetermined interval in the fitted distribution are taken as the second subset sset 2 .
[0045] In some embodiments, after obtaining the divergence values of all genes, a histogram distribution of these divergence values is plotted. Specifically, predetermined intervals are set, the divergence values are divided into each interval from small to large, the number of genes in each interval is counted, and then a histogram is plotted.
[0046] In addition, the fitter tool can be used to obtain the optimal distribution curve of the divergence value histogram distribution. Specifically, the fitter tool can fit 5 candidate distribution functions, and select the distribution function with the smallest mean square error (MSE) as the optimal distribution curve. Further, the genes within the predetermined interval in the histogram distribution are taken as the second subset sset 2. The predetermined interval is, for example, the 40% to 45% interval of the histogram distribution, and all genes within this interval are taken as the second subset sset 2. It should be understood that the predetermined interval can be other intervals, such as 45% to 50%, or 40% to 50%, which varies depending on the interval interval set.
[0047] In step S250 , a third subset sset 3 and a fourth subset sset 4 are generated based on the marker gene and the host keeping gene of the object, respectively.
[0048] It should be understood that for predetermined plant tissues, there are known housekeeping genes and marker genes. The marker genes can be used as the fourth subset sset 3, and the housekeeping genes with expression levels therein can be selected as the third subset sset 4.
[0049] In step S260 , a candidate set candset is generated based on the first subset sset 1 , the second subset sset 2 , the third subset sset 3 , and the fourth subset sset 4 .
[0050] In some embodiments, the candidate set candset is generated by taking the union of the first subset sset 1, the second subset sset 2, and the third subset sset 3 and subtracting the fourth subset sset 4. Specifically, candset=ssset 1+ssset 2+ssset 3−ssset 4.
[0051] In step S270 , the contour of the object is extracted according to the candidate set candset.
[0052] In some embodiments, the divergence value of each gene in the candidate set candset is read, a second predetermined number of divergence values are extracted from the read divergence values, and the feature set feaset is generated based on the genes corresponding to the extracted divergence values.
[0053] As previously described, the first subset, sset 1, consists of a first predetermined number of genes surrounding the mutation point in the divergence trend graph; the second subset, sset 2, consists of genes within a predetermined interval of the fitted distribution curve; and the third subset, sset 3, consists of marker genes for predetermined targets. The union of these three sets effectively reflects the possible values of the divergence value. Therefore, a second predetermined number of divergence values can be extracted from these sets, and a feature set, feaset, is generated based on the genes corresponding to these extracted divergence values.
[0054] As an example, the divergence values of each gene in the candidate set candset can be sorted, and the top second predetermined number of divergence values are extracted to generate the feature set feaset. The second predetermined number can be set to 7, 10, etc. according to the trade-off between computational complexity and profile accuracy.
[0055] Furthermore, the expression levels of a second predetermined number of genes in the feature set feaset are accumulated to extract the contour of the object.
[0056] By calculating the divergence of the gene expression map and constructing a subset that meets predetermined conditions based on the divergence value, a clear outline of the object can be extracted, thereby solving the technical problem of being unable to accurately extract the object outline due to the diffusion of the object edge at high resolution at the subcellular level.
[0057] FIG4 is a flowchart of a method 400 for extracting a contour of an object according to another embodiment of the present disclosure.
[0058] In step S410 , the object is divided into at least one subgraph, and for each subgraph, an expression atlas and a coloring map of the subgraph are obtained.
[0059] That is, compared with step S210 , step S410 not only obtains the expression level atlas of each subgraph, but also obtains the coloring map of the subgraph.
[0060] In FIG4 , steps S420 to S470 correspond to steps S220 to S270 in method 200. Furthermore, after step S470, method 400 further includes step S480 of obtaining, based on the extracted contour, the portion of the expression map that is within the contour, and dediffusion of the expression map based on the stained map and the portion of the expression map that is within the contour.
[0061] In some embodiments, the extracted contour is mapped onto the expression map to obtain the portion of the expression map that is within the contour. Further, image registration is performed based on the stained image and the portion of the expression map that is within the contour to obtain a de-diffused expression map.
[0062] It should be understood that after obtaining the de-diffused expression map, the de-diffused expression map may be registered with the image of the object to obtain a better registration effect.
[0063] Figures 5A to 5C are schematic diagrams showing the registration of the original expression map and the de-diffused expression map with the original staining map. Specifically, Figure 5A shows the original staining map captured by a microscope, Figure 5B shows the original expression map, and Figure 5C shows the de-diffused expression map.
[0064] As can be seen, the contours of the original expression map in Figure 5B are "expanded" due to diffusion compared to the original staining map in Figure 5A, making the two difficult to properly register. In contrast, the solid line portion of the de-diffused expression map in Figure 5C represents the extracted contours, which closely resemble the original staining map in Figure 5A, allowing accurate registration of the original staining map and the expression map.
[0065] FIG6 is a schematic diagram of an apparatus 600 for extracting a contour of an object according to an embodiment of the present disclosure.
[0066] As shown in FIG. 6 , the apparatus 600 includes an acquisition module 610 , a derivation module 620 , a first generation module 630 , a second generation module 640 , a third generation module 650 , a fourth generation module 660 and an extraction module 670 .
[0067] The acquisition module 610 divides the object into at least one subgraph, and acquires an expression quantity atlas of each subgraph.
[0068] The object can be plant tissue. When dividing it into sub-images, the tissue in a complete chip can be cropped into multiple sub-images, the tissue border of each sub-image can be identified, and the areas that are not valid tissues in the cropped sub-images can be removed to obtain sub-images of valid tissues in the chip.
[0069] After dividing the object into at least one subgraph, a gene expression file and corresponding tissue region are generated for each gene in each subgraph. Furthermore, an expression map is obtained for each gene expression file, and the obtained expression maps constitute an expression atlas for that subgraph.
[0070] It should be understood that a gene expression file and corresponding tissue region can be generated for each of the multiple genes in each subgraph to obtain its expression map. The expression levels in the expression map of each gene may be clustered or sparse. Clustered expression levels have a low degree of dispersion and can represent the outline of the object, while sparse expression levels have a high degree of dispersion and cannot depict the outline of the object.
[0071] Therefore, when constructing an expression atlas, an expression map of each gene on a subgraph can be generated to obtain an initial expression atlas. Subsequently, expression maps with coordinate points below a predetermined threshold are removed from the initial expression atlas to obtain an expression atlas.
[0072] In some embodiments, the predetermined threshold may be 30. That is, if the number of coordinate points in an expression map is less than 30, the gene associated with the expression map is considered unable to accurately depict the contour of the object. It should be understood that the predetermined threshold may be set to other values, such as 20, 40, etc., depending on the computational complexity and the accuracy requirements of contour extraction.
[0073] The export module 620 calculates the distance between any two coordinate points in each expression graph in the expression graph set, so as to export the divergence value of the gene associated with the expression graph based on the distance.
[0074] In some embodiments, in order to obtain the distance between each coordinate point in the expression level map, first obtain the three-dimensional representation (x, y, umi) of each coordinate point in the expression level map, where umi (unique molecular identifier) is a unique molecular identifier. Then, for any two points in the expression level map, m and point n , calculate the distance between edge(point m ,point n ). The distance can be any of the following: Euclidean distance, Jaccard distance, Minkowski distance, Manhattan distance, etc. Taking Euclidean distance as an example, the L2 norm can be used to calculate the distance edge(point m ,point n ).
[0075] Furthermore, for the multiple distances calculated, the standard deviation std(edge(point m ,point n )) and mean mean(edge(point m ,point n )), and the coefficient of variation is obtained by dividing the two, which is used as the divergence value of the gene associated with the expression level map. Specifically, the divergence value of the gene can be derived by the above equation (1).
[0076] It should be understood that, as previously mentioned, an expression atlas consists of expression maps whose coordinate points exceed a predetermined threshold. This means that the coordinate points are clustered together, so there may be overlap between any two points. When calculating distance, it is necessary to remove overlapped edges to avoid affecting the accuracy of the divergence value.
[0077] The first generating module 630 generates a trend graph of the divergence values of the genes on the subgraph according to the derived divergence values to obtain mutation points in the trend graph, and generates a first subset sset 1 based on the mutation points.
[0078] As mentioned above, the expression atlas is composed of expression graphs in which the number of coordinate points in the acquired expression graphs is above a predetermined threshold. Therefore, divergence values are derived for multiple genes on the subgraph, and these divergence values are sorted in a predetermined order, such as ascending or descending, to generate a trend graph of the divergence values, which can be a line graph. This can be used to know the flat area where most of the divergence values are located and the sudden change area where the divergence values suddenly change. As an example, the first point in the trend graph that changes from a flat area to a sudden change area is taken as the mutation point (i.e., the inflection point of the trend graph).
[0079] In some embodiments, a mutation point is obtained based on a gradient change. For example, for each gene in the sudden change region of the trend graph, the gradient between the gene and the two adjacent genes is calculated, and the gradient can be the difference in the y-axis direction divided by the difference in the x-axis direction. Subsequently, for each gene in the sudden change region of the trend graph, the difference between the two calculated gradients is obtained, and the gene with the largest gradient difference is identified as the mutation point in the trend graph. It should be understood that the two adjacent genes can be two genes that are immediately adjacent, i.e., the two genes on the left and right of the current gene.
[0080] It should be understood that a point where a sudden rise occurs in the trend graph may be used as a mutation point, or a point where a sudden drop occurs in the trend graph may be used as a mutation point.
[0081] Furthermore, after obtaining the mutation point, a first subset sset 1 is generated based on the mutation point. It can be understood that the mutation point reflects the critical situation of the divergence value of the gene, so a first predetermined number of points around the mutation point can be extracted, and the genes corresponding to the extracted points are used as the first subset sset 1.
[0082] In some embodiments, the first predetermined number may be set to 10, or may be set to other values such as 8, 15, 20, etc. according to computational complexity and accuracy of contour extraction.
[0083] It should be understood that the first predetermined number of points around the mutation point can be points symmetrically distributed around the mutation point, or can be points before the mutation point, that is, points located in the flat region of the divergence value. Alternatively, the first subset sset 1 can be formed by extracting i points before the mutation point and j points after the mutation point, as long as the sum of i and j is the first predetermined number.
[0084] The second generation module 640 fits the distribution of the divergence values of the genes on the subgraph, and takes the genes within a predetermined interval in the fitted distribution as the second subset sset 2.
[0085] In some embodiments, after obtaining the divergence values of all genes, a histogram distribution of these divergence values is plotted. Specifically, predetermined intervals are set, the divergence values are divided into each interval from small to large, the number of genes in each interval is counted, and then a histogram is plotted.
[0086] In addition, the fitter tool can be used to obtain the optimal distribution curve of the divergence value histogram distribution. Specifically, the fitter tool can fit 5 candidate distribution functions, and select the distribution function with the smallest mean square error (MSE) as the optimal distribution curve. Further, the genes within the predetermined interval in the histogram distribution are taken as the second subset sset 2. The predetermined interval is, for example, the 40% to 45% interval of the histogram distribution, and all genes within this interval are taken as the second subset sset 2. It should be understood that the predetermined interval can be other intervals, such as 45% to 50%, or 40% to 50%, which varies depending on the interval interval set.
[0087] The third generation module 650 generates a third subset sset 3 and a fourth subset sset 4 based on the marker genes and the host keeping genes of the object, respectively.
[0088] It should be understood that for predetermined plant tissues, there are known housekeeping genes and marker genes. The marker genes can be used as the fourth subset sset 3, and the housekeeping genes with expression levels therein can be selected as the third subset sset 4.
[0089] The fourth generating module 660 generates a candidate set candset based on the first subset sset 1 , the second subset sset 2 , the third subset sset 3 and the fourth subset sset 4 .
[0090] In some embodiments, the candidate set candset is generated by taking the union of the first subset sset 1, the second subset sset 2, and the third subset sset 3 and subtracting the fourth subset sset 4. Specifically, candset=ssset 1+ssset 2+ssset 3−ssset 4.
[0091] The extraction module 670 extracts the contour of the object according to the candidate set candset.
[0092] In some embodiments, the divergence value of each gene in the candidate set candset is read, a second predetermined number of divergence values are extracted from the read divergence values, and the feature set feaset is generated based on the genes corresponding to the extracted divergence values.
[0093] As previously described, the first subset, sset 1, consists of a first predetermined number of genes surrounding the mutation point in the divergence trend graph; the second subset, sset 2, consists of genes within a predetermined interval of the fitted distribution curve; and the third subset, sset 3, consists of marker genes for predetermined targets. The union of these three sets effectively reflects the possible values of the divergence value. Therefore, a second predetermined number of divergence values can be extracted from these sets, and a feature set, feaset, is generated based on the genes corresponding to these extracted divergence values.
[0094] As an example, the divergence values of each gene in the candidate set candset can be sorted, and the top second predetermined number of divergence values are extracted to generate the feature set feaset. The second predetermined number can be set to 7, 10, etc. according to the trade-off between computational complexity and profile accuracy.
[0095] Furthermore, the expression levels of a second predetermined number of genes in the feature set feaset are accumulated to extract the contour of the object.
[0096] By calculating the divergence of the gene expression map and constructing a subset that meets predetermined conditions based on the divergence value, a clear outline of the object can be extracted, thereby solving the technical problem of being unable to accurately extract the object outline due to the diffusion of the object edge at high resolution at the subcellular level.
[0097] FIG7 shows a schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0098] As shown in Figure 7, device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of device 700 can also be stored in RAM 703. Computing unit 701, ROM 702, and RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to bus 704.
[0099] Various components in device 700 are connected to I / O interface 705, including an input unit 706, such as a keyboard, mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, optical disk, etc.; and a communication unit 709, such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0100] The computing unit 701 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as method 200 or 400. For example, in some embodiments, the above methods can be implemented as computer software programs that are tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the method in any other appropriate manner (e.g., by means of firmware).
[0101] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0103] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0104] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0105] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0106] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.
[0107] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.
[0108] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for extracting the contour of an object, comprising: Divide the object into at least one subgraph, and for each subgraph, obtain an expression quantity atlas of the subgraph; For each expression graph in the expression graph set, calculating the distance between any two coordinate points in the expression graph, so as to derive a divergence value of a gene associated with the expression graph based on the distance; Obtaining a mutation point according to the derived divergence value, and generating a first subset based on the mutation point; Fitting the distribution of the divergence values of the genes on the subgraph, and taking the genes within a predetermined interval in the fitted distribution as the second subset; generating a candidate set based on the first subset and the second subset; as well as The contour of the object is extracted based on the candidate set.
2. The method according to claim 1, wherein For each subgraph, obtaining the expression atlas of the subgraph includes: For each gene on the subgraph, generating an expression level graph of the corresponding gene to obtain an initial expression level atlas; and The expression level atlas with the number of coordinate points below a predetermined threshold is removed from the initial expression level atlas to obtain the expression level atlas of the subgraph.
3. The method according to claim 1, wherein Calculating the distance between each coordinate point in the expression map to derive a divergence value of a gene associated with the expression map based on the distance includes: For the calculated multiple distances, obtain standard deviations and means of the multiple distances; and The divergence value of the gene associated with the expression level graph is derived based on the obtained standard deviation and mean.
4. The method according to claim 1, wherein The mutation points obtained based on the derived divergence values include: A trend graph of the divergence values of the genes on the subgraph is generated according to the derived divergence values to obtain mutation points in the trend graph.
5. The method according to claim 1 or 4, wherein The mutation point is the first point in the trend graph that changes from a flat area to a sudden change area.
6. The method according to claim 1, wherein Generating a first subset based on the mutation point includes: extracting a first predetermined number of points around the mutation point; and The genes corresponding to the extracted points are taken as the first subset.
7. The method according to claim 1, wherein Extracting the contour of the object based on the candidate set includes: Reading a scatter value of each gene in the candidate set, extracting a second predetermined number of scatter values from the read scatter values, and generating a feature set based on the genes corresponding to the extracted scatter values; and The expression levels of a second predetermined number of genes in the feature set are accumulated to extract the outline of the object.
8. The method according to claim 1, further comprising: generating a third subset and a fourth subset based on the marker genes and the housekeeping genes of the subject, respectively; A candidate set is generated based on the first subset, the second subset, the third subset, and the fourth subset.
9. The method according to claim 1, further comprising: Obtaining a coloring graph of the subgraph; According to the extracted contour, obtaining a portion of the expression amount map located within the contour; as well as Dediffusion is performed on the expression level map based on the dyeing map and the portion of the expression level map obtained that is located within the contour.
10. The method according to claim 9, further comprising: The dediffused expression map is registered with the image of the object.
11. A method for extracting a contour of an object, comprising: For each subgraph, obtaining an expression atlas of the subgraph; For each expression graph in the expression graph set, calculating the distance between any two coordinate points in the expression graph, so as to derive a divergence value of a gene associated with the expression graph based on the distance; Obtaining a mutation point according to the derived divergence value, and generating a first subset based on the mutation point; Fitting the distribution of the divergence values of the genes on the subgraph, and taking the genes within a predetermined interval in the fitted distribution as the second subset; generating a candidate set based on the first subset and the second subset; as well as The contour of the object is extracted based on the candidate set.
12. The method according to claim 11, wherein For each subgraph, obtaining the expression atlas of the subgraph includes: For each gene on the subgraph, generating an expression level graph of the corresponding gene to obtain an initial expression level atlas; and The expression level atlas with the number of coordinate points below a predetermined threshold is removed from the initial expression level atlas to obtain the expression level atlas of the subgraph.
13. The method according to claim 11, wherein The mutation points obtained based on the derived divergence values include: A trend graph of the divergence values of the genes on the subgraph is generated according to the derived divergence values to obtain mutation points in the trend graph.
14. The method according to claim 11, wherein Generating a first subset based on the mutation point includes: extracting a first predetermined number of points around the mutation point; and The genes corresponding to the extracted points are taken as the first subset.
15. The method according to claim 11, wherein Extracting the contour of the object based on the candidate set includes: Reading a scatter value of each gene in the candidate set, extracting a second predetermined number of scatter values from the read scatter values, and generating a feature set based on the genes corresponding to the extracted scatter values; and The expression levels of a second predetermined number of genes in the feature set are accumulated to extract the outline of the object.
16. The method according to claim 11, further comprising: generating a third subset and a fourth subset based on the marker genes and the housekeeping genes of the subject, respectively; A candidate set is generated based on the first subset, the second subset, the third subset, and the fourth subset.
17. The method according to claim 11, further comprising: Obtaining a coloring graph of the subgraph; According to the extracted contour, obtaining a portion of the expression amount map located within the contour; as well as Dediffusion is performed on the expression level map based on the dyeing map and the portion of the expression level map obtained that is located within the contour.
18. A device for extracting the outline of an object, comprising: An acquisition module divides the object into at least one subgraph, and for each subgraph, acquires an expression quantity atlas of the subgraph; an export module, for each expression graph in the expression graph set, calculating a distance between any two coordinate points in the expression graph, so as to export a divergence value of a gene associated with the expression graph based on the distance; a first generating module, which obtains a mutation point according to the derived divergence value and generates a first subset based on the mutation point; A second generation module is configured to fit the distribution of the divergence values of the genes on the subgraph, and to use genes within a predetermined interval in the fitted distribution as a second subset; a fourth generating module, generating a candidate set based on the first subset and the second subset; as well as An extraction module extracts the contour of the object according to the candidate set.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 10.
20. A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions implement the method according to any one of claims 1 to 10 when executed by a processor.