Data storage method and device and data reading method and device

By receiving biological data files and mask image files, extracting and counting cell and gene data, and using CGEF format for classified storage, the problems of data disorder and redundancy in the existing technology are solved, and lower storage costs and better Fast analysis speed.

CN119028443APending Publication Date: 2024-11-26SHENZHEN HUADA SANJIAN QIFA TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310596719.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The prior art uses ordinary text format to store cellular data, resulting in disorder and redundancy of information, increasing storage costs and analysis time.

Method used

By receiving biological data files and mask image files, extracting and counting cell and gene data, using the new CGEF format for classification storage, and converting unordered data into ordered data.

Benefits of technology

Reduces data redundancy, reduces storage costs, and accelerates data reading and analytical query speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119028443A_ABST
    Figure CN119028443A_ABST
Patent Text Reader

Abstract

The invention provides a data storage method and device and a data reading method and device, and relates to the technical field of computers. The method comprises the following steps: receiving a biological data file, and extracting gene data in the biological data file; receiving a mask image file, and obtaining cell data in the mask image file; performing data statistics on the cell data and the gene data to obtain statistical data; and storing the cell data, the gene data and the statistical data in a classified manner. According to the method and the device, classified storage is performed according to the new format for storing the cell expression quantity information data, disordered data is converted into ordered data, data redundancy is reduced, and the storage cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data storage method, a data reading method and a device. Background Art

[0002] With the development of spatiotemporal omics and sequencing technologies, people want to accurately understand the gene expression in each cell and locate the spatial position of the cell, and then perform various analyses and displays on the cells. Therefore, a new storage format for quantitative analysis of cell expression data is needed to store and manage these data for downstream analysis.

[0003] However, the existing technology stores cell data in ordinary text format, the stored information is relatively disordered, and there is information redundancy between the data, which increases the storage cost. Summary of the invention

[0004] The present disclosure provides a data storage method, a data reading method, a device, an electronic device and a storage medium.

[0005] According to a first aspect of the present disclosure, a data storage method is provided, the method comprising: receiving a biological data file, extracting gene data in the biological data file; receiving a mask image file, acquiring cell data in the mask image file; performing data statistics on the cell data and the gene data to obtain statistical data; and classifying and storing the cell data, the gene data and the statistical data.

[0006] In some embodiments, receiving a mask image file and acquiring cell data in the mask image file includes: parsing the mask image file by image processing to acquire cell centroids, contour coordinates, and intracellular pixel coordinates in the mask image file.

[0007] In some embodiments, cell data and gene data are statistically analyzed to obtain statistical data including: determining the association between gene data and each cell based on gene data, contour coordinates, and intracellular pixel coordinates; obtaining the name of the gene contained in each cell and the number of gene expression levels corresponding to the gene based on the association between the gene data and each cell; and counting the cell names associated with the gene and the number of gene expression levels of each cell associated with the gene.

[0008] In some embodiments, classifying and storing cell data, gene data and statistical data includes: counting the cell data of each cell into a first array, the cell data of each cell including the cell serial number, the cell centroid, the gene data contained in each cell, the sum of the gene expression levels of all or part of the genes in the cell, the number of intracellular coordinates, the cell area, the cell annotation name, and the name of the cell after cluster analysis.

[0009] In some embodiments, classifying and storing the cell data, gene data, and statistical data includes: counting the contour coordinates of each cell into a second array, wherein the second array corresponds to the first array one by one.

[0010] In some embodiments, classifying and storing the cell data, gene data, and statistical data further includes: extracting annotation information of each cell according to the cell annotation name in the first array; and counting the annotation information of each cell into a third array.

[0011] In some embodiments, classifying and storing cell data, gene data, and statistical data includes: obtaining the gene name and the corresponding number of genes of each cell according to the gene data contained in each cell in the first array; and counting the gene name and the corresponding number of genes of each cell into a fourth array.

[0012] In some embodiments, classifying and storing the cell data, gene data, and statistical data includes: storing the correlation between the gene data and the cells, the gene expression level of the gene, and the maximum gene expression level of the gene in a fifth array.

[0013] In some embodiments, classifying and storing cell data, gene data, and statistical data further includes: obtaining the correlation between gene data and cells and the number of gene expression values ​​corresponding to each cell based on the gene offset and the number of cells; and counting the cell names and the corresponding number of gene expression values ​​into a sixth array.

[0014] In some embodiments, classifying and storing the cell data, gene data, and statistical data further includes: storing the cell logical area information in a seventh array.

[0015] In some embodiments, categorizing and storing the cell data, gene data, and statistical data includes: calling an API to write the counted cell data, gene data, and statistical data into a biological data file.

[0016] According to the embodiments of the present disclosure, by receiving a biological data file, gene data in the biological data file is extracted; receiving a mask image file, cell data in the mask image file is obtained; data statistics are performed on the cell data and the gene data to obtain statistical data; the cell data, gene data and statistical data are classified and stored, and classified storage is implemented according to a new format for storing cell expression information data, and disordered data is converted into ordered data, thereby reducing data redundancy and lowering storage costs.

[0017] According to a second aspect of the present disclosure, a data reading method is provided, the method comprising: acquiring biological data information, the biological data information comprising a cell name or a gene name; and classifying and reading the association between the gene and each cell and the corresponding number of gene expression levels according to the biological data information.

[0018] In some embodiments, the cell data includes cell logical region information, and classifying and reading the association between genes and cells and the corresponding number of gene expression levels according to the biological data information includes: classifying and reading the corresponding cell data according to the cell logical region information.

[0019] According to an embodiment of the present disclosure, biological data information is obtained, and the biological data information includes cell names or gene names; based on the biological data information, the association between genes and each cell and the corresponding number of gene expression levels are classified and read, so as to realize the reading of orderly biological data information, accelerate the speed of analysis query, and reduce the analysis cost.

[0020] According to a third aspect of the present disclosure, a data storage device is provided, which includes: a first receiving unit, used to receive a biological data file and extract gene data from the biological data file; a second receiving unit, used to receive a mask image file and obtain cell data from the mask image file; a statistical unit, used to perform data statistics on the cell data and the gene data to obtain statistical data; and a storage unit, used to classify and store the cell data, gene data and statistical data.

[0021] According to the embodiments of the present disclosure, a biological data file is received through a data storage device, and gene data in the biological data file is extracted; a mask image file is received, and cell data in the mask image file is obtained; data statistics are performed on the cell data and the gene data to obtain statistical data; the cell data, the gene data, and the statistical data are classified and stored, and classified storage is implemented according to a new format for storing cell expression information data, and disordered data is converted into ordered data, thereby reducing data redundancy and lowering storage costs.

[0022] According to a fourth aspect of the present disclosure, a data reading device is provided, which includes: an acquisition unit for acquiring biological data information, the biological data information including cell names or gene names; a reading unit for classifying and reading the association between genes and each cell and the corresponding number of gene expression levels according to the biological data information.

[0023] According to an embodiment of the present disclosure, biological data information is acquired through a data reading device, and the biological data information includes a cell name or a gene name; based on the biological data information, the association between genes and each cell and the corresponding number of gene expression levels are classified and read, so as to realize the reading of orderly biological data information, accelerate the speed of analysis query, and reduce the analysis cost.

[0024] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:

[0025] at least one processor; and

[0026] a memory communicatively connected to at least one processor; wherein,

[0027] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to perform the method of the first aspect or the second aspect mentioned above.

[0028] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method of the aforementioned first aspect or second aspect.

[0029] According to a seventh aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the computer program implements the method of the first aspect or the second aspect as described above.

[0030] According to the embodiments of the present disclosure, by receiving a biological data file, gene data in the biological data file is extracted; receiving a mask image file, cell data in the mask image file is obtained; data statistics are performed on the cell data and the gene data to obtain statistical data; the cell data, gene data and statistical data are classified and stored, and classified storage is implemented according to a new format for storing cell expression information data, and disordered data is converted into ordered data, thereby reducing data redundancy and lowering storage costs.

[0031] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0033] Figure 1 A schematic diagram of a data storage method provided by an embodiment of the present disclosure;

[0034] Figure 2 A schematic diagram of a data storage method provided by an embodiment of the present disclosure;

[0035] Figure 3 A schematic diagram of a mask image file provided by an embodiment of the present disclosure;

[0036] Figure 4 A flowchart of a data reading method provided by an embodiment of the present disclosure;

[0037] Figure 5 A schematic diagram of a data arrangement provided in an embodiment of the present disclosure;

[0038] Figure 6 A schematic diagram of a CGEF data storage structure provided in an embodiment of the present disclosure;

[0039] Figure 7 A structural schematic diagram of a data storage device provided in an embodiment of the present disclosure;

[0040] Figure 8 A structural schematic diagram of a data reading device provided in an embodiment of the present disclosure;

[0041] Fig. 9 A schematic block diagram of an exemplary electronic device 900 provided for an embodiment of the present disclosure. DETAILED DESCRIPTION

[0042] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art 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.

[0043] The following describes a data storage method, a data reading method, an apparatus, an electronic device, and a storage medium according to an embodiment of the present disclosure with reference to the accompanying drawings.

[0044] With the development of spatiotemporal omics and sequencing technologies, people want to accurately understand the gene expression in each cell and locate the spatial position of the cell, and then perform various analyses and displays on the cells. Therefore, a new storage format for quantitative analysis of cell expression data is needed to store and manage these data for downstream analysis.

[0045] However, the technology uses ordinary text format to store cell data, as follows:

[0046] geneID x y MIDCount ExonCount label AC233755.2 15030 14699 1 1 260519 AC011841.1 14064 3426 3 0 40813 AC011841.1 19625 3183 1 0 34798 AC011841.1 15503 5809 3 0 90127 AC011841.1 13278 2560 1 0 20726 AC145212.1 9176 13435 1 1 235607 AC145212.1 17295 18694 2 0 343202

[0047] Where MIDCount is the total expression of the gene, ExonCount is the exon expression of the gene (optional), and label is the cell name.

[0048] It is understandable that the gene expression amount can also be a UMI count, a molecular identifier (MID, Molecular Identifiers), a unique molecular identifier (UMI, unique molecular identifiers), and the above cell data storage format is only an example of the present disclosure and is not limited in the present disclosure.

[0049] It can be seen that by parsing the text data, the corresponding cell data is obtained. The saved information is relatively disordered, and there is information redundancy between the data, which increases the storage cost. For downstream analysis, the entire file needs to be traversed, the entire analysis process is very slow, and the analysis cost is increased. The stored information is also relatively limited, which is not conducive to expansion.

[0050] To this end, in response to the above problems, the present disclosure proposes a data storage method, defines a new storage format CGEF (CellBin-based Gene Expression File) for quantitative analysis of cell expression, analyzes and processes the data in advance, extracts all or part of the key information, and then stores the processed data in a classified manner, thereby converting disordered data into ordered data, reducing information redundancy and storage costs. At the same time, it also speeds up the speed of downstream data reading and reduces analysis costs. It is able to calculate and store various statistical information in advance, facilitating subsequent information query and analysis statistics.

[0051] The data storage method proposed in the present disclosure can be applied to a device with a data analysis function, and the application scenario is not limited in the present disclosure. The present disclosure mainly takes the data file scenario of quantitative analysis of gene expression as an example.

[0052] The following describes in detail with reference to the accompanying drawings a data storage method, a data reading method, a device, an electronic device, a storage medium, and a program product proposed in the present disclosure.

[0053] Figure 1 A schematic diagram of a data storage method provided by an embodiment of the present disclosure. Figure 1 As shown, the method comprises the following steps:

[0054] Step 101, receiving a biological data file, and extracting gene data from the biological data file.

[0055] In one implementation of the present disclosure, an input biological data file is read and gene data of the file is extracted. The gene data may include coordinates of the gene data.

[0056] The biological data file can be a common binary file, such as a BGEF file, and the gene data contained in the BGEF file can be directly read by geftools. The geftools tool is customized and developed for the BGEF format, reads the input file in parallel, and extracts the data information in the file. In the present disclosure, the gene data is extracted.

[0057] It should be noted that there may be multiple biological data files or one biological data file, which is not limited in the embodiments of the present disclosure.

[0058] Step 102: receiving a mask image file and acquiring cell data in the mask image file.

[0059] In one embodiment of the present disclosure, a mask image file corresponding to a user's designation is received, and geftools parses the mask image file through image processing to obtain cell data stored in the mask image file, so as to facilitate correspondence and association with gene data read later.

[0060] The mask image file may be a mask image file. The cell data may include the cell centroid, contour coordinates, and all or part of the pixel coordinates in the cell.

[0061] Step 103, performing data statistics on the cell data and the gene data to obtain statistical data.

[0062] In one embodiment of the present disclosure, the acquired gene data and cell data are matched according to the above steps to obtain the correlation between the gene data and the cell data. At the same time, the cell name of each gene and the number of gene expression levels in each cell are counted.

[0063] Step 104, classify and store the cell data, gene data and statistical data.

[0064] In the present disclosure, cell data, gene data, and statistical data can be written into a biological data file by calling an application program interface (eg, an API interface).

[0065] Among them, API interface (Application Program Interface) is a set of predefined functions, through which computer software can communicate with each other. Developers can develop applications through API interface programs, which can reduce the writing of useless programs and ease programming tasks.

[0066] Different data are written to any location of the biological data file in any order, that is, there is no restriction on the storage location and writing order of the biological data in the present disclosure.

[0067] Therefore, according to the embodiments of the present disclosure, by receiving a biological data file, gene data in the biological data file is extracted; receiving a mask image file, cell data in the mask image file is obtained; data statistics are performed on the cell data and the gene data to obtain statistical data; the cell data, gene data and statistical data are classified and stored, and classified storage is implemented according to a new format for storing cell expression information data, and disordered data is converted into ordered data, thereby reducing data redundancy and lowering storage costs.

[0068] Figure 2 A flowchart of a data storage method provided in an embodiment of the present disclosure. Figure 2 based on Figure 1 In the embodiment shown, step 104 is further defined. Figure 2 In the embodiment shown, step 104 includes step 204. Figure 2 As shown, the method includes the following steps.

[0069] Step 201, receiving a biological data file, and extracting gene data from the biological data file.

[0070] In some embodiments of the present disclosure, a common BGEF file is received, and geftools can directly read the gene data contained in the BGEF. geftools can read the input file in parallel through multiple threads to extract the gene data in the biological data file. The gene data may include gene name, gene coordinates, gene expression, and other gene data.

[0071] It can be understood that extracting genetic data from biological data files is to extract some attributes that have an important impact on the target output from a large number of data attributes in the biological data files, that is, to reduce the dimension of the original data, thereby achieving the purpose of improving the quality of biological data and increasing the speed of biological data mining.

[0072] Step 202: receiving a mask image file and acquiring cell data in the mask image file.

[0073] In some embodiments of the present disclosure, a mask image file corresponding to a user's designation is received. Geftools parses the mask image file through an image processing method, and can obtain cell data stored in the mask image file, so as to facilitate correspondence and association with gene data read later.

[0074] The image processing method may be geftools to parse the mask image file by calling the opencv library method. The cell data may include the cell centroid, contour coordinates, and pixel coordinates within the cell. Figure 3 As shown, the mask image file may be a mask image file.

[0075] Step 203, performing data statistics on the cell data and the gene data to obtain statistical data.

[0076] In some embodiments of the present disclosure, the association between gene data and each cell is determined based on gene data, contour coordinates, and intracellular pixel coordinates; based on the association between gene data and each cell, the name of the gene contained in each cell and the number of gene expression levels corresponding to the gene are obtained; the cell names associated with the gene and the number of gene expression levels of each cell associated with the gene are counted.

[0077] Specifically, the gene coordinates are matched with the contour coordinates in the mask image file and the pixel coordinates in the cell. If they match, the gene data is considered to belong to the cell, otherwise it belongs to the background or other cells. After the above processing, the gene name contained in each cell and the corresponding number of gene expression levels are obtained. At the same time, it is also possible to count which cells each gene has appeared in and the number of gene expression levels in each cell.

[0078] For example, the centroid of a cell is (100, 100), and the radius is a circular area of ​​10. All or part of the gene data that appear in this area belongs to this cell, for example:

[0079] gene1(95,96,1)gene2(97,92,3)gene3(95,94,1),gene1(93,97,1)

[0080] Then the genecount of this cell is 3, expcount is 6, and dnbcount is 4

[0081] Step 204, calling the API to write the counted cell data, gene data and statistical data into the biological data file.

[0082] In some embodiments of the present disclosure, the HDF5 API is called to write the counted cell data, gene data, and statistical data into a file.

[0083] In some embodiments of the present disclosure, the cell data of each cell are counted into a first array, and the cell data of each cell include the cell serial number, the cell centroid, the gene data contained in each cell, the sum of the gene expression levels of all or part of the genes in the cell, the number of intracellular coordinates, the cell area, the cell annotation name, and the name of the cell after cluster analysis.

[0084] The first array may be a cell, which is a multidimensional array.

[0085] Specifically, cell records the data of each cell, including (cellid, x, y, offset, genecount, expcount, dnbcount, area, celltypid, clusterid), where cellid is the serial number of the cell, x and y are the center of mass of the cell, offset and genecount record the gene data contained in this cell (read in conjunction with cellExp), expcount is the sum of the mids of all or part of the genes of the cell, dnbcount is the number of all or part of the coordinates of the cell, area is the area of ​​the cell, celltypid is the cell annotation id, and clusterid is the id of the cell after cluster analysis.

[0086] In some embodiments of the present disclosure, the contour coordinates of each cell are counted into a second array, wherein the second array corresponds one-to-one to the first array.

[0087] The second array may be cellborder, which is a multidimensional array. Cellborder records the outline of each cell and corresponds one-to-one with the cell array above. Each cell stores a maximum of 32 outline points.

[0088] In some embodiments of the present disclosure, annotation information of each cell is extracted according to the cell annotation name in the first array; and the annotation information of each cell is counted in the third array.

[0089] The third array can be cellTypelist, which records the annotation information of each cell and can be read through celltypid in cell.

[0090] In some embodiments of the present disclosure, the gene name and the corresponding gene number of each cell are obtained based on the gene data contained in each cell in the first array; and the gene name and the corresponding gene number of each cell are counted in a fourth array.

[0091] The fourth array may be cellExp, which records gene information. Each gene information includes geneid and genecount. Each geneid and corresponding count of the cell can be obtained through cell offset and genecount.

[0092] In some embodiments of the present disclosure, the correlation between gene data and cells, the gene expression level of the gene, and the maximum gene expression level of the gene are counted in a fifth array.

[0093] The fifth array can be gene, which records the information of the gene (genename, offset and cellcount record in which cells this gene has appeared (read with geneExp), expcount is the sum of the mid of this gene, and maxMIDcount records the maximum mid of this gene)

[0094] In some embodiments of the present disclosure, the association between gene data and cells and the number of gene expression levels corresponding to each cell are obtained based on the gene offset and the number of cells; the cell names and the corresponding number of gene expression levels are counted in a sixth array.

[0095] The sixth array can be geneExp, which records the cell id and the corresponding midcount. Through the offset and cellcount of the gene, we can get which cells this gene has appeared in and the number of mids corresponding to this cell.

[0096] In some embodiments of the present disclosure, the cell logic area information is counted into a seventh array.

[0097] The seventh array may be blockIndex, which records the cell logic block situation, making it convenient to query cell information by area.

[0098] It can be understood that the array in the present disclosure can be a data set, that is, a multi-dimensional array.

[0099] In summary, according to the embodiments of the present disclosure, the original data information is retained and the information is classified, thereby reducing data redundancy. At the same time, other preset data can be calculated and counted on demand, thereby accelerating downstream analysis and query.

[0100] Figure 4 The following is a flow chart of a data reading method provided by an embodiment of the present disclosure. Figure 4 As shown, the method comprises the following steps:

[0101] Step 301, obtaining biological data information, the biological data information including cell names or gene names.

[0102] In some embodiments of the present disclosure, a cell name or a gene name to be queried in a biological data file is obtained.

[0103] Step 302: According to the biological data information, the association between the gene and each cell and the corresponding number of gene expression levels are classified and read.

[0104] In some embodiments of the present disclosure, according to the cell name or gene name, the gene offset and the number of genes corresponding to the gene name or cell name are read from the classification storage table; the reading start position is determined according to the gene offset; and the association between the gene and each cell and the corresponding number of gene expression levels are read from the fourth array or the sixth array.

[0105] In addition, the cell data includes cell logical region information. In the present disclosure, the corresponding cell data can be classified and read according to the cell logical region information.

[0106] It is understandable that, based on the BGEF file and the mask image file, we can count which genes each cell contains, and then count the gene expression in the cell. Conversely, we can also know which cells a gene appears in. The data is arranged as follows Figure 5 shown.

[0107] In summary, according to the embodiments of the present disclosure, by acquiring biological data information, the biological data information includes cell names or gene names; according to the biological data information, the association between genes and each cell and the corresponding number of gene expression levels are classified and read, so as to realize the reading of orderly biological data information, accelerate the speed of analysis query, and reduce the analysis cost.

[0108] For ease of understanding, based on Figure 1 , Figure 2 In the embodiment shown, the present disclosure provides a schematic diagram of a CGEF data storage structure, such as Figure 6 shown.

[0109] In some embodiments of the present disclosure, CGEF is a file format designed for storing cellular data and visually displaying the spatial distribution of spatiotemporal gene expression, and its file structure is based on a hierarchical structure designed based on the HDF5 API.

[0110] Each CGEF file stores a set of spatial gene and cell expression matrices. The file contains two main object types: group and dataset. A dataset is a multidimensional array, while a group can contain attributes and is a management structure for datasets and other groups.

[0111] CGEF has only one cellBin group, which contains several data sets, the main ones are as follows:

[0112] (1) cell records the cell data information it contains, including (cellid, x, y, offset, genecount, expcount, dnbcount, area, celltypid, clusterid), where cellid is the cell number, x and y are the cell centroids, offset and genecount record the gene data contained in this cell (read with cellExp), expcount is the sum of the mids of all or part of the genes in the cell, dnbcount is the number of all or part of the coordinates of the cell, area is the area of ​​the cell, celltypid is the cell annotation id, and clusterid is the id of the cell after cluster analysis.

[0113] (2) cellborder records the outline of each cell, which corresponds one-to-one to the cell data above. Each cell can store up to 32 outline points.

[0114] (3) cellTypelist records the annotation information of each cell, which can be read through the celltypid in the cell

[0115] (4) cellExp records gene information. Each gene information includes geneid and genecount. Through the cell offset and genecount, each geneid and corresponding count of this cell can be obtained.

[0116] (5)gene records the information of the gene (genename, offset and cellcount record in which cells this gene has appeared (read with geneExp), expcount is the sum of the mids of this gene, and maxMIDcount records the maximum mid of this gene)

[0117] (6) geneExp records the cell id and the corresponding midcnt. Through the offset and cellcount of the gene, we can obtain which cells the gene has appeared in and the number of mids corresponding to the cell.

[0118] (7) blockIndex records the logical division of cells, making it easy to query cell information by area.

[0119] In summary, the present disclosure defines a new storage format CGEF for quantitative analysis data of cell expression, which sorts out disordered data and stores them by data type, thereby speeding up analysis and query.

[0120] Corresponding to the above-mentioned data storage method, the present disclosure also proposes a data storage device. Figure 7 FIG. 7 is a schematic diagram of a data storage device 700 provided in an embodiment of the present disclosure. Figure 7 As shown, including:

[0121] The first receiving unit 710 is used to receive a biological data file and extract gene data from the biological data file;

[0122] The second receiving unit 720 is used to receive the mask image file and obtain the cell data in the mask image file;

[0123] A statistical unit 730 is used to perform data statistics on the cell data and the gene data to obtain statistical data;

[0124] The storage unit 740 is used to classify and store the cell data, gene data and statistical data.

[0125] In some embodiments, the second receiving unit 720 is used to: parse the mask image file through image processing to obtain the cell centroid, contour coordinates and intracellular pixel coordinates in the mask image file.

[0126] In some embodiments, the statistical unit 730 is used to: determine the association between the gene data and each cell based on the gene data, contour coordinates and intracellular pixel coordinates; obtain the gene name contained in each cell and the corresponding number of gene expression levels based on the association between the gene data and each cell; count the cell names associated with the gene, and the number of gene expression levels of each cell associated with the gene.

[0127] In some embodiments, the storage unit 740 is used to: count the cell data of each cell into a first array, the cell data of each cell including the cell serial number, the cell centroid, the gene data contained in each cell, the sum of the gene expression levels of all or part of the genes in the cell, the number of intracellular coordinates, the cell area, the cell annotation name, and the name of the cell after cluster analysis.

[0128] In some embodiments, the storage unit 740 is used to: count the contour coordinates of each cell into a second array, wherein the second array corresponds to the first array one-to-one.

[0129] In some embodiments, the storage unit 740 is used to: extract annotation information of each cell according to the cell annotation name in the first array; and count the annotation information of each cell into the third array.

[0130] In some embodiments, the storage unit 740 is used to: obtain the gene name and the corresponding gene number of each cell according to the gene data contained in each cell in the first array; and count the gene name and the corresponding gene number of each cell into a fourth array.

[0131] In some embodiments, the storage unit 740 is used to: count the association between gene data and cells, the gene expression level of the gene, and the maximum gene expression level of the gene into a fifth array.

[0132] In some embodiments, the storage unit 740 is used to: obtain the association between gene data and cells and the number of gene expression values ​​corresponding to each cell according to the gene offset and the number of cells; and count the cell names and the corresponding number of gene expression values ​​into a sixth array.

[0133] In some embodiments, the storage unit 740 is used to: count the cell logical area information into a seventh array.

[0134] In some embodiments, the storage unit 740 is used to call an API to write the counted cell data, gene data, and statistical data into a biological data file.

[0135] In summary, according to the embodiments of the present disclosure, a biological data file is received through a data storage device, and gene data in the biological data file is extracted; a mask image file is received, and cell data in the mask image file is obtained; data statistics are performed on the cell data and the gene data to obtain statistical data; the cell data, gene data and statistical data are classified and stored, and classified storage is implemented according to a new format for storing cell expression information data, and disordered data is converted into ordered data, thereby reducing data redundancy and reducing storage costs.

[0136] It should be noted that since the device embodiment of the present disclosure corresponds to the above-mentioned method embodiment, the above-mentioned explanation of the method embodiment is also applicable to the device of the present embodiment, and the principle is the same. For details not disclosed in the device embodiment, reference can be made to the above-mentioned method embodiment, and they will not be repeated in this disclosure.

[0137] Corresponding to the above-mentioned data reading method, the present disclosure also provides a data reading device. Figure 8 FIG. 8 is a schematic diagram of a data reading device 800 provided in an embodiment of the present disclosure. Figure 8 As shown, including:

[0138] An acquisition unit 810 is used to acquire biological data information, where the biological data information includes a cell name, the number of gene expression levels corresponding to each cell, a gene name of each cell and the number of corresponding genes;

[0139] The reading unit 820 is used to classify and read the association between genes and cells and the corresponding number of gene expression levels according to the biological data information.

[0140] In some embodiments, the cell data includes cell logical region information, and the reading unit 820 is used to classify and read the corresponding cell data according to the cell logical region information.

[0141] According to the embodiments of the present disclosure, biological data information is obtained through a data reading device, and the biological data information includes a cell name or a gene name; according to the biological data information, the association between the gene and each cell and the corresponding number of gene expression levels are classified and read, so as to realize the reading of orderly biological data information, accelerate the speed of analysis query, and reduce the analysis cost.

[0142] It should be noted that since the device embodiment of the present disclosure corresponds to the above-mentioned method embodiment, the above-mentioned explanation of the method embodiment is also applicable to the device of the present embodiment, and the principle is the same. For details not disclosed in the device embodiment, reference can be made to the above-mentioned method embodiment, and they will not be repeated in this disclosure.

[0143] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0144] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. 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 processing, 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.

[0145] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded from a storage unit 908 to a RAM (Random Access Memory) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An I / O (Input / Output) interface 905 is also connected to the bus 904.

[0146] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0147] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as methods for data storage and / or data reading. For example, in some embodiments, the methods for data storage and / or data reading may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the aforementioned data storage and / or data reading method in any other appropriate manner (for example, by means of firmware).

[0148] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may 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.

[0149] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0150] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0151] 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).

[0152] The systems and techniques described herein may be implemented in a computing system that includes backend 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 frontend components (e.g., a user computer with 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 backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0153] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0154] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0155] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0156] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data storage method, It is characterized in that The method comprises: receiving a biological data file, and extracting gene data from the biological data file; receiving a mask image file, and acquiring cell data in the mask image file; Performing data statistics on the cell data and the gene data to obtain statistical data; The cell data, the gene data and the statistical data are classified and stored.

2. The method according to claim 1, It is characterized in that The receiving of the mask image file and obtaining the cell data in the mask image file comprises: The mask image file is parsed by image processing to obtain the cell centroid, contour coordinates and intracellular pixel coordinates in the mask image file.

3. The method according to claim 2, It is characterized in that The performing data statistics on the cell data and the gene data to obtain statistical data comprises: Determining the association between the gene data and each cell according to the gene data, the contour coordinates, and the pixel coordinates within the cell; Based on the association between the gene data and the cells, obtaining the name of the gene contained in each cell and the number of gene expression levels corresponding to the gene; The names of cells associated with the gene and the number of gene expression levels of each cell associated with the gene are counted.

4. The method according to claim 3, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data comprises: Count the cell data of each cell into the first array, The cell data of each cell includes the cell serial number, cell centroid, gene data contained in each cell, the sum of gene expression levels of all or part of the genes in the cell, the number of intracellular coordinates, cell area, cell annotation name, and the name of the cell after cluster analysis.

5. The method according to claim 4, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data comprises: The contour coordinates of each cell are counted into the second array. The second array corresponds to the first array one by one.

6. The method according to claim 5, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data further comprises: Extracting annotation information of each cell according to the cell annotation name in the first array; The annotation information of each cell is counted into a third array.

7. The method according to claim 6, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data comprises: According to the gene data contained in each cell in the first array, obtaining the gene name and the corresponding gene number of each cell; The gene name of each cell and the corresponding gene number are counted into a fourth array.

8. The method according to claim 7, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data comprises: The correlation between the gene data and the cells, the gene expression level of the gene, and the maximum gene expression level of the gene are counted into a fifth array.

9. The method according to claim 8, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data further comprises: According to the gene offset and the number of cells, the correlation between the gene data and the cells and the number of gene expression corresponding to each cell are obtained; The cell names and the corresponding gene expression levels are counted in the sixth array.

10. The method according to claim 9, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data further comprises: The cell logic area information is counted into the seventh array.

11. The method according to claim 10, It is characterized in that The classifying and storing the cell data, the gene data and the statistical data comprises: The API is called to write the statistical cell data, gene data and the statistical data into the biological data file.

12. A data reading method, It is characterized in that The method comprises: Acquiring biological data information, wherein the biological data information includes a cell name or a gene name; According to the biological data information, the association between genes and cells and the corresponding number of gene expression levels are classified and read.

13. The method according to claim 12, It is characterized in that The cell data includes cell logical region information, and the classification and reading of the association between genes and cells and the corresponding gene expression quantity according to the biological data information includes: The corresponding cell data is read by classification according to the cell logic area information.

14. A data storage device, It is characterized in that include: A first receiving unit, configured to receive a biological data file and extract gene data from the biological data file; A second receiving unit, used for receiving a mask image file and acquiring cell data in the mask image file; A statistical unit, used for performing data statistics on the cell data and the gene data to obtain statistical data; A storage unit is used to classify and store the cell data, the gene data and the statistical data.

15. A data reading device, It is characterized in that include: An acquisition unit, used to acquire biological data information, wherein the biological data information includes a cell name, a number of gene expression levels corresponding to each cell, a gene name of each cell and a corresponding gene number; The reading unit is used to classify and read the association between genes and cells and the corresponding number of gene expression levels according to the biological data information.

16. An electronic device, It is characterized in that include: 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, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-11 or claims 12-13.

17. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to cause the computer to execute the method according to any one of claims 1-11 or claims 12-13.

18. A computer program product, It is characterized in that A computer program is included which, when executed by a processor, implements the method according to any one of claims 1-11 or claims 12-13.

Citation Information

Patent Citations

  • Single cell transcriptome missing value filling method based on deep hybrid network

    CN110957009A

  • Cell function annotation method, device, equipment and medium

    CN114496099A

  • Gene data processing method and device, computer equipment and storage medium

    CN114765062A

  • Systems and methods for joint interactive visualization of gene expression and DNA chromatin accessibility

    CN115428088A

  • Method and system for identifying spatial transcriptome cell expression pattern

    CN115732034A