Genetic deep information data compression method, device, electronic device and storage medium
By converting sequencing files into depth information files, and filtering and merging gene locations, the redundancy problem in the bw format when obtaining gene depth information is solved, and efficient compression and merging of gene depth information is achieved, significantly reducing storage consumption and Data redundancy.
Patent Information
- Application Number
- CN202211318287.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2042-10-26
AI Technical Summary
The existing bw format is not convenient for correlation analysis when obtaining gene depth information, and data from different samples cannot be merged, resulting in high storage consumption and data redundancy.
By receiving sequencing files, converting them into bam files, using SAMtools to generate depth information files, filtering gene position information, merging continuous sites, integrating depth information intervals, and finally merging sample data to generate compressed files, similar to bed format, reducing redundancy. information.
While ensuring the integrity of genetic information, it significantly reduces storage consumption, simplifies data merging and analysis, and improves data readability and merging efficiency.
Smart Images

Figure CN115691682B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of biological information technology, and specifically to a method, device, electronic device and storage medium for compressing gene deep information data. Background Art
[0002] Currently, the most commonly used depth information compression file format is the bw (bigwig) format, which has the following disadvantages:
[0003] 1. The bw format does not contain gene information. To obtain the full in-depth information of a gene, additional software is required for processing. It is also inconvenient to perform correlation analysis with other data such as expression tables.
[0004] 2. The bw formats of different samples cannot be merged. Summary of the invention
[0005] In order to overcome the deficiencies of the prior art, the purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for compressing gene depth information data, which greatly reduces storage consumption while ensuring the integrity of basic gene information and depth information.
[0006] To solve the above problems, the first aspect of the embodiment of the present invention discloses a method for compressing gene depth information data, which comprises the following steps:
[0007] Receive the sequencing file of each sample and convert the sequencing file into a bam file;
[0008] Use SAMtools to convert the bam files of each sample into depth information files;
[0009] Compressing the depth information file to obtain a compressed file;
[0010] The step of compressing the depth information file to obtain a compressed file includes:
[0011] Filtering the depth information by the location information of the gene to obtain a first depth information processing file;
[0012] Merging consecutive locations with the same depth information in the first depth information processing file;
[0013] Integrate the depth information of each interval of each gene into one line to obtain the second depth information processing file of each sample;
[0014] The second depth information processing files of all samples are merged into one file to obtain a compressed file.
[0015] As an optional solution, in a first aspect of an embodiment of the present invention, the depth information is filtered by the location information of the gene to obtain a first depth information processing file, including:
[0016] Determine target depth information of gene regions;
[0017] The position of the depth information file corresponding to each sample is screened according to the target depth information to obtain the position of the target depth information, which is recorded as the first depth information processing file.
[0018] As an optional solution, in a first aspect of an embodiment of the present invention, merging continuous locations with the same depth information in the first depth information processing file includes:
[0019] Determine the depth information in the first depth information processing file corresponding to each gene region and the number of consecutive sites thereof.
[0020] As an optional solution, in the first aspect of the embodiment of the present invention, the depth information of each interval of each gene is integrated into one line to obtain a second depth information processing file for each sample, including:
[0021] Record the depth information of each target interval of the target gene, wherein the target interval depth information includes the depth information of the target interval and the number of consecutive sites thereof, and the target interval depth information is expressed in the form of a×b, wherein a represents the depth information of the target interval, b represents the number of consecutive sites of the depth information of the target interval, and × is a connector, and other symbols may also be used to ensure the connector, such as &, #, @, etc.;
[0022] Display all target interval depth information of the target gene in the same row, wherein different target interval depth information of the target gene is separated by a separation mark, and the target gene depth information corresponding to the target gene is obtained;
[0023] Obtain the target gene depth information of all genes in each sample and generate a second depth information processing file for each sample.
[0024] As an optional solution, in a first aspect of an embodiment of the present invention, the second depth information processing files of all samples are merged into one file to obtain a compressed file, including:
[0025] The second depth information processing files of all samples are merged. The principle of merging is to display the target gene depth information of the same gene in the same row, and the target gene depth information of the same gene of different samples in different columns to obtain the compressed file.
[0026] As an optional solution, in a first aspect of an embodiment of the present invention, the compressed file includes basic columns and additional columns, and the first line of the compressed file is table information;
[0027] The basic columns include a chromosome column, a gene start position column, a gene end position column, a gene name column, and a positive and negative chain marker column;
[0028] The header information of the additional column is the sample name, and the display content of each additional column is the target gene depth information of the corresponding sample and the corresponding gene name.
[0029] As an optional solution, in the first aspect of the embodiment of the present invention, after receiving the sequencing files of each sample and converting the sequencing files into bam files, the method further includes:
[0030] Performing a first sorting of the contents of the bam file according to the chromosome;
[0031] Performing a second sort on the contents of the bam file after the first sort according to the starting position of the gene;
[0032] or / and,
[0033] After obtaining the compressed file, the method further includes:
[0034] The compressed file is recompressed by bgzip, or / and the compressed file is quickly read by using tabix indexing technology.
[0035] A second aspect of an embodiment of the present invention discloses a gene depth information data compression device, which includes:
[0036] A first conversion unit, configured to receive a sequencing file of each sample and convert the sequencing file into a bam file;
[0037] The second conversion unit is used to convert the bam file of each sample into a depth information file using SAMtools;
[0038] A compression unit, used for compressing the depth information file to obtain a compressed file;
[0039] The compression unit comprises:
[0040] A filtering subunit, used to filter the depth information by the location information of the gene to obtain a first depth information processing file;
[0041] A depth merging subunit, configured to merge consecutive locations with the same depth information in the first depth information processing file;
[0042] The interval merging subunit is used to integrate the depth information of each interval of each gene into one line to obtain the second depth information processing file of each sample;
[0043] The sample merging subunit is used to merge the second depth information processing files of all samples into one file to obtain a compressed file.
[0044] The third aspect of an embodiment of the present invention discloses an electronic device, comprising: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute a gene depth information data compression method disclosed in the first aspect of the embodiment of the present invention.
[0045] A fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute a gene depth information data compression method disclosed in the first aspect of an embodiment of the present invention.
[0046] The fifth aspect of the embodiments of the present invention discloses a computer program product. When the computer program product is run on a computer, the computer executes a gene depth information data compression method disclosed in the first aspect of the embodiments of the present invention.
[0047] A sixth aspect of an embodiment of the present invention discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes a genetic depth information data compression method disclosed in the first aspect of an embodiment of the present invention.
[0048] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0049] The embodiment of the present invention combines the characteristics of expression-related omics technologies such as transcriptome to convert the sample depth information data of the bam file into a compressed file. The specific operation process of this case is: first, the bam file is converted into a depth information file of each site through SAMtools, and then the depth information is filtered by the location information of the gene, and then the site information with the same continuous depth is merged, and finally the depth information of each interval of each gene is integrated into a row, and each sample is a compressed file of depth information in one column. While ensuring the integrity of basic gene information and depth information, storage consumption is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flowchart of a gene depth information data compression method provided by an embodiment of the present invention;
[0051] Figure 2 It is a schematic diagram of a process of merging depth information files provided by an embodiment of the present invention;
[0052] Figure 3It is a structural schematic diagram of a gene depth information data compression device disclosed in an embodiment of the present invention;
[0053] Figure 4 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] This specific implementation manner is merely an explanation of an embodiment of the present invention, and it is not a limitation of the embodiment of the present invention. After reading this specification, a person skilled in the art may make non-creative modifications to the embodiment as needed, but as long as it is within the scope of the claims of the embodiment of the present invention, it is protected by the patent law.
[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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 part of the embodiments of the present invention, not all of them. Based on the embodiments in the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present invention.
[0056] The term "comprise" and any variations thereof in the specification and claims of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatuses.
[0057] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0058] The embodiment of the present invention combines the characteristics of expression-related omics technologies such as transcriptome to convert the sample depth information data of the bam file into a compressed file, which greatly reduces the storage consumption while ensuring the integrity of the basic gene information and the depth information. The following is a detailed description with reference to the accompanying drawings.
[0059] Embodiment 1
[0060] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for compressing gene depth information data disclosed in an embodiment of the present invention. Figure 1As shown, the gene depth information data compression method includes the following steps:
[0061] S110, receiving the sequencing file of each sample and converting the sequencing file into a bam file.
[0062] The sequencing file of the present invention is preferably a file in the format of GTF (Gene transfer format is mainly used to annotate genomes) or GFF (General feature format is mainly used to annotate genes). In some other embodiments, it can also be other types of files, such as fastq, fasta files, and sam (The Sequencing Alignment / Map Format) files obtained after a certain conversion.
[0063] Taking the sequencing file in GTF format as an example, first convert the GTF file into a bam file (binary format of sam file). The bam file contains the chromosome number, start position, end position, positive and negative chain markers, and depth information of the genome.
[0064] Then the contents in the bam file are sorted, first by chromosome, and then by starting position. The purpose of sorting is to facilitate compression in the later stage. Of course, in other embodiments, the sorting operation may not be performed.
[0065] S120, using SAMtools to convert the bam file of each sample into a depth information file.
[0066] Use the SAMtools depth program to convert the whole genome comparison result file (bam format) after each sample is sorted into depth information. The default depth information file output by samtools has 3 columns, the first column is the chromosome ID, the second column is the position information, and the third column is the depth information. Each line of the output depth information file represents a gene region (the area between a certain starting position and an ending position in the chromosome is recorded as a gene region, and a gene region is recorded as the same gene, that is, each gene includes a gene region. It can be understood that, excluding the table information row, the number of rows of the depth information file obtained for each sample is the same as the number of its starting positions). The depth information file contains a lot of redundant information, resulting in a large amount of storage occupied in the end.
[0067] Therefore, through the compression in step S130, the storage consumption is greatly reduced while ensuring the integrity of the basic gene information and the depth information.
[0068] S130: compress the depth information file to obtain a compressed file.
[0069] In a preferred embodiment of the present invention, redundancy removal is achieved through position filtering, depth information merging, depth information interval merging and sample merging to obtain a compressed file, which is similar to a bed format file and is recorded as a genedepth file.
[0070] Please refer to Figure 2 As shown, it specifically includes the following steps:
[0071] S131, filtering the depth information by using the location information of the gene to obtain a first depth information processing file.
[0072] The depth information file output by samtools is the depth information of the entire genome. The larger the genome, the larger the result file. For expression-related omics technologies such as transcriptomics, it is only necessary to record the depth information related to the gene region. Most genomic gene regions only account for a small part of the entire genome, so by screening the location of the depth information, a large number of sites can be filtered out.
[0073] Specifically, the depth information sites can be filtered according to the target depth information of each gene region (the target depth information of each gene region is determined by statistics or experience), and only the position information corresponding to the target depth information is retained, and the filtered depth information file is recorded as the first depth information processing file.
[0074] S132: Merge consecutive locations with the same depth information in the first depth information processing file.
[0075] Due to the expression-related omics technologies such as transcriptomics, reads (read length) are mainly concentrated in the exon region, and the intron region contains very few reads. Even if there are reads, the coverage is relatively small and shows obvious regularity. That is, a large number of continuous positions have the same depth, and the exon region of genes with low expression also shows the same regularity. Based on this regularity, we remove the redundancy of sites with the same continuous depth and only retain one depth information and the number of continuous sites.
[0076] That is, each piece of depth information and the number of its continuous positions are determined, so as to count each piece of depth information and the number of its continuous positions as an interval.
[0077] Exemplarily, when the depth information of a certain gene region (denoted as gene A) is 0000011000551110111333..., assuming that the target depth information of the gene region is 0 and 1, after position filtering in step S131, the depth information obtained is 00000110001110111..., and then after step S132, the determined depth information includes six parts, among which the depth information of the first part is 0, and the number is 5; the depth information of the second part is 1, and the number is 2; the depth information of the third part is 0, and the number is 3; the depth information of the fourth part is 1, and the number is 3; the depth information of the fifth part is 0, and the number is 1; the depth information of the sixth part is 1, and the number is 3.
[0078] The order of step S131 and step S132 can be interchanged.
[0079] S133, integrating the depth information of each interval of each gene into one line to obtain a second depth information processing file for each sample.
[0080] Since traditional bed files can only record one interval per line, a gene requires many lines to be recorded, and there is a lot of redundancy. In order to further remove this redundancy, we designed a format that displays each gene in one line, corresponding to the number of lines in the depth information file, to ensure that the redundancy of the recorded interval information is minimized. Then the depth information of all intervals is merged into one column, and the depth information of each interval is separated by a segmentation mark, such as a comma. The format of each interval depth information record is expressed in a×b, where a represents the depth information of the target interval, b represents the number of continuous sites of the depth information of the target interval, and × is a connector. For intervals with a continuous number of sites of 1, only the depth information is retained.
[0081] Here, different genes are distinguished by target interval depth information. Each gene includes one or more interval depth information. The interval depth information of the target gene is defined as the target interval depth information. For example, the target interval depth information of gene A mentioned above is 0×5, 1×2, 0×3, 1×3, 0×1 and 1×3 respectively. After being separated by a separator (comma), it can be recorded as 0×5, 1×2, 0×3, 1×3, 0×1, 1×3. The target interval depth information set formed after the target interval depth information is separated is recorded as the target gene depth information of gene A, so that the target gene depth information of all genes of a sample can be obtained, which is recorded as the second depth information processing file, as shown in Table 1.
[0082] Table 1 Interval depth information table of sample A
[0083]
[0084] In Table 1, the first row is the table information, the first column is the chromosome number, and the table information is #CHROM; the second column is the starting position, and the table information is Start; the third column is the ending position, and the table information is End; the fourth column is the gene name, and the table information is ID; the fifth column is the positive and negative chain markers, and the table information is Str; the sixth column is the interval depth information corresponding to each gene, and the table information is the sample name.
[0085] The first to fifth columns mentioned above are called basic information columns of the second deep information processing file, and can be directly extracted from a sequencing program such as a GTF file or a GFF file.
[0086] All samples are processed through the above steps S131 - S133 by the same method as above, so as to obtain a second depth information processing file for each sample.
[0087] S134: Merge the second depth information processed files of all samples into one file, that is, a compressed file.
[0088] Most expression-related omics technologies such as transcriptomics will process many samples at the same time. In this way, each sample will have a second depth information processing file, and each second depth information processing file contains gene location information. This information is also redundant. For multiple samples, since the gene regions of different samples are completely consistent, it is very convenient to merge the tables, that is, to treat the depth information of each sample as a column.
[0089] The traditional samtools depth format and bed format cannot be directly merged because the interval information of different samples is not completely consistent, resulting in that the depth information of different samples can only be saved separately. This not only causes information redundancy, but also makes data reading, viewing and analysis more troublesome.
[0090] In a preferred embodiment of the present invention, the second depth information processing files of all samples are merged to obtain a compressed file. The principle of merging is to display the target interval depth information of the same gene in the same row, and the target interval depth information of the same gene of different samples in different columns.
[0091] For example, Table 2 shows the second depth information processing file of sample B. The second depth information processing file of sample A and the second depth information processing file of sample B are merged to obtain a compressed file, as shown in Table 3.
[0092] Table 2 Interval depth information table of sample B
[0093]
[0094] As can be seen from Table 1-3, when the interval depth information of one or some genes of a sample does not exist, for example, the interval depth information of gene ID BraA01g000060.3C of sample B does not exist, then when merging, this part will be displayed as blank in the merged file, that is, the compressed file.
[0095] Table 3 Merged file interval depth information table
[0096]
[0097] After obtaining the compressed file, you can also recompress it with bgzip, and use the indexing technology of tabix to read the compressed file more quickly. You can also use the -h / -H parameter of tabix to conveniently view the information of the compressed file.
[0098] Table 4 shows the test results of single sample format conversion (only considering the conversion of expressed genes) of RNAseq sequencing samples of 6 humans (genome size: 3.09G, total number of genes: 20289).
[0099] Table 4: Single sample format conversion results statistics
[0100] sample bam Depth1 Depth2 mem(Gb) runtime(h) expressed_genes sibrg1-1 2.3G 1.87G 31M 1.506 3.52 14930(73.59%) sibrg1-2 2.0G 1.86G 30M 1.501 3.23 14955(73.71%) sibrg1-3 2.4G 1.84G 28M 1.436 3.03 14865(73.27%) siscr1 2.0G 1.84G 28M 1.498 3.02 14811(73.00%) siscr2 2.0G 1.84G 28M 1.561 2.21 14871(73.30%) siscr3 2.2G 1.85G 29M 1.467 3.43 14936(73.62%)
[0101] In Table 4, sample is the sample name; bam is the size of the bam file (the file obtained by step S110 of the embodiment of the present invention); Depth1 is the size of the SAMtools depth statistical depth file (compressed by bgzip), that is, the file size of the file obtained by step S120 of the embodiment of the present invention after being compressed by bgzip; Depth2 is the size of the second depth information processing file (compressed by bgzip), that is, the file size obtained by step S133 of the embodiment of the present invention; at the same time, the size of the second depth information processing files of all samples are merged into a compressed file (compressed by bgzip) and is recorded as Depth; mem (Gb) is the memory size consumed; runtime is the running time; expressed_genes is the number of expressed genes.
[0102] The size of the compressed file after all Depth2 files are combined is 176M, the time consumption is less than 2 minutes, and the memory consumption is less than 1G.
[0103] From Table 4 we can see that:
[0104] 1. Compared with the result of the traditional samtools statistical depth, the storage occupied by depth1 and depth2 is greater than about 60:1; thus, it can be seen that the embodiment of the present invention can greatly reduce the storage consumption compared with the traditional samtools statistical depth method.
[0105] 2. The size ratio of a single sample bam file to a depth1 file is about 1:0.85; while the size ratio of a single sample bam file to a depth2 file is 100:1; after the sample information is merged, the storage size of all sample depth2 (174M) is about 1:1, thus reducing the storage by 99% while ensuring the integrity of the basic gene information and depth information.
[0106] Moreover, since the genedepth format file has one row per gene, it is very convenient to merge and split different samples. It is also very convenient to merge with expression tables, functional annotation tables, etc., which can greatly reduce the workload for downstream joint analysis.
[0107] Embodiment 2
[0108] See also Figure 3 , Figure 3 Schematic diagram of the structure of a gene depth information data compression device disclosed in an embodiment of the present invention. Figure 3 As shown, the gene depth information data compression device may include:
[0109] A first conversion unit 210, configured to receive a sequencing file of each sample and convert the sequencing file into a bam file;
[0110] The second conversion unit 220 is used to convert the bam file of each sample into a depth information file using SAMtools;
[0111] A compression unit 230, configured to compress the depth information file to obtain a compressed file;
[0112] The compression unit comprises:
[0113] A filtering subunit, used to filter the depth information by the location information of the gene to obtain a first depth information processing file;
[0114] A depth merging subunit, configured to merge consecutive locations with the same depth information in the first depth information processing file;
[0115] The interval merging subunit is used to integrate the depth information of each interval of each gene into one line to obtain the second depth information processing file of each sample;
[0116] The sample merging subunit is used to merge the second depth information processing files of all samples into one file to obtain a compressed file.
[0117] Embodiment 3
[0118] See also Figure 4 , Figure 4 Schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. Figure 4 As shown, the electronic device may include:
[0119] A memory 310 storing executable program codes;
[0120] a processor 320 coupled to the memory 310;
[0121] The processor 320 calls the executable program code stored in the memory 310 to execute part or all of the steps in a gene depth information data compression method in the first embodiment.
[0122] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute part or all of the steps in a gene depth information data compression method in embodiment one.
[0123] The embodiment of the present invention further discloses a computer program product, wherein when the computer program product is run on a computer, the computer is enabled to execute part or all of the steps in a gene depth information data compression method in embodiment one.
[0124] An embodiment of the present invention further discloses an application publishing platform, wherein the application publishing platform is used to publish a computer program product, wherein when the computer program product runs on a computer, the computer executes part or all of the steps in a genetic depth information data compression method in embodiment one.
[0125] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0126] 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, i.e., they may be located in one place or distributed over 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.
[0127] 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 integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0128] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. 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, which is stored in a memory and includes several requests for a computer device (which can be a personal computer, a server or a network device, etc., specifically a processor in a computer device) to perform some or all of the steps of the method described in each embodiment of the present invention.
[0129] In the embodiments provided by the present invention, it should be understood that "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0130] A person skilled in the art may understand that part or all of the steps in the various methods of the embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, wherein the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0131] The above is a detailed introduction to a gene deep information data compression method, device, electronic device and storage medium disclosed in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for compressing genetic deep information data. It is characterized in that It includes the following steps: Receive the sequencing file of each sample and convert the sequencing file into a bam file; Use SAMtools to convert the bam files of each sample into depth information files; Compressing the depth information file to obtain a compressed file; The step of compressing the depth information file to obtain a compressed file includes: Filtering the depth information by the location information of the gene to obtain a first depth information processing file; Merging consecutive locations with the same depth information in the first depth information processing file; Integrate the depth information of each interval of each gene into one line to obtain the second depth information processing file of each sample; Merge the second depth information processing files of all samples into one file to obtain a compressed file; Merging consecutive sites with the same depth information in the first depth information processing file, including: Determine the depth information and the number of consecutive sites in the first depth information processing file corresponding to each gene region; Integrate the depth information of each interval of each gene into one line to obtain the second depth information processing file of each sample, including: Record the depth information of each target interval of the target gene, wherein the target interval depth information includes the depth information of the target interval and the number of consecutive sites thereof, and the target interval depth information is expressed in the form of a×b, wherein a represents the depth information of the target interval, b represents the number of consecutive sites of the depth information of the target interval, and × is a connector; Display all target interval depth information of the target gene in the same row, wherein different target interval depth information of the target gene is separated by a separation mark, and the target gene depth information corresponding to the target gene is obtained; Obtain the target gene depth information of all genes in each sample and generate a second depth information processing file for each sample.
2. The method for compressing gene depth information data according to claim 1, It is characterized in that The depth information is filtered by the location information of the gene to obtain a first depth information processing file, including: Determine target depth information of gene regions; The position of the depth information file corresponding to each sample is screened according to the target depth information to obtain the position of the target depth information, which is recorded as the first depth information processing file.
3. The method for compressing gene depth information data according to claim 1, It is characterized in that Merge the second depth information processing files of all samples into one file to obtain a compressed file, including: The second depth information processing files of all samples are merged. The principle of merging is to display the target gene depth information of the same gene in the same row, and the target gene depth information of the same gene of different samples in different columns to obtain the compressed file.
4. The gene depth information data compression method according to claim 3, It is characterized in that The compressed file includes basic columns and additional columns, and the first line of the compressed file includes table information; The basic columns include a chromosome column, a gene start position column, a gene end position column, a gene name column, and a positive and negative chain marker column; The header information of the additional column is the sample name, and the displayed content of each additional column is the target gene depth information of the corresponding sample and the corresponding gene name.
5. The gene depth information data compression method according to any one of claims 1 to 4, It is characterized in that After receiving the sequencing files of each sample and converting the sequencing files into bam files, the method further includes: Performing a first sorting of the contents of the bam file according to the chromosome; Performing a second sort on the contents of the bam file after the first sort according to the starting position of the gene; or / and, After obtaining the compressed file, the method further includes: The compressed file is recompressed by bgzip, or / and the compressed file is quickly read by using tabix indexing technology.
6. A genetic depth information data compression device, It is characterized in that It includes: A first conversion unit, configured to receive a sequencing file of each sample and convert the sequencing file into a bam file; A second conversion unit is used to convert the bam file of each sample into a depth information file using SAMtools; A compression unit, used for compressing the depth information file to obtain a compressed file; The compression unit comprises: A filtering subunit, used to filter the depth information by the location information of the gene to obtain a first depth information processing file; A depth merging subunit, configured to merge consecutive locations with the same depth information in the first depth information processing file; The interval merging subunit is used to integrate the depth information of each interval of each gene into one line to obtain the second depth information processing file of each sample; A sample merging subunit, used for merging the second depth information processing files of all samples into one file to obtain a compressed file; Among them, the deep merging subunit includes: Determine the depth information and the number of consecutive sites in the first depth information processing file corresponding to each gene region; The interval merging subunit includes: Record the depth information of each target interval of the target gene, wherein the target interval depth information includes the depth information of the target interval and the number of consecutive sites thereof, and the target interval depth information is expressed in the form of a×b, wherein a represents the depth information of the target interval, b represents the number of consecutive sites of the depth information of the target interval, and × is a connector; Display all target interval depth information of the target gene in the same row, wherein different target interval depth information of the target gene is separated by a separation mark, and the target gene depth information corresponding to the target gene is obtained; Obtain the target gene depth information of all genes in each sample and generate a second depth information processing file for each sample.
7. An electronic device, It is characterized in that It includes: a memory storing executable program code; a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the gene depth information data compression method according to any one of claims 1-5.
8. A computer-readable storage medium, It is characterized in that It stores a computer program, wherein the computer program enables a computer to execute the gene depth information data compression method described in any one of claims 1-5.
