Genotype data compression and retrieval method, device and equipment and computer readable storage medium

By compressing, encoding, and clustering genotype data, and creating joint indexes in non-relational databases, we solve the problems of high storage costs and low retrieval efficiency caused by the large scale of genotype file data, and achieve efficient data Storage and fast retrieval.

CN118692573APending Publication Date: 2024-09-24HUAZHI RICE BIO TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410695989.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

The data scale of existing genotype files is huge, resulting in high storage costs and low retrieval efficiency. Especially when the species reference genome is large or the number of VCF rows and columns is large, it is difficult to quickly find the sample genotype information in a specific site or segment.

Method used

Genotype data is processed using efficient compression, encoding, clustering, and sorting methods, and is stored in a non-relational database to achieve fast retrieval through database joint indexing. Specific steps include using bgzip and tabix for data compression and indexing, data format conversion and encoding, clustering and block sorting compression transformation algorithms, and finally creating a joint index in a non-relational database to speed up retrieval.

Benefits of technology

It effectively reduces the storage space of genotype data, improves data storage and retrieval efficiency, reduces storage costs, and accelerates retrieval speed based on chromosome position intervals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118692573A
    Figure CN118692573A
Patent Text Reader

Abstract

The invention provides a genotype data compression and retrieval method, device and equipment and a computer readable storage medium. The method comprises the following steps: compressing original genotype data; encoding the compressed genotype data; storing the coded genotype data in a non-relational database; and quickly retrieving the genotype data meeting a preset condition from the non-relational database. In the scheme provided by the embodiment of the invention, the large sample genotype information is effectively compressed by using efficient compression, coding, clustering, sorting and other methods, so that the storage space of multi-sample genotype data is reduced, and the genotype information is beneficial to subsequent processing such as storage, retrieval and the like. And through database joint indexing, the retrieval speed based on the chromosome position interval is accelerated, and the database query efficiency is improved. And finally, genotype information of all samples is obtained through a rapid decoding algorithm, so that the gene data storage cost is greatly reduced, and the data retrieval analysis efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data storage, and in particular to a genotype data compression and retrieval method, device, equipment and computer-readable storage medium. Background Art

[0002] As sequencing technology matures, the cost of sequencing continues to decrease, and the data from gene sequencing is growing exponentially. Genotype files are important basic files for genome variation research.

[0003] The most widely used genotype file in current research is the VCF format genotype file, but it generally contains a large number of variant sites and samples, resulting in a large number of rows and columns in the file. At the same time, the scale of the data is also huge. The VCF file of a large sequencing project can reach hundreds of GB, or even larger, so an efficient compression method is still needed. When the species reference genome is large, or the number of VCF rows and columns is large, it cannot meet the needs of quickly finding the genotype information of a certain site or sample in a certain segment from the genotype file, and it is not suitable for fine retrieval of sites. This greatly increases the cost of data storage and reduces the efficiency of data analysis. Summary of the invention

[0004] Multiple aspects of the present application provide a genotype data compression and retrieval method, device, equipment and computer-readable storage medium, which effectively compresses large sample genotype information by using efficient compression, encoding, clustering, sorting and other methods, and improves database query efficiency through database joint indexing, thereby solving the technical problems of high storage cost and low retrieval efficiency of genetic data files in the prior art.

[0005] In order to achieve the above technical effects, one aspect of the present application provides a genotype data compression and retrieval method, comprising:

[0006] Compress the original genotype data;

[0007] Encode the compressed genotype data;

[0008] Storing the encoded genotype data in a non-relational database;

[0009] Genotype data meeting preset conditions are quickly retrieved from the non-relational database.

[0010] According to a preferred embodiment of the present invention, compressing the original genotype data further comprises:

[0011] Use bgzip to compress the original genotype data, and use tabix to create an index for the compressed genotype data;

[0012] Convert the data format of the compressed genotype data.

[0013] According to a preferred embodiment of the present invention, the data format conversion of the compressed genotype data further comprises:

[0014] Decomposing the variant site information in the compressed genotype data into different types of field information;

[0015] Determine the mutation type of the mutation site according to the field information;

[0016] Converting the genotype according to the genotype field in the field information;

[0017] A target format is generated according to the variation type and the genotype.

[0018] According to a preferred embodiment of the present invention, encoding the compressed genotype data further comprises:

[0019] Use clustering methods to sort genotype data samples;

[0020] Convert genotype data samples to single character representation;

[0021] According to the clustering results, the continuous genotype data belonging to the same cluster were merged and represented as coding sequences;

[0022] The sorted code sequence is transformed using block sort compression transformation.

[0023] According to a preferred embodiment of the present invention, after converting the sorted coding sequence using a block sorting compression transformation algorithm, the method further comprises: replacing the continuously repeated character sequence with a preset special character and recording the number of repetitions.

[0024] According to a preferred embodiment of the present invention, storing the encoded genotype data in a non-relational database further comprises:

[0025] Parse the encoded genotype data file information;

[0026] Extracting key information of a preset type from the genotype data file information;

[0027] Create a document for each variant based on the extracted key information;

[0028] Each mutated document is inserted into the non-relational database.

[0029] According to a preferred embodiment of the present invention, the step of quickly retrieving genotype data that meets preset conditions from the non-relational database further comprises:

[0030] Creating a joint index in the non-relational database;

[0031] Rapidly retrieve genotype data codes that meet preset conditions according to the combined index;

[0032] The genotype data encoding is subjected to block sorting compression inverse transformation, and the encoding character string is parsed to obtain the original genotype data character string.

[0033] Another aspect of the present application provides a genotype data compression and retrieval device, comprising:

[0034] A data compression module is used to compress the original genotype data;

[0035] A data encoding module, used for encoding the compressed genotype data;

[0036] A data storage module, used for storing the encoded genotype data into a non-relational database;

[0037] The data retrieval module is used to quickly retrieve genotype data that meets preset conditions from the non-relational database.

[0038] Another aspect of the present application provides a genotype data compression and retrieval electronic device, the device comprising:

[0039] at least one processor; and

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

[0041] 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 described above.

[0042] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the above method.

[0043] In the solution provided by the embodiment of the present application, by using efficient compression, encoding, clustering, sorting and other methods, the genotype information of large samples is effectively compressed, thereby reducing the storage space of multi-sample genotype data, making the genotype information conducive to subsequent processing such as storage and retrieval. And through the joint index of the database, the retrieval speed based on the chromosome position interval is accelerated, and the database query efficiency is improved. Finally, the genotype information of all samples is obtained through a fast decoding algorithm, which greatly reduces the cost of gene data storage and improves the efficiency of data retrieval and analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0046] Figure 1 A flowchart of a genotype data compression and retrieval method provided in one embodiment of the present application;

[0047] Figure 2 A schematic diagram of a genotype data compression and retrieval device provided in one embodiment of the present application;

[0048] Figure 3 The present invention is a schematic diagram of the structure of a device suitable for implementing the solution in the embodiment of the present application.

[0049] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.

[0052] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0053] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0054] In actual scenarios, the execution subject of the method can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0055] In order to implement the scheme of the present invention, the present invention provides a genotype data compression and retrieval method, device, equipment and computer-readable storage medium. By using efficient compression, encoding, clustering, sorting and other methods, the genotype information of large samples is effectively compressed, and the database joint index is used to accelerate the retrieval speed based on the chromosome position interval, improve the database query efficiency, and finally obtain the genotype information of all samples through a fast decoding algorithm.

[0056] Figure 1 A flowchart of a genotype data compression and retrieval method provided in one embodiment of the present application is shown in FIG. Figure 1 As shown, the genotype data compression and retrieval method at least includes the following steps:

[0057] S101. Compress the original genotype data.

[0058] Specifically, the original VCF file is large. For example, for species with large genomes, the number of variant sites may reach tens of millions. The number of samples collected may reach hundreds or even thousands. The data size may be a matrix with tens of millions of rows and thousands of columns. For example:

[0059]

[0060] Therefore, an efficient compression algorithm is required. The embodiment of the present invention uses bgzip to compress the original genotype data. It combines the functions of gzip and tabix and can compress and index VCF files.

[0061] S1011. Compress VCF files

[0062] bgzip can efficiently compress VCF files while maintaining their random access capabilities.

[0063] The command is: `bgzip -c input.vcf>input.vcf.gz`

[0064] Among them, the `-c` option means outputting the compression result to standard output (stdout), which can be saved as a new compressed file `input.vcf.gz` through redirection `>`.

[0065] It splits the input file into multiple small blocks and compresses each block independently, which allows fast access to specific parts even in the case of compressed files.

[0066] S1012, Use tabix to create an index

[0067] For fast retrieval, the `tabix` tool is used to create an index of the compressed VCF file.

[0068] The command is: `tabix -p vcf input.vcf.gz`

[0069] The -p vcf option specifies the file format as VCF and tells tabix how to parse the file to create an index.

[0070] The working principle of tabix is ​​to read each block in the compressed file, record the starting position of each block and the offset inside the file corresponding to that position. When a specific area of ​​the file needs to be accessed, it can directly locate the block at the beginning of this area, thus achieving fast retrieval.

[0071] S1013. Convert the data format of the compressed genotype data.

[0072] In order to further reduce data storage costs and improve data analysis efficiency and data readability, it is necessary to convert the data format. The specific steps are as follows:

[0073] (1) Decomposition of input data

[0074] First, decompose each variant site information in the input data into the following fields of different types:

[0075] chromosome

[0076] Location

[0077] Reference base

[0078] Alternative bases

[0079] genotype

[0080] (2) Determine the mutation type of the mutation site according to the field information

[0081] Determine the type of variation based on the reference base and the alternative base:

[0082] SNP: Both the reference base and the alternative base are single bases

[0083] InDel: The reference base and the alternative base have different lengths

[0084] SV: variant length greater than 50 bp

[0085] CNV: copy number variation

[0086] (3) According to the genotype field in the field information, convert the genotype

[0087] 0 / 0: homozygous reference

[0088] 0 / 1: Heterozygous

[0089] 1 / 1: homozygous substitution

[0090] (4) Generate a target format based on the mutation type and the genotype

[0091] SNP

[0092] Homozygous reference: Repeat the reference base twice

[0093] Heterozygous: Output the reference base and the alternative base once each

[0094] Homozygous substitution: Repeat the substituted base twice

[0095] InDel

[0096] The reference base and the alternative base are the same length: Output the reference base and the alternative base

[0097] The reference base and the alternative base are different lengths: Output the variant type and length

[0098] SV

[0099] Output variant type and length

[0100] CNV

[0101] Output variant type and copy number

[0102] In addition, special situations may occur during the data format conversion process, which are handled as follows:

[0103] For multi-allelic loci, all allele combinations are output

[0104] For unknown variant types, output "**"

[0105] For missing data, output "-"

[0106] For example: The following is an example of the conversion of the first variant site in the original data VCF compressed file:

[0107] Input data: 0 / 1:37,11:48:99:01:1908G C:351,0,1521

[0108] Decomposing the input data

[0109] Chromosome: 11

[0110] Location: 4899

[0111] Reference base: G

[0112] Alternative base: C

[0113] Genotype: 0 / 1

[0114] Determine the type of variation

[0115] Variant Type: SNP

[0116] Convert genotype

[0117] Genotype: Heterozygous

[0118] Generate target format

[0119] Target format: GC

[0120] After the conversion is completed, the genotype data is subsequently processed.

[0121] S102. Encode the compressed genotype data.

[0122] Use clustering methods to determine sample order and encode genotype data. Specifically, first preprocess the data to remove missing values: For missing genotype data, certain strategies can be adopted to fill or directly delete them. Handle outliers: Detect and handle outliers, such as checking whether there is unreasonable genotype data.

[0123] S1021. Sort genotype data samples using clustering methods.

[0124] (1) Determine the clustering criteria: Before you start, make sure you have a clear clustering criterion, for example, whether to cluster based on genotype frequency.

[0125] (2) Execute clustering algorithm

[0126] Choose an appropriate clustering algorithm. Common algorithms include hierarchical clustering or density-based clustering methods (such as DBSCAN). Take density-based clustering methods (such as DBSCAN) as an example.

[0127] The DBSCAN algorithm is a density-based clustering algorithm that can identify clusters of any shape and can handle noisy data. The main concepts of DBSCAN are core points, boundary points, and noise points.

[0128] Core points: Points with a number exceeding MinPts within the radius Eps.

[0129] Boundary points: The number of points within the radius Eps is less than MinPts, but falls within the neighborhood of the core point.

[0130] Noise point: a point that is neither a core point nor a boundary point.

[0131] The basic steps of the DBSCAN algorithm are:

[0132] For each point in the database, the algorithm calculates the number of points in the Eps neighborhood of this point to see if it reaches MinPts;

[0133] If the number of points in the Eps neighborhood of a point reaches MinPts, a new cluster with this point as the core point is created;

[0134] Then recursively add all points in the neighborhood of the core point Eps to the cluster, which may also be core points themselves;

[0135] If a point is not a core point, but falls in the Eps neighborhood of a core point of a known cluster, then this point is also added to the cluster as a boundary point;

[0136] Repeat the above process until all points have been visited.

[0137] Formula for DBSCAN:

[0138] For a given point p, the number of points in its neighborhood (including itself) must satisfy: |N Eps (p)|≥MinPts, where N Eps(p) represents the set of points in the Eps neighborhood of point p.

[0139] (3) Determine the sample order of output genotype encoding based on the clustering results.

[0140] S1022. Convert the genotype data sample into a single character representation.

[0141] Coding can effectively reduce the space required for data storage. Specific coding methods can simplify complex genotype information into smaller data representations, thereby improving the efficiency of data storage and transmission, while also enhancing data processing speed.

[0142] A unified coding scheme is used here to convert genotypes into single-character representations.

[0143] First, define the encoding rules: Assume that the encoding rules are defined as follows:

[0144]

[0145] Secondly, according to the encoding rules, the genotype information of the converted file is encoded, and the encoded characters are output according to the sample order obtained in step S1021. For example,

[0146] The sample genotype information of one locus in the converted file is: AT; TT; AT; GG; AA; TT, and the corresponding samples are: Sample1; Sample2; Sample3; Sample4; Sample5; Sample6; after clustering and sorting, the sample order is: Sample1; Sample3; Sample2; Sample6; Sample4; Sample5, according to the following encoding rules:

[0147] "AT"->"B"

[0148] "TT"->"T"

[0149] "CC"->"C"

[0150] "GG"->"G"

[0151] The output sorted and encoded genotype characters are: BBTTGA.

[0152] S1023. According to the clustering result, the continuous genotype data belonging to the same cluster are combined and represented as a coding sequence.

[0153] According to the clustering results, data storage is optimized. For example, continuous genotype data belonging to the same cluster can be combined to reduce data redundancy. For example, BBTTGA in 2.1.3 can be converted to B2T2GA through the rule of run-length encoding. Multiple consecutive identical genotypes can significantly reduce the number of genotype encoding characters.

[0154] The encoded and sorted data are as follows:

[0155]

[0156] S1024: Convert the sorted coding sequence using block sorting compression transformation.

[0157] The sorted coding sequence is transformed using the block sorting compression BWT (Burrows-Wheeler Transform). The BWT transform converts the original sequence into the last column of its circular suffix array, which increases the probability of the same characters appearing adjacently. Due to the characteristics of the BWT transform, coding fragments with similar structures will be clustered in a compact coding sequence, thereby achieving a tighter arrangement of the coding sequence.

[0158] The compact sequence after BWT transformation is as follows:

[0159]

[0160] Preferably, after converting the sorted coding sequence using the block sorting compression transformation algorithm, step S1025 may be performed to replace the continuously repeated character sequence with a preset special character and record the number of repetitions.

[0161] Using a rule similar to run-length encoding, a sequence of characters that appear continuously and repeatedly is replaced with a specific special character, and the number of repetitions is recorded. In this way, the repeated information in the original data can be effectively compressed and a run-length encoding sequence can be generated. The final encoded information consists of data processed by compact encoding and run-length encoding, with a small code length and efficient storage characteristics.

[0162] The final coding sequence is as follows:

[0163]

[0164] S103, storing the encoded genotype data in a non-relational database.

[0165] Specifically, S1031, parse the encoded genotype data file information.

[0166] Parsing VCF files: VCF files contain information about the variant, including a header file (which defines the file format and metadata) and data lines (each line represents a variant, including information such as position, ID, reference base, variant base, etc.).

[0167] (1) Read the header file: The header file contains the VCF version information and the meaning of each column of data. This is necessary to understand each column of data in the data row.

[0168] (2) Parsing data rows: Each data row includes fields such as chromosome position, ID, reference base, variant base, quality, filter status, information (INFO) and format (FORMAT). Each column after the FORMAT field corresponds to the information of a sample and is parsed according to the format defined in the FORMAT field.

[0169] S1032: Extract key information of a preset type from the genotype data file information.

[0170] When storing documents in a non-relational database, not all the information in the VCF file is required.

[0171] Key information includes:

[0172] chromosome

[0173] Location

[0174] Reference base

[0175] Variant base

[0176] Major allele type

[0177] Minor allele frequency.

[0178] S1033. Create a document for each variation based on the extracted key information.

[0179] Based on the extracted key information, a document is created for each variant. The structure of this document depends on the selected database and how the data will be used, but will contain a unique identifier, chromosome location, reference and variant bases, and genotype information after encoding the sequence compression.

[0180] S1034: Insert each mutated document into the non-relational database.

[0181] Each mutated document is inserted into a non-relational database. The embodiment of the present invention uses a MongoDB database, in which this can be achieved by performing an insert operation on a collection.

[0182] S104, quickly retrieve genotype data that meets preset conditions from the non-relational database. Specifically:

[0183] S1041. Create a joint index in the non-relational database.

[0184] In order to achieve fast retrieval, you need to create a joint index based on the retrieval requirements. Joint indexes can be combined based on multiple fields to speed up multi-field retrieval. Joint indexes can be created based on fields such as chromosome and position, because these fields are often used to retrieve genotype data for specific populations, chromosomes, and positions.

[0185] In MongoDB, a joint index is created as follows:

[0186] (1) Collection name: Suppose there is a collection called variants and you want to create an index on this collection.

[0187] (2) Index fields and sorting methods:

[0188] Chromosome:1 means that an ascending index is created for the chromosome field.

[0189] position:1 means that an ascending index is created for the position field.

[0190] (3) Description: You want to create a joint index that covers the two fields chromosome and position. This index can help speed up queries based on the combination of these fields, such as finding genotype data for a specific chromosome and position.

[0191] (4) MongoDB command: The specific MongoDB command to create an index is as follows:

[0192] db.variants.createIndex({"chromosome":1,"position":1})

[0193] S1042. Rapidly retrieve genotype data codes that meet preset conditions according to the combined index.

[0194] Using the joint index created earlier, you can quickly retrieve genotype data that meets specific conditions in the database. This may involve querying a specific chromosome and position combination to locate the required genotype data.

[0195] S1043, performing block sorting compression inverse transformation on the genotype data encoding, and parsing the encoding string to obtain the original genotype data string.

[0196] Specifically, the decoding process corresponds to the encoding process of step S102.

[0197] (1) Restore the final coding sequence

[0198] According to the rules of run-length coding and the correspondence between the number of repeated characters before coding, the final coding sequence is restored to the compact coding sequence after BWT transformation. For example, the final coding sequence is 1b38461d$. In the correspondence, b represents the previous character appears twice, d represents the previous character appears four times, and the $ symbol is an artificial identifier added after BWT coding, so the restored sequence is 1138461111$.

[0199] (2) BWT string inverse transformation

[0200] First, find the position of the end symbol of the original string from the BWT converted string; then, construct the BWT converted matrix based on the BWT converted string and the position of the end symbol, then sort each column of the matrix so that each column is arranged in dictionary order, and finally move down from the first column and along the arrow of the transposed matrix to the row where the end symbol is located, and read the characters of each row in sequence to get the original encoded string.

[0201] (3) Parsing the encoded string

[0202] First, parse the repetition count: use a regular expression to match a character followed by a number that indicates the number of times the character is repeated. For example, in the string C2Z3C1Z10, C2 means that the character C is repeated 2 times.

[0203] Regular expression: `([A-Z])(\d+)`

[0204] Second, expand repeated characters: For each matching character and digit pair, repeat the character a specified number of times.

[0205] (4) Apply decoding rules

[0206]

[0207] The decoding rule corresponds to the encoding rule in step S102.

[0208] In the solution provided by the embodiment of the present method, by using efficient compression, encoding, clustering, sorting and other methods, the genotype information of large samples is effectively compressed, thereby reducing the storage space of multi-sample genotype data, making the genotype information conducive to subsequent processing such as storage and retrieval. And through the database joint index, the retrieval speed based on the chromosome position interval is accelerated, and the database query efficiency is improved. Finally, the genotype information of all samples is obtained through a fast decoding algorithm, which greatly reduces the cost of gene data storage and improves the efficiency of data retrieval and analysis.

[0209] Figure 2 A schematic diagram of a genotype data compression and retrieval device provided in one embodiment of the present application, such as Figure 2 As shown, the device comprises:

[0210] A data compression module 11 is used to compress the original genotype data;

[0211] A data encoding module 22, used for encoding the compressed genotype data;

[0212] A data storage module 33, used for storing the encoded genotype data in a non-relational database;

[0213] The data retrieval module 44 is used to quickly retrieve genotype data that meets preset conditions from the non-relational database.

[0214] The above device can execute the genotype data compression and retrieval method in the above embodiments, wherein the data compression module 11 executes step S101; the data encoding module 22 executes step S102; the data storage module 33 executes step S103; and the data retrieval module 44 executes step S104.

[0215] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present application, and the method corresponding to the electronic device may be the model training method and the traffic screening method for traffic screening in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.

[0216] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or may be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.

[0217] Figure 3 The structure of a device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the device 1200 includes a central processing unit (CPU, Central Processing Unit) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM, Random Access Memory) 1203. In RAM1203, various programs and data required for system operation are also stored. CPU 1201, ROM 1202 and RAM 1203 are connected to each other through bus 1204. Input / output (I / O, Input / Output) interface 1205 is also connected to bus 1204.

[0218] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 1208 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet.

[0219] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 1201, the above functions defined in the method of the present application are executed.

[0220] Another embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application described above.

[0221] Specifically, the present embodiment may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device.

[0222] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0223] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0224] Computer program code for performing the operation of the present application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).

[0225] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0226] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

[0229] In addition, each functional unit in each embodiment of the present application 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 hardware plus software functional units.

[0230] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.

[0231] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0232] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A genotype data compression and retrieval method, characterized in that: include: Compress the original genotype data; Encode the compressed genotype data; Storing the encoded genotype data in a non-relational database; Genotype data meeting preset conditions are quickly retrieved from the non-relational database.

2. The genotype data compression and retrieval method according to claim 1, characterized in that: The compressing of the original genotype data further comprises: Use bgzip to compress the original genotype data, and use tabix to create an index for the compressed genotype data; Convert the data format of the compressed genotype data.

3. The genotype data compression and retrieval method according to claim 2, characterized in that: The data format conversion of the compressed genotype data further comprises: Decomposing the variant site information in the compressed genotype data into different types of field information; Determine the mutation type of the mutation site according to the field information; Converting the genotype according to the genotype field in the field information; A target format is generated according to the variation type and the genotype.

4. The genotype data compression and retrieval method according to claim 1, characterized in that: The encoding of the compressed genotype data further comprises: Use clustering methods to sort genotype data samples; Convert genotype data samples to single character representation; According to the clustering results, the continuous genotype data belonging to the same cluster were merged and represented as coding sequences; The sorted code sequence is transformed using block sort compression transformation.

5. The genotype data compression and retrieval method according to claim 4, characterized in that: After converting the sorted coding sequence using the block sorting compression transformation algorithm, the method further includes: replacing the continuously repeated character sequences with preset special characters and recording the number of repetitions.

6. The genotype data compression and retrieval method according to claim 1, characterized in that: The storing of the encoded genotype data into a non-relational database further comprises: Parse the encoded genotype data file information; Extracting key information of a preset type from the genotype data file information; Create a document for each variant based on the extracted key information; Each mutated document is inserted into the non-relational database.

7. The genotype data compression and retrieval method according to claim 5, characterized in that: The method of quickly retrieving genotype data that meets preset conditions from the non-relational database further includes: Creating a joint index in the non-relational database; Rapidly retrieve genotype data codes that meet preset conditions according to the combined index; The genotype data encoding is subjected to block sorting compression inverse transformation, and the encoding character string is parsed to obtain the original genotype data character string.

8. A genotype data compression and retrieval device, characterized in that: include: A data compression module is used to compress the original genotype data; A data encoding module, used for encoding the compressed genotype data; A data storage module, used for storing the encoded genotype data into a non-relational database; The data retrieval module is used to quickly retrieve genotype data that meets preset conditions from the non-relational database.

9. An electronic device for genotype data compression and retrieval, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A computer readable medium having computer program instructions stored thereon, characterized in that: The computer program instructions can be executed by a processor to implement the method according to any one of claims 1-7.

Citation Information

Cited By

  • Gene data storage method and device based on mixed medium and storage medium

    CN121191603A