Gene data query method and device, and non-volatile storage medium
By receiving user query conditions, obtaining the partition identification and number of samples of the target area, calculating the mutation frequency and querying annotation information, the problem of the inability to store and query multiple cross-product massive variation detection results in the existing technology is solved, and user-defined real-time query of gene data.
Patent Information
- Application Number
- CN202011407630.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-04
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2040-12-04
AI Technical Summary
The prior art cannot effectively store the massive variation detection results across multiple products, resulting in the inability to query based on the complex query conditions set by users and cannot meet personalized computing needs.
By receiving query conditions on the user interface, the partition identification, alleles and samples of the target area are obtained, the mutation frequency is calculated, and the annotation information is queried in the big data platform to achieve massive variation detection results for multiple cross-products. Storage and real-time query.
Real-time query of gene data is realized based on the complex query conditions set by users, satisfying users' requests for cross-product gene data query, and solving the problem of storage and querying of massive variation detection results.
Smart Images

Figure CN112489729B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biological gene query, and in particular to a gene data query method and device, and a non-volatile storage medium. Background Art
[0002] With the rapid development of gene sequencing technology and the substantial decline in sequencing costs, gene sequencing technology is being used more and more widely in the diagnosis, treatment and screening of diseases such as cancer and genetic diseases, and countries are also paying more and more attention to the research on human health.
[0003] Since the length of the human genome is 3 billion bases, a single person's sample can detect millions of gene variants. As the sequencing population continues to expand, samples of different phenotypes or disease subtypes accumulate, making it possible to study a certain segment of the population or disease group to achieve precision treatment. In addition to whole genome sequencing, there is also whole exome sequencing and target region sequencing. These different types of sequencing products cover different areas. How to put their results together for cross-product frequency calculation is a problem that needs to be solved.
[0004] Existing technologies only store calculation results online, so users cannot set complex query conditions to query segmented populations, nor can they perform real-time calculations across products. If you want to meet personalized computing needs, backend personnel need to write programs to recalculate to achieve this.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a genetic data query method and device, and a non-volatile storage medium, so as to at least solve the technical problem in the prior art that it is impossible to effectively store massive mutation detection results across multiple products, resulting in the inability to query according to complex query conditions set by the user.
[0007] According to one aspect of an embodiment of the present invention, a gene data query method is provided, comprising: receiving query conditions input on a user interface, wherein the query conditions include: object information of a query object, a target region or a target site of a gene; based on the query conditions, obtaining a partition identifier corresponding to the target region on the query object gene; obtaining the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation for each site in the target region in the sample gene; calculating the mutation frequency of each site in the target region based on the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation for each site in the target region in the sample gene; querying the mutation frequency of each site in the target region based on the mutation frequency of each site in the target region and each site in the big data platform to obtain annotation information for each site; and displaying any site on the user interface, as well as the corresponding mutation frequency and annotation information.
[0008] Optionally, obtaining the sum of the number of alleles at each site in the target region includes: obtaining the gene mutation record at each site in the target region; performing aggregation and accumulation according to each site in the target region to obtain the number of alleles ac for each mutation, the number of mutated samples sc, the number of homozygous mutation samples, and the number of heterozygous mutation samples; performing aggregation operations according to each site to obtain the sum of the above-mentioned number of alleles at each site.
[0009] Optionally, the number of samples participating in the calculation for each site in the target region of the sample gene is obtained, including: deduplicating the gene mutation records of each site in the target region to obtain a list of all sites, and calculating the product number used for the aggregation operation at each site; finding all file numbers according to the screening conditions of the sample gene, and aggregating and accumulating them according to the product type to obtain the number of samples that each product should participate in the calculation under the predetermined retrieval conditions; aggregating and accumulating the number of samples at each site to generate the number of samples participating in the calculation for each site.
[0010] Optionally, the mutation frequency of each site in the above target region is calculated based on the following formula:
[0011] Among them, ac represents the sum of the number of alleles at each site, total represents the total number of samples, and sd represents the number of samples with missing genotypes.
[0012] Optionally, before obtaining the annotation information of each site, the method further includes: creating the big data platform, wherein the big data platform includes at least one of the following components: a Kudu data warehouse, a Hive data warehouse, a Spark data warehouse and an Impala data warehouse; wherein the Kudu data warehouse stores coverage area information of each sample data, the partition number corresponding to each gene, and the chromosome coordinates corresponding to each partition and its starting and ending coordinates, wherein the coverage area information includes the chromosome number, starting and ending coordinates of each coverage area; and the Hive data warehouse stores annotation information of mutation sites in each partition.
[0013] Optionally, the method further includes: when storing the sample data into the Kudu data warehouse, storing information such as the desensitized sample information, the analysis batch, the product number used in the analysis, and the number of the result file obtained from the analysis in the Kudu data warehouse.
[0014] Optionally, the above method also includes: when storing the sample data into the above Kudu data warehouse, storing the file ID of the mutation result and the corresponding test result in the above Hive data warehouse, and storing them in partitions according to the product number and the partition number on the genome corresponding to the mutation position.
[0015] Optionally, the method further includes: when storing the mutation result in the Hive data warehouse, storing the annotation information of the mutation site in the Hive data warehouse according to partitions, wherein the annotation information includes at least one of the following: the gene corresponding to the mutation site, nucleotide changes, and amino acid changes.
[0016] According to another aspect of an embodiment of the present invention, a gene data query device is also provided, including: a receiving module, used to receive query conditions input on a user interface, wherein the query conditions include: object information of the query object, a target region or a target site of the gene; a first acquisition module, used to obtain a partition identifier corresponding to the target region on the query object gene based on the query conditions; a second acquisition module, used to obtain the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation of each site in the target region in the sample gene; a calculation module, used to calculate the mutation frequency of each site in the target region based on the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation of each site in the target region in the sample gene; a query module, used to query the mutation frequency of each site in the target region and each site in the big data platform based on the mutation frequency of each site, and obtain annotation information of each site; a display module, used to display any site, as well as the corresponding mutation frequency and annotation information on the user interface.
[0017] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium stores a plurality of instructions. The instructions are suitable for being loaded by a processor and executing any one of the above-mentioned gene data query methods.
[0018] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the program is configured to execute any one of the above-mentioned gene data query methods when running.
[0019] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned gene data query methods.
[0020] In an embodiment of the present invention, by receiving a query condition input on a user interface, wherein the query condition includes: object information of a query object, a target region or a target site of a gene; based on the query condition, obtaining a partition identifier corresponding to the target region on the query object gene; obtaining the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation of each site in the target region in the sample gene; calculating the mutation frequency of each site in the target region based on the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation of each site in the target region in the sample gene; querying the mutation frequency of each site in the target region and each site in the big data platform based on the mutation frequency of each site in the target region, and obtaining annotation information of each site; displaying any site, and the corresponding mutation frequency and annotation information on the user interface, by effectively storing a large number of cross-product mutation detection results, the purpose of querying according to the complex query conditions set by the user is achieved, thereby achieving the technical effect of satisfying the user's real-time query request for cross-product gene data, thereby solving the technical problem that the existing technology cannot effectively store a large number of cross-product mutation detection results, resulting in the inability to query according to the complex query conditions set by the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0022] Figure 1 is a flow chart of a gene data query method according to an embodiment of the present invention;
[0023] Figure 2 is a flow chart of an optional gene data query method according to an embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of an optional gene data storage according to an embodiment of the present invention;
[0025] Figure 4 It is a structural schematic diagram of a gene data query device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Example 1
[0029] According to an embodiment of the present invention, an embodiment of a genetic data query method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a flow chart of a gene data query method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0031] Step S102, receiving a query condition input on a user interface, wherein the query condition includes: object information of a query object, a target region or a target site of a gene;
[0032] Step S104, based on the above query conditions, obtaining a partition identifier corresponding to the target region on the query object gene;
[0033] Step S106, obtaining the sum of the number of alleles of each site in the target region and the number of samples participating in the calculation of each site in the target region in the sample gene;
[0034] Step S108, calculating the mutation frequency of each site in the target region based on the sum of the number of alleles of each site in the target region and the number of samples participating in the calculation of each site in the target region in the sample gene;
[0035] Step S110, based on the mutation frequency of each site in the target region, and querying each site in the big data platform, obtaining annotation information of each site;
[0036] Step S112, displaying any site, as well as the corresponding mutation frequency and annotation information on the above user interface.
[0037] In an embodiment of the present invention, by receiving a query condition input on a user interface, wherein the query condition includes: object information of a query object, a target region or a target site of a gene; based on the query condition, obtaining a partition identifier corresponding to the target region on the query object gene; obtaining the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation of each site in the target region in the sample gene; calculating the mutation frequency of each site in the target region based on the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation of each site in the target region in the sample gene; querying the mutation frequency of each site in the target region and each site in the big data platform based on the mutation frequency of each site in the target region, and obtaining annotation information of each site; displaying any site, and the corresponding mutation frequency and annotation information on the user interface, by effectively storing a large number of cross-product mutation detection results, the purpose of querying according to the complex query conditions set by the user is achieved, thereby achieving the technical effect of satisfying the user's real-time query request for cross-product gene data, thereby solving the technical problem that the existing technology cannot effectively store a large number of cross-product mutation detection results, resulting in the inability to query according to the complex query conditions set by the user.
[0038] The gene data query method provided in the embodiment of the present application can be understood as a gene data query method based on the population frequency of gene sites in sequencing data. Optionally, the query conditions include: object information of the query object, target region or target site of the gene.
[0039] As an optional embodiment, the user's query conditions generally include but are not limited to the following parts: 1) sample screening conditions: for example, all Han males with lung cancer; 2) target region or target site: for example, a certain gene or a certain region on a certain chromosome, a certain transcript or a certain mutation.
[0040] In an embodiment of the present application, after receiving the query conditions in the user interface, the partition identification ID (which may be one or two) corresponding to the target area on the query object gene can be obtained based on the above query conditions, and the numerator (that is, the sum of the number of alleles at each site in a specific area in a given population) is calculated, and then the denominator (that is, the number of samples participating in the calculation for each site in a specific area in a given population) is calculated, and the mutation frequency (that is, the mutation frequency of each site in a specific area in a given population) is calculated, that is, based on the mutation frequency of each site in the above target area, the calculation result of each site is jointly queried with the annotation information of the site in the data warehouse to obtain the annotation information of each site, and finally the site, mutation frequency and annotation information are output to the user interface.
[0041] Through the embodiments of the present application, it is possible to solve, but not limited to, the problem of how to store massive mutation detection results across multiple products, for example, how to store data in a large biological database across products, and how to perform complex real-time calculations based on complex search conditions set by users.
[0042] In an optional embodiment, obtaining the sum of the number of alleles at each site in the target region includes:
[0043] Step S202, obtaining the gene mutation record of each site in the target region;
[0044] Step S204, performing aggregation and accumulation according to each site in the above target region to obtain the number of alleles ac for each mutation, the number of mutant samples sc, the number of homozygous mutation samples, and the number of heterozygous mutation samples;
[0045] Step S206, performing aggregation operation on each site to obtain the sum of the above allele numbers of each site.
[0046] In the above optional embodiment, Figure 2 is a flow chart of an optional gene data query method according to an embodiment of the present invention, such as Figure 2As shown in the figure, by querying the region and coordinate information of the partition where the gene gene is located, and then querying the records with the specified partition ID in the target region (that is, included in the chromosome, the start and end coordinates), the file number in the given target population, and the site records with the missing mark not being 1; then aggregation and accumulation are performed according to the site to obtain the number of alleles ac for each mutation, the number of mutant samples sc, the number of homozygous mutation samples (that is, the number of mutant alleles is 2), and the number of heterozygous mutation samples (that is, the number of mutant alleles is 1); finally, find the records with the specified partition ID in the target region (that is, included in the chromosome, the start and end coordinates), the file number in the given target population, and the records with the missing mark being 1, and perform aggregation operations according to the site to obtain the number of uncovered samples sd for each site.
[0047] In an optional embodiment, obtaining the number of samples participating in the calculation for each site in the target region of the sample gene includes:
[0048] Step S302, removing duplicate gene mutation records of each site in the target region to obtain a list of all sites, and calculating the product number for performing the above aggregation operation in each site;
[0049] Step S304, all file numbers are found according to the screening conditions of the sample genes, and are aggregated and accumulated according to product types to obtain the number of samples that should be calculated for each product under the predetermined search conditions;
[0050] Step S306, aggregate and accumulate the number of samples at each site to generate the number of samples participating in the calculation at each site.
[0051] In the above optional embodiment, the gene mutation records of each site in the above target region are removed by duplication to obtain a list of all sites, and the product number that should be involved in the calculation in each site is calculated.
[0052] As an optional embodiment, assuming that pb represents the bed region covered by the product, and zd represents the site, then the product that meets the following conditions is the product that needs to be included in the calculation of the site: pb.chr=zd.chr and pb.start<=zd.pos and pb.`end`>=zd.pos (the bed region has the same chromosome number as the site, and the starting point of the region is before the mutation site, and the end point is after the mutation site, that is, the site falls on a bed segment of the product).
[0053] In the above optional embodiment, Figure 2As shown, all the file numbers are found according to the sample screening conditions, and the number of samples that should be calculated for each product under the specified search conditions is obtained by aggregating and accumulating the number of samples according to the site. The total number of samples that should be calculated for each site can be obtained (including the samples marked as 1 for deletion).
[0054] In an optional embodiment, Figure 2 As shown, the mutation frequency of each site in the above target region is calculated based on the following formula:
[0055] Among them, ac represents the sum of the number of alleles at each site, total represents the total number of samples, and sd represents the number of samples with missing genotypes.
[0056] In an optional embodiment, before obtaining the annotation information of each site, the method further includes:
[0057] Step S402, creating the above-mentioned big data platform, wherein the above-mentioned big data platform includes at least one of the following components: Kudu data warehouse, Hive data warehouse, Spark data warehouse and Impala data warehouse;
[0058] The Kudu data warehouse stores coverage area information of each sample data, the partition number corresponding to each gene, and the chromosome coordinates corresponding to each partition and its starting and ending coordinates, wherein the coverage area information includes the chromosome number, starting and ending coordinates of each coverage area; the Hive data warehouse stores annotation information of mutation sites in each partition.
[0059] In the above optional embodiments, it is possible but not limited to build a Hadoop-based big data platform, including components such as Kudu data warehouse, Hive data warehouse, Spark data warehouse, Impala data warehouse, etc.
[0060] Furthermore, in the embodiments of the present application, the open source distributed database Apache Kudu can be used to store detailed information of the samples, and the open source data warehouse Apache Hive can be used to store massive amounts of gene variation detection results and annotation information; the open source computing engine Apache Impala can be used to perform real-time computing and return the computing results.
[0061] In order to improve storage and query efficiency and meet real-time query requests across products, the embodiments of the present application take the following points into consideration when storing: 1) The panel coverage areas of different products are stored in the database, which is needed to determine whether a certain product is involved in the calculation when calculating the frequency of a certain site; 2) When data is stored in the data warehouse, partitioning and bucketing are used. During real-time calculation, partition information is calculated first to speed up the calculation; 3) When storing genetic test results, only information on mutation sites and missing sites (i.e., mutations cannot be determined due to insufficient coverage depth or other reasons) is stored.
[0062] It should be noted that the mutation site needs to store the homozygous and heterozygous states, and the mutation frequency will also be stored for somatic mutations. The missing sites will be removed from the calculation during real-time calculation.
[0063] Figure 3 is a schematic diagram of an optional gene data storage according to an embodiment of the present invention, such as Figure 3 As shown, data storage is divided into two parts: Kudu data warehouse (such as the Kudu database shown in the figure) and Hive data warehouse. The computing engine Impala is responsible for real-time computing, and Spark regularly calculates common computing results for query. The data table sample_file_product_table will store sample information, which product it applies to, the corresponding file number and other information; gene_region_grch37 mainly stores gene partition information. When querying a gene, you need to find the partition first; and panel_bed mainly stores the area information covered by each product, which is needed when calculating the denominator; germline_snv_indel_file_GRCh37 mainly stores mutation information in each file, and file_id is associated with sample_file_product_table. Germline_snv_indel_anno_GRCh37 mainly stores annotation information for each site, and mutation_id is associated with germline_snv_indel_file_GRCh37; these two tables stored in the Hive data warehouse are stored by region according to the partition ID in gene_region_grch37.
[0064] In an optional embodiment, the above method further includes:
[0065] Step S502, when storing the sample data into the above-mentioned Kudu data warehouse, the anonymized sample information, the analysis batch, the product number used in the analysis, and the number of the result file obtained by the analysis and other information are stored in the above-mentioned Kudu data warehouse.
[0066] In an embodiment of the present application, the coverage area information of each product, that is, the chromosome number, start and end coordinates of each coverage area, may be stored in advance in the Kudu database.
[0067] In addition, as an optional embodiment, the entire genome may be partitioned in advance, and the partition number corresponding to each gene, as well as the chromosome coordinates corresponding to each partition and its start and end coordinates are stored in Kudu.
[0068] In an optional embodiment, the above method further includes:
[0069] Step S602, when storing the sample data in the above-mentioned Kudu data warehouse, the file ID of the mutation result and the corresponding test result are stored in the above-mentioned Hive data warehouse, and when storing, the partition storage is performed according to the product number and the partition number on the genome corresponding to the mutation position.
[0070] In the above optional embodiment, when data is entered into the database, the anonymized sample information, the analysis batch, the product number used in the analysis, and the number of the result file obtained by the analysis and other information are stored in the Kudu database.
[0071] It should be noted that, in the embodiment of the present application, the reason for storing the sample information in Kudu is that it can be easily modified and deleted, and the problems existing during storage can be corrected.
[0072] In an optional embodiment, the above method further includes:
[0073] Step S702, when storing the mutation result in the Hive data warehouse, the annotation information of the mutation site is stored in the Hive data warehouse according to the partition, wherein the annotation information includes at least one of the following: the gene corresponding to the mutation site, the nucleotide change, and the amino acid change.
[0074] In the above optional embodiment, when the mutation result is stored in the warehouse, the file ID of the mutation result and the corresponding test result are stored in the Hive data warehouse. When storing, the partition storage is performed according to the partition number on the genome corresponding to the product number and the mutation position, and the annotation information of the mutation site (i.e., the gene corresponding to a certain mutation site, nucleotide change, amino acid change) is stored in the Hive data warehouse according to the partition.
[0075] As an optional implementation, the storage structure of the partition storage may be, but is not limited to, as follows:
[0076] The first column: product ID, i.e. product code, which is used as the first-level partition;
[0077] The second column: Partition ID, that is, the partition number corresponding to the mutation site on the genome, which is used as the second-level partition;
[0078] The third column: file number, which must correspond to the file number stored in Kudu;
[0079] Fourth column: chromosome number;
[0080] The fifth column: chromosome coordinates, i.e. the starting coordinates of the mutation on the chromosome;
[0081] The sixth column: Ref: the base in the genome;
[0082] The seventh column: Alt: the type of base that has been mutated. (If the site cannot be determined, it can be written as .);
[0083] Column 8: number of mutant alleles (0 for no mutation, 1 for heterozygous, and 2 for homozygous mutation);
[0084] Column 9: mutation frequency;
[0085] Column 10: Missing marker. If the genotype of the site cannot be determined, it needs to be marked as 1.
[0086] As an optional embodiment, the storage rules for storing the mutation results in the Hive data warehouse can be, but are not limited to, as follows: within the coverage area of the Panel (there is also a coverage area for WGS, i.e., the part after removing the N region and the repeat region on the reference genome), if a site has not mutated (i.e., consistent with the reference genotype), it does not need to be stored. If a mutation occurs, a row of information needs to be stored. If the genotype of the site is unknown (possibly due to insufficient sequencing depth or other reasons), a row also needs to be stored. When storing, the mutated base type is set to "." and the missing is marked as 1. That is to say, for a site in the Panel coverage area, if it is not in the data warehouse, it must be a wild-type gene.
[0087] In an embodiment of the present application, after a batch of data is stored in the warehouse, the Spark computing engine can be used to calculate the frequently-queried requirements (such as the mutation frequency of all healthy people or all cancer patients, etc.) and place them in the Hive data warehouse. When the user queries, if the requirement is met, the query result is directly given.
[0088] There are two products that cover different areas, and there may be missing data in the covered areas. The calculation of mutation frequency requires calculating the numerator and denominator separately. The numerator is the sum of the number of mutated alleles, and the denominator needs to consider the covered products (for example, for the B site, two products need to be considered) and the number of missing data when calculating the denominator.
[0089] Freq=sum(ac) / ((total-dele)*2)
[0090] Among them, freq represents the mutation frequency, ac represents the number of mutated alleles, total represents the total number of samples covered by the site, and dele represents the number of samples with missing data.
[0091] Frequency of A: freq_A = (0+1+2) / ((4-1)*2) = 0.5
[0092] Frequency of B: freq_B = (0+0+1+0+1+0+0+0+1) / ((10-1)*2) = 0.167
[0093] Frequency of C: freq_C = (0+1+1+0+0) / ((6-1)*2) = 0.2
[0094] It should be noted that, through the embodiments of the present application, it is possible to solve and provide the problem of storing the panel coverage areas of different products in the database and the calculation method used when calculating the population frequency across products; when storing the mutation detection results, different storage methods are adopted for homozygous mutations, heterozygous mutations, no mutations and unknown results, as well as a data processing method for removing unknown sites from the denominator during calculation; store the mutation results and annotation results according to partitions, and when querying the data, first calculate the partition ID, and then query and calculate according to the partition.
[0095] Furthermore, through the genetic data query method provided in the embodiment of the present application, fast customized real-time query can be achieved; the database contains the original variation results, which is suitable for further data mining; the embodiment of the present application can integrate different types of products for cross-product calculations and has a wide range of applications.
[0096] It should be noted that this application has been tested on a large scale at the beginning of its design. The test method uses three cloud servers with the same ECS configuration (16G8 cores and 1T hard disk) to simulate 100,000 wes samples, each containing 100,000 mutation site information and basic attribute information. Through the combination of different query conditions, the results are obtained in seconds, which meets the requirements at the beginning of the design. After that, it was tested in the actual production environment and ran stably. In the test, all mutation sites on the EGFR gene were queried in a population of 100,000, and the execution time of the SQL query statement was about 4s.
[0097] Example 2
[0098] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the above gene data query method. Figure 4 is a schematic diagram of the structure of a gene data query device according to an embodiment of the present invention. Figure 4As shown, the gene data query device includes: a receiving module 400, a first acquisition module 402, a second acquisition module 404, a calculation module 406, a query module 408 and a display module 410, wherein:
[0099] A receiving module 400 is used to receive query conditions input on a user interface, wherein the query conditions include: object information of a query object, a target region or a target site of a gene; a first acquisition module 402 is used to acquire a partition identifier corresponding to a target region on a gene of a query object based on the query conditions; a second acquisition module 404 is used to acquire the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation for each site in the target region in the sample gene; a calculation module 406 is used to calculate the mutation frequency of each site in the target region based on the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation for each site in the target region in the sample gene; a query module 408 is used to query the mutation frequency of each site in the target region and each site in the big data platform based on the mutation frequency of each site in the target region, and obtain annotation information for each site; a display module 410 is used to display any site, and the corresponding mutation frequency and annotation information on the user interface.
[0100] It should be noted that the above modules can be implemented by software or hardware. For example, for the latter, it can be implemented in the following ways: the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0101] It should be noted that the receiving module 400, the first acquisition module 402, the second acquisition module 404, the calculation module 406, the query module 408 and the display module 410 correspond to steps S102 to S112 in Example 1, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the modules as part of the device can be run in a computer terminal.
[0102] It should be noted that the optional or preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0103] The above-mentioned genetic data query device may also include a processor and a memory. The above-mentioned receiving module 400, the first acquisition module 402, the second acquisition module 404, the calculation module 406, the query module 408 and the display module 410 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0104] The processor includes a kernel, which retrieves the corresponding program unit from the memory. The kernel may be one or more. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory includes at least one memory chip.
[0105] According to an embodiment of the present application, an embodiment of a non-volatile storage medium is also provided. Optionally, in this embodiment, the non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute any one of the gene data query methods.
[0106] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group, and the non-volatile storage medium includes a stored program.
[0107] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: receiving query conditions input on the user interface, wherein the query conditions include: object information of the query object, target region or target site of the gene; based on the query conditions, obtaining a partition identifier corresponding to the target region on the query object gene; obtaining the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation for each site in the target region in the sample gene; calculating the mutation frequency of each site in the target region based on the sum of the number of alleles of each site in the target region, and the number of samples participating in the calculation for each site in the target region in the sample gene; based on the mutation frequency of each site in the target region, and each site in the big data platform, querying to obtain annotation information of each site; displaying any site on the user interface, as well as the corresponding mutation frequency and annotation information.
[0108] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: obtain the gene mutation record of each site in the above-mentioned target area; perform aggregation and accumulation according to each site in the above-mentioned target area to obtain the number of alleles ac for each mutation, the number of mutant samples sc, the number of homozygous mutation samples, and the number of heterozygous mutation samples; perform aggregation operations according to each site to obtain the sum of the above-mentioned allele numbers at each site.
[0109] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: deduplicate the gene mutation records of each site in the above-mentioned target area to obtain a list of all sites, and calculate the product number used for the above-mentioned aggregation operation in each site; find all file numbers according to the screening conditions of the above-mentioned sample genes, and aggregate and accumulate them according to the product type to obtain the number of samples that each product should participate in the calculation under the predetermined retrieval conditions; aggregate and accumulate the number of samples at each site to generate the number of samples participating in the calculation at each site.
[0110] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following function: the mutation frequency of each site in the above target region is calculated based on the following formula:
[0111] Among them, ac represents the sum of the number of alleles at each site, total represents the total number of samples, and sd represents the number of samples with missing genotypes.
[0112] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: create the above-mentioned big data platform, wherein the above-mentioned big data platform includes at least one of the following components: Kudu data warehouse, Hive data warehouse, Spark data warehouse and Impala data warehouse; wherein the above-mentioned Kudu data warehouse stores the coverage area information of each sample data, the partition number corresponding to each gene, and the chromosome coordinates corresponding to each partition and its starting and ending coordinates, wherein the above-mentioned coverage area information includes the chromosome number, starting and ending coordinates of each coverage area; the above-mentioned Hive data warehouse stores the annotation information of the mutation sites in each partition.
[0113] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: when the sample data is stored in the above-mentioned Kudu data warehouse, the anonymized sample information, analysis batch, product number used in the analysis, and the number of the result file obtained by the analysis and other information are stored in the above-mentioned Kudu data warehouse.
[0114] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: when the sample data is stored in the above-mentioned Kudu data warehouse, the file ID of the mutation result and the corresponding test result are stored in the above-mentioned Hive data warehouse, and when storing, the partition storage is performed according to the partition number on the genome corresponding to the product number and the mutation position.
[0115] Optionally, when the program is running, the device where the non-volatile storage medium is located is controlled to perform the following functions: when the mutation result is stored in the Hive data warehouse, the annotation information of the mutation site is stored in the Hive data warehouse according to the partition, wherein the annotation information includes at least one of the following: the gene corresponding to the mutation site, the nucleotide change, and the amino acid change.
[0116] According to an embodiment of the present application, an embodiment of a processor is also provided. Optionally, in this embodiment, the processor is used to run a program, wherein the program executes any one of the gene data query methods when it is run.
[0117] According to an embodiment of the present application, an embodiment of an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned genetic data query methods.
[0118] According to an embodiment of the present application, an embodiment of a computer program product is also provided. When executed on a data processing device, it is suitable for executing a program that initializes any one of the steps of the above-mentioned genetic data query method.
[0119] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0120] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0121] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the above-mentioned units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0122] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0123] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0124] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable non-volatile storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a non-volatile storage medium, including a number of instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the above-mentioned methods of each embodiment of the present invention. The aforementioned non-volatile storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0125] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A query method based on gene data, characterized in that: include: Receiving query conditions input on a user interface, wherein the query conditions include: object information of a query object, a target region or a target site of a gene; Based on the query condition, obtaining a partition identifier corresponding to a target region on the query object gene; Obtaining the sum of the number of alleles at each site in the target region and the number of samples participating in the calculation at each site in the target region in the sample gene; Based on the sum of the number of alleles at each site in the target region and the number of samples participating in the calculation for each site in the target region in the sample gene, the mutation frequency of each site in the target region is calculated; Based on the mutation frequency of each site in the target region, and querying each site in the big data platform, obtaining annotation information of each site; Displaying any site on the user interface, as well as corresponding mutation frequency and annotation information; Before obtaining the annotation information of each site, the method further includes: creating the big data platform, wherein the big data platform includes: a Kudu data warehouse and a Hive data warehouse; wherein the Kudu data warehouse stores the coverage area information of each sample data, the partition number corresponding to each gene, and the chromosome coordinates corresponding to each partition and its starting and ending coordinates, wherein the coverage area information includes the chromosome number, starting and ending coordinates of each coverage area; and the Hive data warehouse stores the annotation information of the mutation sites in each partition; Obtaining the sum of the number of alleles at each site in the target region, including: obtaining a gene mutation record at each site in the target region; performing aggregation and accumulation according to each site in the target region to obtain the number of alleles ac for each mutation, the number of mutant samples sc, the number of homozygous mutation samples, and the number of heterozygous mutation samples; performing aggregation operations according to each site to obtain the sum of the number of alleles at each site; Obtaining the number of samples participating in the calculation for each site in the target region of the sample gene, including: De-duplicate the gene mutation records of each site in the target region to obtain a list of all sites, and calculate the product number used for the aggregation operation in each site; find all file numbers according to the screening conditions of the sample gene, aggregate and accumulate according to the product type, and obtain the number of samples that should be calculated for each product under the predetermined search conditions; aggregate and accumulate the number of samples at each site to generate the number of samples participating in the calculation at each site; The mutation frequency of each site in the target region is calculated based on the following formula: Among them, sum(ac) represents the sum of the number of mutated alleles at each site, total represents the total number of samples, and sd represents the number of samples with missing genotypes.
2. The method according to claim 1, characterized in that The big data platform also includes at least one of the following components: a Spark data warehouse and an Impala data warehouse.
3. The method according to claim 2, characterized in that The method further comprises: When the sample data is stored in the Kudu data warehouse, the anonymized sample information, the analysis batch, the product number used in the analysis, and the number of the result file obtained by the analysis and other information are stored in the Kudu data warehouse.
4. The method according to claim 3, characterized in that The method further comprises: When the sample data is stored in the Kudu data warehouse, the file ID of the mutation result and the corresponding test result are stored in the Hive data warehouse, and when storing, the partitions are stored according to the product number and the partition number on the genome corresponding to the mutation position.
5. The method according to claim 4, characterized in that The method further comprises: When storing the mutation result in the Hive data warehouse, the annotation information of the mutation site is stored in the Hive data warehouse according to the partition, wherein the annotation information includes at least one of the following: the gene corresponding to the mutation site, the nucleotide change, and the amino acid change.
6. A gene data query device, characterized in that: include: A receiving module, used to receive query conditions input on a user interface, wherein the query conditions include: object information of a query object, a target region or a target site of a gene; A first acquisition module, used to acquire a partition identifier corresponding to a target region on a query object gene based on the query condition; The second acquisition module is used to obtain the sum of the number of alleles of each site in the target region and the number of samples participating in the calculation of each site in the target region in the sample gene; A calculation module, used to calculate the mutation frequency of each site in the target region based on the sum of the number of alleles at each site in the target region and the number of samples participating in the calculation at each site in the target region in the sample gene; A query module, used to query the mutation frequency of each site in the target region and each site in the big data platform to obtain annotation information of each site; A display module, used to display any site, as well as the corresponding mutation frequency and annotation information on the user interface; The device is further used to create the big data platform, wherein the big data platform includes: Kudu data warehouse, Hive data warehouse; wherein the Kudu data warehouse stores the coverage area information of each sample data, the partition number corresponding to each gene, and the chromosome coordinates corresponding to each partition and its starting and ending coordinates, wherein the coverage area information includes the chromosome number, starting and ending coordinates of each coverage area; the Hive data warehouse stores the annotation information of the mutation sites in each partition; The second acquisition module is further used to obtain the gene mutation record of each site in the target region; perform aggregation and accumulation according to each site in the target region to obtain the number of alleles ac for each mutation, the number of mutant samples sc, the number of homozygous mutation samples, and the number of heterozygous mutation samples; perform aggregation operation according to each site to obtain the sum of the number of alleles at each site; The calculation module is further used to remove duplicate gene mutation records at each site in the target region, obtain a list of all sites, and calculate the product number used for the aggregation operation at each site; find all file numbers according to the screening conditions of the sample gene, and aggregate and accumulate according to the product type to obtain the number of samples that should be calculated for each product under the predetermined search conditions; aggregate and accumulate the number of samples at each site to generate the number of samples participating in the calculation at each site; The calculation module is also used to calculate the mutation frequency of each site in the target region based on the following formula: Among them, sum(ac) represents the sum of the number of mutated alleles at each site, total represents the total number of samples, and sd represents the number of samples with missing genotypes.
7. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the genetic data query method according to any one of claims 1 to 5.
8. A processor, characterized in that: The processor is used to run a program, wherein the program is configured to execute the gene data query method according to any one of claims 1 to 5 when running.
9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the genetic data query method according to any one of claims 1 to 5.
