Method and device for processing methylation site modification information
By processing the methylated site data output by Bismark software, the problems of missing site modification and non-modified quantity statistics and low data processing efficiency are solved, and detailed methylated site information acquisition and analysis efficiency are improved.
Patent Information
- Application Number
- CN202411327611.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-03
AI Technical Summary
The output results of Bismark software do not report the number of modified and non-modifieds of each site, and traditional statistical methods cannot efficiently process large-scale methylation site data, resulting in complex analysis.
By obtaining the output file and methylation modification site files of Bismark software, data processing is performed to count the number of methylation modified and non-modified at each site, and adding base annotations to the site to generate detailed methylation Position information.
Efficient analysis of genomic loci is achieved, detailed methylation site information is provided, and the analysis process is simplified and data processing efficiency is improved.
Smart Images

Figure CN119252328A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of bioinformation technology, and in particular to a method and device for processing methylation site modification information. Background Art
[0002] Bismark is a tool for mapping bisulfite-treated sequence reads to a reference genome and making methylation calls. It can complete bisulfite mapping and methylation calls in one step, supports single-end and double-end read alignment, and can distinguish cytosine methylation in the context of CpG, CHG, and CHH. However, the output of Bismark only contains basic information about the site, such as chromosome number, site location, and methylation status, lacking statistics on the number of modifications and non-modifications at each site, as well as detailed annotations of specific bases at the site.
[0003] Therefore, for the statistical analysis of the number of modified and non-modified methylation sites in Bismark, the output results of Bismark software do not count the number of modified and non-modified sites at each site, and this modification information is information that scientific researchers need to pay attention to frequently. Traditional statistical methods are often unable to efficiently process large-scale methylation site data, resulting in a complex and time-consuming analysis process.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method and device for processing methylation site modification information, so as to at least solve the technical problem that the output results of Bismark software in the related art do not report the modified and non-modified quantities of each site, and the traditional statistical methods cannot efficiently process large-scale methylation site data, resulting in a complicated analysis process.
[0006] According to one aspect of an embodiment of the present invention, a method for processing methylation site modification information is provided, comprising: obtaining an output file of Bismark software, wherein the Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; obtaining a methylation modification site file of the reference genome, wherein the methylation modification site file is used to find all possible sites of methylation modification in the reference genome; processing the methylation modification site file to obtain all possible methylation modification sites, methylation modification types, and bases in the reference genome; adding base annotations to all possible methylation modification sites to obtain the base types of the methylation modification sites; and generating the output result of the reference genome according to the position information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and the base type of the reference genome.
[0007] Optionally, obtaining the output file of the Bismark software includes: after the Bismark software counts the number of methylation modifications of the reference genome, obtaining two files in a predetermined format output by the Bismark software, wherein the two files correspond to the positive chain and negative chain of the CHH / CHG / CpG modification type, respectively; and obtaining the output file based on the two files.
[0008] Optionally, the predetermined format is: the fragment identifier, methylation modification identifier, chromosome number, site and methylation modification type of the reference genome.
[0009] Optionally, obtaining the methylation modification site file of the reference genome includes: marking the methylation modification sites to obtain the methylation modification site file.
[0010] Optionally, the methylation modification site file is processed to obtain the number of all possible methylation modification sites in the reference genome, including: obtaining the methylation modification results of each Reads sequencing read fragment based on the reference genome by the Bismark software; and adding the methylation modification and unmethylated accumulation results of each site in the reference genome according to the methylation modification results to obtain the number of methylation modification sites at each site.
[0011] Optionally, the method for processing methylation site modification information further includes: obtaining the number of non-methylation modified sites at each site according to the methylation modification results by accumulating the methylation modification and unmethylated sites at each site of the reference genome.
[0012] Optionally, base annotations are added to all possible methylation modification sites to obtain the base types of the methylation modification sites, including: determining a file one for all possible methylation modification sites on the reference genome and a file two including the number of methylation modification sites and the number of non-methylation modification sites; reading the file two line by line using the file one as a template, and determining whether the position of each line of the file two read is equal to that of the corresponding line of the file one to obtain a determination result; if the result indicates that the position of each line of the file two read is equal to that of the corresponding line of the file one, then filling the number of methylated modified fragments and the number of methylated unmodified fragments in the reference genome into the methylation modification template of the reference genome.
[0013] According to another aspect of an embodiment of the present invention, a device for processing methylation site modification information is also provided, comprising: a first acquisition unit, used to acquire an output file of Bismark software, wherein the Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; a second acquisition unit, used to acquire a methylation modification site file of the reference genome, wherein the methylation modification site file is used to find all possible sites of methylation modification in the reference genome; a first processing unit, used to process the methylation modification site file to obtain all possible methylation modification sites, methylation modification types and bases in the reference genome; an adding unit, used to add base annotations to all possible methylation modification sites to obtain the base types of the methylation modification sites; and a second processing unit, used to generate an output result of the reference genome according to the position information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and the base type of the reference genome.
[0014] Optionally, the first acquisition unit includes: a first acquisition module, used to obtain two files of a predetermined format output by the Bismark software after the Bismark software counts the number of methylation modifications of the reference genome, wherein the two files correspond to the positive chain and negative chain of the CHH / CHG / CpG modification type respectively; a second acquisition module, used to obtain the output file based on the two files.
[0015] Optionally, the predetermined format is: the fragment identifier, methylation modification identifier, chromosome number, site and methylation modification type of the reference genome.
[0016] Optionally, the second acquisition unit includes: a labeling module, used to label the methylation modification site to obtain the methylation modification site file.
[0017] Optionally, the first processing unit includes: a third acquisition module, used to obtain the methylation modification results of each Reads sequencing read fragment performed by the Bismark software based on the reference genome; a fourth acquisition module, used to accumulate the methylation modification and unmethylated methylation of each site of the reference genome according to the methylation modification results, to obtain the number of methylation modified sites at each site.
[0018] Optionally, the processing device for methylation site modification information also includes: a fifth acquisition module, which is used to obtain the number of non-methylation modified sites at each site by adding the methylation modification and unmethylation modification results of each site of the reference genome according to the methylation modification results.
[0019] Optionally, the adding unit includes: a third determination module, used to determine file one of all possible methylation modification sites on the reference genome and file two including the number of the methylation modification sites and the number of non-methylation modification sites; a judgment module, used to read file two line by line with file one as a template, and judge whether the position of each line of file two read is equal to the position of the corresponding line of file one to obtain a judgment result; a filling module, used to fill the number of methylated modified fragments and the number of methylated unmodified fragments in the reference genome into the methylation modification template of the reference genome if the result indicates that the position of each line of file two read is equal to the position of the corresponding line of file one.
[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored program, wherein the program executes any one of the above-mentioned methods for processing methylation site modification information.
[0021] According to another aspect of an embodiment of the present invention, a processor is further provided, wherein the processor is used to run a program, wherein the program executes any one of the above-mentioned methods for processing methylation site modification information when running.
[0022] According to another aspect of an embodiment of the present invention, a computer program product is provided, comprising computer instructions, wherein when the computer instructions are executed by a processor, any one of the above methods for processing methylation site modification information is executed.
[0023] In an embodiment of the present invention, an output file of the Bismark software is obtained, wherein the Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; a methylation modification site file of the reference genome is obtained, wherein the methylation modification site file is used to find all possible sites of methylation modification in the reference genome; the output file and the methylation modification site file are processed to obtain all possible methylation modification sites, methylation modification types, and bases in the reference genome; base annotations are added to all possible methylation modification sites to obtain the base types of the methylation modification sites; and an output result of the reference genome is generated according to the position information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and base types of the reference genome. Through the technical scheme provided by the present invention, it is achieved to obtain the methylation modification and non-modification statistical results of each site of the genome and the detailed annotation of the specific bases of the methylation site according to the output file of the Bismark software and the methylation modification site file, so that the processing results of the genome can be directly used for the purpose of further biological analysis, thereby achieving the technical effect of improving the efficiency of genome data analysis, and simplifying the analysis process at the genome site level, thereby solving the technical problem that the output results of the Bismark software in the related technology do not report the modification and non-modification numbers of each site, and the traditional statistical method cannot efficiently process large-scale methylation site data, resulting in a complicated analysis process. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] 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:
[0025] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for processing methylation site modification information according to an embodiment of the present invention;
[0026] Figure 2 is a flowchart of a method for processing methylation site modification information according to an embodiment of the present invention;
[0027] Figure 3 is a flowchart of an optional method for processing methylation site modification information according to an embodiment of the present invention;
[0028] Figure 4 is a schematic diagram of a device for processing methylation site modification information according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] 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.
[0030] 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.
[0031] As introduced in the background technology, the output results of the Bismark software in the related art do not report the number of modifications and non-modifications at each site, and the traditional statistical methods cannot efficiently process large-scale methylation site data, resulting in a complicated analysis process. In view of the above defects, a method and apparatus for processing methylation site modification information, a computer-readable storage medium, a processor, and a computer program product are provided in the embodiments of the present invention.
[0032] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0033] The method embodiments provided in the embodiments of the present invention can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of a method for processing methylation site modification information according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the processing method of methylation site modification information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned network specific examples may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] According to an embodiment of the present invention, a method embodiment of a method for processing methylation site modification information 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 may be executed in an order different from that shown here.
[0036] Figure 2 is a flowchart of a method for processing methylation site modification information according to an embodiment of the present invention. Figure 2 As shown, the method for processing the methylation site modification information includes the following steps:
[0037] Step S202, obtaining the output file of the Bismark software, wherein the Bismark software is a tool for reading and mapping the sulfite-treated sequence to the reference genome for methylation calling, and the output file is a file with the methylation modification results.
[0038] Optionally, the output file may be in the deduplicated.txt.gz format.
[0039] In this embodiment, after the Bismark software performs sequencing processing on the reference genome and outputs the sequencing results, the output results of the Bismark software can be directly obtained and used as the above-mentioned output file.
[0040] Step S204, obtaining a methylation modification site file of the reference genome, wherein the methylation modification site file is used to search for all possible methylation modification sites in the reference genome.
[0041] In this embodiment, a methylation modification site file of the reference genome can also be obtained. The methylation modification site file searches for all possible methylation modification sites of the reference genome for subsequent analysis of which sites of the reference genome have methylation modification and which sites do not.
[0042] Figure 3 is a flowchart of an optional method for processing methylation site modification information according to an embodiment of the present invention, such as Figure 3 As shown, the methylation modification site file can be Figure 3 A fasta file with fai file format index (fasta(with.fai)). That is, Figure 3 The fasta (with.fai) in the file is a fasta methylation modification site file with a .fai format index.
[0043] Step S206, processing the methylation modification site file to obtain all possible methylation modification sites, methylation modification types and bases in the reference genome.
[0044] In this embodiment, the above-mentioned output file and methylation modification site file can be processed to count the number of methylation modification sites at each site in the reference genome; at the same time, this data processing method can also count the number of non-methylation modification sites at each site in the reference genome.
[0045] Step S208, adding base annotations to all possible methylation modification sites to obtain the base types of the methylation modification sites.
[0046] In this embodiment, the specific base type of the methylation modification site can be annotated according to the reference genome base information file, such as CHH, CHG, and CpG.
[0047] Step S210, generating an output result of the reference genome according to the location information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and base type of the reference genome.
[0048] In this embodiment, an output result including chromosome number, site position, positive and negative chains, methylation modification quantity, methylation unmodified quantity, methylation type and specific base can be generated according to the above-mentioned types of information.
[0049] As can be seen from the above, in the above embodiment of the present invention, the output file of the Bismark software can be obtained, wherein Bi The smark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; the methylation modification site file of the reference genome is obtained, wherein the methylation modification site file is used to find all possible sites of methylation modification in the reference genome; the output file and the methylation modification site file are processed to obtain all possible methylation modification sites, methylation modification types and bases in the reference genome; base annotations are added to all possible methylation modification sites to obtain the base types of the methylation modification sites; the output results of the reference genome are generated according to the location information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and base types of the reference genome, so that the methylation modification and non-modification statistical results of each site of the genome and the detailed annotations of the specific bases of the methylation site are obtained according to the output file of the Bismark software and the methylation modification site file, so that the processing results of the genome can be directly used for the purpose of further biological analysis, achieving the technical effect of improving the efficiency of genome data analysis and simplifying the analysis process at the genome site level.
[0050] Therefore, the above-mentioned technical solution provided by the embodiment of the present invention solves the technical problem that the output results of the Bismark software in the related art do not report the number of modifications and non-modifications of each site, and the traditional statistical method cannot efficiently process large-scale methylation site data, resulting in a complicated analysis process.
[0051] According to the above embodiment of the present invention, obtaining the output file of the Bismark software may include: after the Bismark software counts the number of methylation modifications of the reference genome, obtaining two files in a predetermined format output by the Bismark software, wherein the two files correspond to the positive chain and the negative chain of the CHH / CHG / CpG modification type respectively; and obtaining the output file based on the two files.
[0052] In this embodiment, the positive and negative chains output by the Bigsmark software (Bigsmark_methy l at ion_extractor software) respectively carry two files in the dedupli ated.txt.gz format with the methylation modification results, named as: CHH_OT_sample_Bigsmark_bt2_pe.deduplicated.txt.gz, CHH_OB_sample_Bigsmark_bt2_pe.deduplicated.txt.gz, corresponding to the OT (positive chain) and OB (negative chain) of the CHH modification type, respectively.
[0053] The above file content format can be: LH00281:90:2252FHLT4:3:1101:46486:1014_1:N:0:TNTGCCAGAC+GTCAGTTCTG-20
[0054] 14330848h, corresponding to reads ID, whether methylation modification, chromosome number, position, and methylation modification type.
[0055] That is, in the above embodiment, the predetermined format may be: a fragment identifier of a reference genome, a methylation modification identifier, a chromosome number, a site, and a methylation modification type.
[0056] According to the above embodiment of the present invention, obtaining a methylation modification site file of a reference genome includes: marking the methylation modification sites to obtain the methylation modification site file.
[0057] In this embodiment, all sites of the reference genome can be determined first, and then the parts of all sites where the same base (e.g., C) appears three times consecutively may be identified as being likely to be methylated. That is, in this embodiment of the present invention, the base conditions of three consecutive sites can be used to determine whether a methylation modification will occur.
[0058] According to the above embodiment of the present invention, the methylation modification site file is processed to obtain the number of all possible methylation modification sites in the reference genome, including: obtaining the methylation modification result of each Reads sequencing read fragment based on the reference genome by the Bismark software; and accumulating the methylation modification and unmethylated results of each site in the reference genome according to the methylation modification result to obtain the number of methylation modification sites at each site.
[0059] In this embodiment, the two files in the dedupli ated.txt.gz format output by the Bismark software contain the methylation modification results corresponding to each read of sequencing (i.e., each fragment in the reference genome), and the total number of methylation modifications and unmodified modifications of the site is finally counted by accumulating the methylation modifications and unmodified modifications of each position; the site and base information corresponding to all CHH, CHG, and CpG in the reference genome are counted. By reading the methylation modification site file in the fasta format, every 3 bases are judged to see whether the positive and negative chains meet CHH, CHG, and CpG. If they meet, their positions and methylation modification types are recorded, and their specific bases are recorded. The format is as follows: 1 chromosome 10004th site + CHH CCC, corresponding to chromosome number, position, positive and negative chains, methylation modification types, and specific bases.
[0060] According to the above embodiment of the present invention, the method for processing methylation site modification information may also include: accumulating the methylation modification and unmethylation modification of each site in the reference genome according to the methylation modification results to obtain the number of unmethylated modified sites at each site.
[0061] In this embodiment, the number of non-methylated modified sites at each site can be obtained by adding the methylated modified and unmethylated sites at each site of the reference genome according to the above methylation modification results.
[0062] According to the above embodiment of the present invention, base annotations are added to all possible methylation modification sites to obtain the base types of the methylation modification sites, including: determining a file one of all possible methylation modification sites on a reference genome and a file two including the number of methylation modification sites and the number of non-methylation modification sites; reading file two line by line with file one as a template, and determining whether the position of each line of file two read is equal to the position of the corresponding line of file one to obtain a determination result; if the result indicates that the position of each line of file two read is equal to the position of the corresponding line of file one, then filling the number of methylated modified fragments and the number of methylated unmodified fragments in the reference genome into the methylation modification template of the reference genome.
[0063] According to the reference genome base information file, annotate the specific base type of each site (such as CHH, CHG, CpG). File A contains all possible methylation modification sites on the reference genome, plus file B with the corresponding number of methylated reads and unmethylated reads in the input bi smark results. Use file A as a template to read line by line, read a line of file B and determine whether the position corresponding to the line of file A is equal. If they are equal, fill the information of the number of methylated reads and the number of methylated unmodified reads into the template. If they are not equal, fill the number of methylated reads and the number of methylated unmodified reads corresponding to the template with 0 and continue. The format is as follows: 1 10011+0 (unmodified) 1 (modified) CHH CCT, corresponding to: chromosome number, position, positive and negative chains, number of methylated reads, number of methylated unmodified reads, methylation modification type, specific base.
[0064] like Figure 3As shown in the figure, aCXX is subroutine processing; All possible methylation modifications positions: all possible methylation modification site position files, the format is as follows: 1 10004+CHH CCC, corresponding to chromosome number, position, positive and negative chains, methylation modification type, specific base; idx indicates subroutine processing; All positions with index: file 12 plus its index file. The index file format is as follows: 1 015215308661521530867, which corresponds to the chromosome number, the starting file pointer position of the chromosome, the ending file pointer position of the chromosome, and the length of the chromosome file, respectively; bismark CXX TOP: all positive chains output by the bismark_methylation_extractor software contain methylation modification results in the dedupli ced.txt.gz format file, the format is as follows: LH00281:90:2252FHLT4:3:1101:46486:1014_1:N:0:TNTGCCAGAC+GTCAGTTCTG-2014330848h, which correspond to reads ID, whether methylation modification, chromosome number, position, and methylation modification type, respectively; biamark CXX BOTTOM: all negative chains output by the bismark_methylation_extractor software contain methylation modification results in the dedupli ced.txt.gz format file. The format is as follows: LH00281:90:2252FHLT4:3:1101:46486:10141:N:0:TNTGCCAGAC+GTCAGTTCTG 2014330839h, which correspond to reads ID, whether it is methylated, chromosome number, position, and methylation modification type; getCXX: subroutine processing; Methy l at ion modification site depth: contains the number of reads with methylation modification and the number of reads without methylation modification at each site. The format is as follows: 1 10011 01, which correspond to: chromosome number, position, the number of reads with methylation modification, and the number of reads without methylation modification; annoCXX: subroutine processing; Site depth including base annotation: contains all possible methylation modification sites on the reference genome, plus the number of reads with methylation modification and the number of reads without methylation modification corresponding to the input bi smark result.The format is as follows: 1 10011+0 1CHHCCT, which corresponds to: chromosome number, position, positive and negative chains, number of methylated reads, number of methylated unmodified reads, methylation modification type, and specific bases.
[0065] In the above Figure 3 In the process, the fasta file with fai index can be first passed to the faCXX subroutine to output all possible methylation modification sites to the file faCXX.tsv; then, faCXX.tsv is input into the idx subroutine to establish the index index; the methylation modification information of the TOP chain and the BOTTOM chain in the output result of the Bismark software is then passed into the getCXX subroutine to obtain the bi smarkCXX.tsv file sorted in the order of chromosomes and sites, which contains the depth information of methylation modification and unmodification; finally, faCXX.tsv with idx index, bi smarkCXX.tsv, and the fasta file with fai index are input into the annCXX subroutine to obtain the final result file, which contains: methylation modification, unmodified depth information, methylation type information, and site base information.
[0066] It should be noted that the above technical solution provided in the embodiment of the present invention can use CXXTOOL software, and the program design of the software is as follows:
[0067] 1) A universal chromosome number sorting method is defined to ensure the correct order of the chromosome numbers before and after and humanized observation. Sorting method: The commonly used sorting method usually sorts by the ASCI I code of the first character of the chromosome number, and then sorts the ASCI I code of the second character, resulting in chromosome 10 being ranked before chromosome 2. The universal chromosome number sorting method of the present invention rewrites the internal sorting algorithm, reading the ASCI I code from the last character of the chromosome number and accumulating it. Every time a character is moved to the left, the ASCI I code value increases by *10, thus ensuring the correct chromosome order under pure digital conditions; and some chromosome numbers contain not only numbers but also letters, such as chromosomes X and Y. Since the ASCI I code of such letters is smaller than the ASCI I code of the sum of two digits, the letters are also weighted by *10.
[0068] 2) Define an efficient data structure for storing the number of sites, which has the characteristics of high performance and low memory usage, and has higher memory utilization in a fixed memory. The data structure first uses a hash algorithm to correspond the number of methylated modifications and the number of unmodified sites of the chromosome and its corresponding site; since the number of methylated modifications and the number of unmodified sites are both based on each site, the conventional practice is to correspond the number of methylated modifications and the number of unmodified sites to the sites respectively. In the case of a large reference genome (such as the human 3G reference genome), a large amount of memory will be occupied, and the corresponding sites need to be searched and traversed twice and stored. The embodiment of the present invention innovatively combines the number of methylation modifications and the number of unmodified methylation modifications and saves them into a variable, specifically: define a 32-bit variable unsigned int, store the number of methylation modifications in the high 16 bits of the variable, and store the number of methylation unmodified methylation modifications in the low 16 bits of the variable. Each 16 bits can store a maximum of 65535, which is enough to meet the requirements of methylation sequencing depth, and the bitwise operation has an extremely high speed; the embodiment of the present invention does not use a hash algorithm to correspond to each chromosome position and the number of statistical variables, because the position of each chromosome is a unique value and there will be no duplication, so a memory-based array is used, which is faster and occupies less memory. In summary, the chromosome and the position use hash as the corresponding, the position and the number of statistical variables use a memory-based array as the corresponding, and the number of statistical variables are split into two parts to store the number of methylation modifications and the number of unmodified methylation, respectively.
[0069] 3). Design a multi-lock-free queue coordination method to avoid the thread safety problem of multi-threaded site information storage. When reading and storing site quantity information in multiple files, in order to avoid the thread safety caused by multi-threaded simultaneous data operation, a multi-lock-free queue coordination method is designed to avoid thread safety problems. Compared with locked threads, this method has extremely high efficiency. Multi-lock-free queue design: For example, when reading the OT and OB output results of the bismark software, two threads are used to read them into two single-production single-consumption (SPSC) lock-free queues respectively, and then two threads are set to consume the two single-production single-consumption (SPSC) lock-free queues respectively to obtain the information of sites and site methylation modifications. Then the two consumer threads push the results into a multi-production multi-consumption (MPMC) lock-free queue. Finally, a thread is set to consume the site and site methylation modification information in the multi-production multi-consumption (MPMC) lock-free queue and save the information to the high-efficiency data structure in (2). In this way, the parallel reading of the two files is guaranteed, and the thread safety of the high-efficiency data structure is guaranteed.
[0070] 4). A statistical method for methylation modification sites and unmodified sites based on the high-efficiency data structure in 2) is designed. The specific operation is as follows: File A with all possible methylation modification sites on the reference genome, plus file B with the corresponding number of methylation-modified reads and unmethylation-modified reads in the input bi smark results. Using file A as a template, read line by line, read a line of file B and determine whether the position corresponding to the line of file A is equal. If they are equal, fill the information of the number of methylation-modified reads and the number of methylation-unmodified reads into the template. If they are not equal, fill the information of the number of methylation-modified reads and the number of methylation-unmodified reads corresponding to the template with 0 and continue. The format is as follows: 1 10011+0 1CHH CCT, corresponding to: chromosome number, position, positive and negative chains, number of methylation-modified reads, number of methylation-unmodified reads, methylation modification type, specific base.
[0071] 5). A general index establishment method for the position of chromosomes in files is designed. This index can be used to read large files efficiently. General index establishment method: Split large input files into 1GB sizes (to avoid files that are too large and occupy too much memory), and map the file segment to the memory. Then read the corresponding mapped memory area to read the content of the file. After reading the file content, the chromosome of each line is judged. If the chromosome number of the next line is inconsistent with the chromosome number of this line, the starting file pointer position and the ending file pointer position corresponding to the chromosome number of this line are recorded, and their lengths are recorded. Until the 1GB size is read completely, read the next 1GB size and calculate the corresponding offset. Finally, all files are read. The index format is as follows: 1 01521530866 1521530867, which correspond to the chromosome number, the starting file pointer position of the chromosome, the ending file pointer position of the chromosome, and the file length of the chromosome. Through this index, the file pointer position of a chromosome can be quickly located without traversing the entire large file, saving IO.
[0072] 6). Designed a method that uses a large file as the basic template and another relatively small file as information to fill it, and used a method of multiple lock-free queues for synchronous consumption.
[0073] 7). The program has designed several subroutines: faCXX, idx, getCXX, annoCXX (here faCXX is used to obtain all possible methylation modification sites and corresponding methylation types and bases in the reference genome; idx is used to generate indexes for all tsv format files generated by this program; getCXX is used to preliminarily count the result files of the bismark software; annoCXX is used to perform annotation operations based on the results of faCXX, getCXX, and idx indexing). It is convenient to execute the program in multiple dimensions to obtain corresponding results.
[0074] The above technical solution provided by the embodiment of the present invention effectively overcomes the following defects of the Bismark software: 1) Lack of detailed annotations: The output results of Bismark lack the statistics of the number of modified and non-modified sites and the detailed annotations of the specific bases of the methylation sites, and cannot be directly used for further biological analysis; 2) Slow processing speed: The existing tools are slow when processing large-scale data, which affects the efficiency of data analysis. At the same time, based on the output results of Bismark, the number of modified and non-modified methylation sites can be counted, and the specific bases of the corresponding sites can be annotated. CXXTOOL is developed in C++ and adopts lock-free queue and multi-thread design, which greatly improves the data processing speed and has the following beneficial effects: 1) The lock-free queue and multi-thread design significantly improve the data processing speed; 2) It can count the number of methylation modifications and non-modifications at each site, and can annotate the specific bases of the methylation sites in detail to provide richer biological information; 3) It can provide an easy-to-use command line interface; 4) It defines a general sorting method for chromosome numbers and an efficient data structure for storing the number of sites; 5) It avoids the thread safety issues of multi-threaded site information storage through the coordination of multiple lock-free queues; 6) It uses a large file as the basic template and uses the method of multiple lock-free queues for synchronous consumption to fill another relatively small file as information.
[0075] Compared with Bismark software, it has the following advantages: (1) Higher processing speed: The use of lock-free queues and multi-threaded design significantly improves the data processing speed and is suitable for large-scale data sets; (2) More detailed statistical annotations: It can count the number of methylation modifications and non-modifications at each site; it can annotate the specific bases of the methylation sites in detail, providing richer biological information for further analysis; (3) Ease of use: It provides a simple and easy-to-use command line interface and supports multiple input and output formats, making it easy to integrate into existing analysis processes.
[0076] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0078] According to an embodiment of the present invention, a device for processing methylation site modification information for implementing the above-mentioned method for processing methylation site modification information is also provided. Figure 4 is a schematic diagram of a device for processing methylation site modification information according to an embodiment of the present invention. Figure 4 As shown, the device includes: a first acquisition unit 401, a second acquisition unit 403, a first processing unit 405, an adding unit 407 and a second processing unit 409. The device for processing the methylation site modification information is described below.
[0079] The first acquisition unit 401 is used to acquire the output file of the Bismark software, wherein the Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results.
[0080] The second acquisition unit 403 is used to acquire a methylation modification site file of the reference genome, wherein the methylation modification site file is used to search for all possible methylation modification sites in the reference genome.
[0081] The first processing unit 405 is used to process the output file and the methylation modification site file to obtain all possible methylation modification sites, methylation modification types and bases in the reference genome.
[0082] The adding unit 407 is used to add base annotations to all possible methylation modification sites to obtain the base types of the methylation modification sites.
[0083] The second processing unit 409 is used to generate an output result of the reference genome according to the location information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and base type of the reference genome.
[0084] It should be noted here that the above-mentioned first acquisition unit 401, second acquisition unit 403, first processing unit 405, adding unit 407 and second processing unit 409 correspond to steps S202 to S210 in the above-mentioned embodiments, and the five units are the same as the instances and application scenarios implemented by the corresponding steps, but are not limited to the contents disclosed in the above-mentioned embodiments.
[0085] As can be seen from the above, in the scheme recorded in the above embodiment of the present invention, a first acquisition unit can be used to obtain the output file of Bismark software, wherein Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; a second acquisition unit is used to obtain a methylation modification site file of the reference genome, wherein the methylation modification site file is used to find all possible sites of methylation modification in the reference genome; a first processing unit is used to process the output file and the methylation modification site file to obtain all possible methylation modification sites, methylation modification types and bases in the reference genome; an adding unit is used to add base annotations to all possible methylation modification sites to obtain the base type of the methylation modification site; a second processing unit is used to generate the output result of the reference genome according to the position information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and base type of the reference genome, thereby realizing the method of generating the output result of the reference genome according to Bismark software. The output files of smark software and the methylation modification site files are used to obtain the methylation modification and non-modification statistical results of each site in the genome and the detailed annotations of the specific bases of the methylation sites, so that the processing results of the genome can be directly used for further biological analysis, achieving the technical effect of improving the efficiency of genome data analysis and simplifying the analysis process at the genome site level.
[0086] Therefore, the above-mentioned technical solution provided by the embodiment of the present invention solves the technical problem that the output results of the Bismark software in the related art do not report the number of modifications and non-modifications of each site, and the traditional statistical method cannot efficiently process large-scale methylation site data, resulting in a complicated analysis process.
[0087] Optionally, the first acquisition unit includes: a first acquisition module, used to obtain two files of a predetermined format output by the Bismark software after the Bismark software counts the number of methylation modifications of the reference genome, wherein the two files correspond to the positive chain and negative chain of the CHH / CHG / CpG modification type respectively; a second acquisition module, used to obtain an output file based on the two files.
[0088] Optionally, the predetermined format is: a fragment identifier of a reference genome, a methylation modification identifier, a chromosome number, a site, and a methylation modification type.
[0089] Optionally, the second acquisition unit includes: a labeling module, used to label the methylation modification sites to obtain a methylation modification site file.
[0090] Optionally, the first processing unit includes: a third acquisition module, used to obtain the methylation modification results of each Reads sequencing read fragment in the output file by the Bismark software based on the reference genome; a fourth acquisition module, used to accumulate the methylation modification and unmethylated results of each site in the reference genome according to the methylation modification results, to obtain the number of methylation modified sites at each site.
[0091] Optionally, the processing device for methylation site modification information also includes: a fifth acquisition module, which is used to obtain the number of non-methylation modified sites at each site by adding the methylation modified and unmethylated sites of each site in the reference genome according to the methylation modification results.
[0092] Optionally, the adding unit includes: a third determination module, which is used to determine file 1 of all possible methylation modification sites on the reference genome and file 2 including the number of methylation modification sites and the number of non-methylation modification sites; a judgment module, which is used to read file 2 line by line with file 1 as a template, and judge whether the position of each line of file 2 read is equal to the position of the corresponding line of file 1 to obtain a judgment result; a filling module, which is used to fill the number of methylated modified fragments and the number of methylated unmodified fragments in the reference genome into the methylation modification template of the reference genome if the result indicates that the position of each line of file 2 read is equal to the position of the corresponding line of file 1.
[0093] 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 when the program is run, any one of the above-mentioned methods for processing methylation site modification information is executed.
[0094] According to another aspect of an embodiment of the present invention, a computer program product is provided, including computer instructions, which, when executed by a processor, execute any one of the above-mentioned methods for processing methylation site modification information.
[0095] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium comprising a stored program, wherein the program executes any one of the above-mentioned methods for processing methylation site modification information.
[0096] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the communication devices in a communication device group.
[0097] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining an output file of the Bismark software, wherein the Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; obtaining a methylation modification site file of the reference genome, wherein the methylation modification site file is used to find all possible sites of methylation modification in the reference genome; processing the methylation modification site file to obtain all possible methylation modification sites, methylation modification types, and bases in the reference genome; adding base annotations to all possible methylation modification sites to obtain the base type of each site; and generating the output result of the reference genome based on the location information of the methylation modification site, the chromosome corresponding to the reference genome, and the methylation modification information and base type of the reference genome.
[0098] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: after the Bismark software counts the number of methylation modifications of the reference genome, two files in a predetermined format output by the Bismark software are obtained, wherein the two files correspond to the positive chain and negative chain of the CHH / CHG / CpG modification type, respectively; an output file is obtained based on the two files.
[0099] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: annotating the methylation modification sites to obtain a methylation modification site file.
[0100] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: obtaining the methylation modification results of each Reads sequencing read fragment based on the reference genome by the Bismark software in the output file; and obtaining the number of methylation modified sites at each site by adding the methylation modified and unmethylated results of each site in the reference genome according to the methylation modification results.
[0101] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: according to the methylation modification results, the cumulative results of the methylation modification and the methylation unmodification of each site in the reference genome are obtained to obtain the number of non-methylation modified sites at each site.
[0102] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: determining file one of all possible methylation modification sites on the reference genome and file two including the number of methylation modification sites and the number of non-methylation modification sites; reading file two line by line using file one as a template, and determining whether the position of each line of file two read is equal to the position of the corresponding line of file one to obtain a determination result; if the result indicates that the position of each line of file two read is equal to the position of the corresponding line of file one, then filling the number of methylated modified fragments and the number of methylated unmodified fragments in the reference genome into the methylation modification template of the reference genome.
[0103] 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.
[0104] 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.
[0105] 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 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.
[0106] 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0107] 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.
[0108] 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-readable 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 storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned 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.
[0109] The above is only a preferred embodiment 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 method for processing methylation site modification information, characterized in that: include: Obtaining an output file of Bismark software, wherein the Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; Obtaining a methylation modification site file of the reference genome, wherein the methylation modification site file is used to search for all possible methylation modification sites in the reference genome; Processing the methylation modification site file to obtain all possible methylation modification sites, methylation modification types, and bases in the reference genome; Adding base annotations to all possible methylation modification sites to obtain the base types of the methylation modification sites; The output result of the reference genome is generated according to the position information of the methylation modification site, the chromosome corresponding to the reference genome, the methylation modification information of the reference genome, and the base type.
2. The method for processing methylation site modification information according to claim 1, characterized in that: Get the output files of Bismark software, including: After the Bismark software counts the number of methylation modifications of the reference genome, two files in a predetermined format output by the Bismark software are obtained, wherein the two files correspond to the positive strand and the negative strand of the CHH / CHG / CpG modification type, respectively; The output file is obtained according to the two files.
3. The method for processing methylation site modification information according to claim 2, characterized in that: The predetermined format is: the fragment identifier, methylation modification identifier, chromosome number, site and methylation modification type of the reference genome.
4. The method for processing methylation site modification information according to claim 1, characterized in that: Obtain the methylation modification site file of the reference genome, including: The methylation modification sites are annotated to obtain the methylation modification site file.
5. The method for processing methylation site modification information according to claim 1, characterized in that: The methylation modification site file is processed to obtain the number of all possible methylation modification sites in the reference genome, including: Obtain the methylation modification results of each Reads sequencing read fragment performed by the Bismark software based on the reference genome; According to the methylation modification results, the methylation modification and unmethylation modification of each site of the reference genome are accumulated to obtain the number of methylation modification sites at each site.
6. The method for processing methylation site modification information according to claim 5, characterized in that: Also includes: According to the methylation modification result, the methylation modification and unmethylated modification of each site of the reference genome are accumulated to obtain the number of unmethylated modified sites at each site.
7. The method for processing methylation site modification information according to claim 6, characterized in that: Add base annotations for all possible methylation modification sites to obtain the base types of the methylation modification sites, including: Determine a file 1 of all possible methylation modification sites on the reference genome and a file 2 including the number of the methylation modification sites and the number of the non-methylation modification sites; Using the file one as a template, read the file two line by line, and judge whether the position of each line of the file two is equal to the position of the corresponding line of the file one, and obtain a judgment result; When the result indicates that the position of each read line of file two is equal to the corresponding line of file one, the number of methylated fragments and the number of methylated unmodified fragments in the reference genome are filled into the methylation modification template of the reference genome.
8. A device for processing methylation site modification information, characterized in that: include: A first acquisition unit is used to acquire an output file of Bismark software, wherein the Bismark software is a tool for reading and mapping sulfite-treated sequences to a reference genome for methylation calling, and the output file is a file with methylation modification results; A second acquisition unit is used to acquire a methylation modification site file of the reference genome, wherein the methylation modification site file is used to search for all possible sites of methylation modification in the reference genome; A first processing unit is used to process the methylation modification site file to obtain all possible methylation modification sites, methylation modification types and bases in the reference genome; An adding unit, used for adding base annotations to all possible methylation modification sites to obtain the base types of the methylation modification sites; The second processing unit is used to generate an output result of the reference genome according to the position information of the methylation modification site, the chromosome corresponding to the reference genome, the methylation modification information of the reference genome, and the base type.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method for processing methylation site modification information according to any one of claims 1 to 7.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the method for processing methylation site modification information according to any one of claims 1 to 7 is performed.
