A G-quadruplex prediction method based on DNABERT fine-tuning
Through the G-quadruplex prediction method based on DNABERT fine-tuning, using large-scale endogenous sequencing data and negative sample construction of feature matching, combined with multi-head self-attention layer and feed-forward network, the data inconsistency and coding deficiencies in the existing technology are solved. problem, achieving more efficient G-quadruplex prediction and model interpretability.
Patent Information
- Application Number
- CN202410906104.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-08
AI Technical Summary
Existing G-quadruplex prediction methods are inconsistent in the construction of training data sets, the data size is small, and it is difficult to adapt to non-canonical conformations, and traditional one-hot encoding cannot capture contextual information, resulting in insufficient prediction performance and interpretability.
The G-quadruplex prediction method based on DNABERT fine-tuning was used to construct a data set containing G4 ChIP-seq and G4 CUT&Tag in vivo sequencing data of 36 human cell lines, fine-tuning using the DNABERT pre-trained model, and combining the GC of positive and negative samples. Content, length and repeated sequence matching improve the feature capture capability of the model, and DNA sequence features are extracted through multi-head self-attention layers and feed-forward networks for binary classification prediction.
It significantly improves the prediction performance of G-quadruplex and the interpretability of the model, can better capture local and global features, improves the prediction rate of the entire human genome, and enhances the accuracy and interpretability of the model.
Smart Images

Figure CN118447929B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer biology, and in particular relates to a G-quadruplex prediction method based on DNABERT fine-tuning. Background Art
[0002] Nucleic acid G-quadruplexes (G4) play a vital role in many cellular processes. Due to their importance, a variety of methods for predicting G-quadruplexes have been developed. These include rule-based methods such as the Quadparsers algorithm; scoring-based methods such as QGRS, Pqsfinder, and G4Hunter. Rule-based and scoring-based methods are based on insights into resolved G4 structures and consider a limited number of structures. However, these structures can describe an incomplete picture of the various possibilities of G4 conformations, but cannot adapt to situations that may deviate from the canonical pattern. If the goal is to predict new conformations or sequences computationally, then this strategy is difficult to apply accurately.
[0003] For example, there are machine learning-based methods such as Quadron, G4Boost, and G4Beacon; and deep learning-based algorithms such as PENGUINN, G4detector, DeepG4, G4mismatch, and epiG4NN. Machine learning and deep learning methods avoid predefined motif restrictions to improve the accuracy of non-canonical G4 analysis, but existing algorithms are inconsistent in the construction of training data sets. Some use in vitro sequencing data as positive samples, while others use the intersection of in vitro and in vivo sequencing as positive samples. The data set size is also small, which limits the advantages of machine learning.
[0004] Natural language processing (NLP) algorithms are developing rapidly, but their application in G4 prediction is relatively lagging behind. At present, the sequence information extraction of deep learning prediction method models still uses one-hot encoding. Traditional one-hot encoding only symbolizes the sequence, does not contain any semantics, and cannot capture contextual information. Summary of the invention
[0005] The purpose of the present invention is to provide a G-quadruplex prediction method based on DNABERT fine-tuning, which improves the prediction performance of G-quadruplex and enhances the interpretability of the model.
[0006] To achieve the above-mentioned object of the invention, the technical solution of the present invention is as follows:
[0007] A G-quadruplex prediction method based on DNABERT fine-tuning, comprising:
[0008] Build the dataset:
[0009] Obtain sequence data from different cell lines and use prediction tools to predict potential quadruplex-forming sequences PQS;
[0010] The PQS was intersected with the G4 peak obtained by high-throughput sequencing technology;
[0011] The PQS that overlapped with the G4 peak by at least one base pair was defined as eG4 as a positive sample;
[0012] Construct negative samples based on the obtained positive samples, and use the genNullSeqs function to generate negative samples that match the GC content, length, and repeat sequence of the positive samples to obtain a data set consisting of positive samples and negative samples;
[0013] Fine-tune the DNABERT pre-trained model using the dataset:
[0014] Use the vocabulary of the DNABERT pre-trained model to segment the data set and convert positive and negative samples into tokenized sequences of consistent length;
[0015] The DNABERT pre-trained model includes an Encoder block module and a multi-head perceptron, which directly provides the tokenized sequence to the input embedding layer for fine-tuning.
[0016] Preferably, the model input uses alternating positive and negative samples.
[0017] The prediction model based on DNABERT encoding can better capture the local characteristics and global features in G4 sequences. However, in practical applications, the prediction results of existing DNABERT models on specific tasks vary greatly. Although the DNABERT model has learned some basic sequence features and patterns, it is difficult to capture the specific features and details of the task in specific downstream tasks such as gene regulatory element identification and mutation prediction, and cannot achieve accurate prediction of G-quadruplexes.
[0018] The present invention uses the largest endogenous G-quadruplex sequencing data to date as a training data set, including G4 ChIP-seq and G4 CUT&Tag in vivo sequencing data of 36 human cell lines. By establishing a data set with matching GC content, length and repeat sequences of positive and negative samples, the effect of fine-tuning training is further improved; the labeled sequence is directly provided to the input embedding layer for fine-tuning to improve the model's ability to capture specific features and details, thereby improving the model's predictive performance.
[0019] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the construction of negative samples includes using the human genome data package, calling the genNullSeqs function, randomly extracting positive sample sequences from the specified BED file, and generating negative samples that match their GC content, length and repeat sequence.
[0020] When constructing negative samples in the present invention, it is necessary to ensure that they are highly matched with positive samples in terms of GC content, length, and repeat sequence characteristics. This matching process may be time-consuming and complicated, especially when a large number of negative samples need to be generated. It may be difficult to find a suitable match for some sequences, which also increases the difficulty of generating matching negative samples. Construction method: Use the gkmSVM package in R language and the BSgenome.Hsapiens.UCSC.hg19.masked genome data package. Call the genNullSeqs function to extract the positive sample sequence from the specified BED file and generate a negative sample that matches its GC content, length, and repeat sequence. Negative samples are generated by randomly selecting regions in the genome and screening them to match the above characteristics.
[0021] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the difference in the number of positive and negative samples in the dataset is less than 4.5%.
[0022] The number of positive and negative samples should be roughly equal to prevent the model from being biased towards the majority class. In classification tasks, if the difference in the number of positive and negative samples is too large, the model may tend to predict the majority class, affecting the model's prediction accuracy.
[0023] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the Encoder block module includes an input embedding layer, an Encoder block layer and a final hidden layer, and the Encoder block layer includes 12 serially connected Encoder blocks executed sequentially.
[0024] The 12 encoder blocks of the present invention are executed sequentially, and the output of the first encoder block becomes the input of the second block, and the output of the second block becomes the input of the third block, and so on, until the 12th block. The encoder blocks are connected in series, and the output of one block directly serves as the input of the next block. This creates a deep network, so that the input sequence is gradually transformed through each layer, allowing the model to learn more and more abstract and advanced features.
[0025] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the Encoder block layer includes a multi-head self-attention layer, and the upstream and downstream information M of the DNA base is captured through the multi-head self-attention mechanism of the multi-head self-attention layer. The formula is as follows:
[0026] (1)
[0027] in:
[0028] (2)
[0029] and , , are the learning parameters of the linear projection, yes , The number of columns in the matrix, i.e. the vector dimension, the head value is the next hidden state M, is the sum of the attention scores between each two short sequences. MultiHead() adds multiple The independently calculated head results are concatenated, the input and output of the multi-head self-attention layer are added, and the layer is normalized after residual connection to normalize the activation value of each layer.
[0030] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the Encoder block layer also includes a feedforward network, and the feedforward network includes two fully connected layers. The activation function of the first layer is Relu, and the second layer does not use an activation function. The corresponding formula is as follows:
[0031] (3)
[0032] in X Represents the input of the feedforward network. The dimension of the output matrix finally obtained by the feedforward network is the same as X Consistent, the input and output of the feedforward network are added together and then layer normalized;
[0033] The output of the last hidden layer state is used as the feature of the final sequence extraction.
[0034] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the multi-head perceptron includes using a fully connected layer for prediction, inputting the features extracted from the final sequence, and after feature fusion, the fully connected layer maps the fused features to a low-dimensional representation space, learns the relationship between samples and labels, and sends the features to one or more fully connected layers, applies an activation function, and realizes the final binary classification of the G-quadruplex.
[0035] In the present invention, BertPooler is responsible for converting the representation of the entire input sequence into a vector of fixed dimension, which includes a linear layer whose input dimension corresponds to the state dimension of the last hidden layer, and whose output dimension is the same as the input dimension. An activation function is connected after the linear layer, and the activation function is preferably a hyperbolic tangent function ( ).
[0036] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the multi-head perceptron also includes a Classifier classifier to perform a linear transformation.
[0037] The ReLU activation function is used to introduce nonlinear characteristics.
[0038] After the Dropout layer, some elements of the input are randomly discarded to prevent overfitting.
[0039] The output of the model predicts the probability of G4 formation.
[0040] Through the Classifier classifier, i.e. the Sequential module, a linear transformation is performed and the ReLU activation function is used to introduce nonlinear characteristics. Then, through the Dropout layer, some input elements are randomly discarded with probability p=0.1 to prevent overfitting. The output model predicts the probability of G4 formation.
[0041] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, part of the data is extracted from the dataset as an independent dataset, and the independent dataset is used to perform motif analysis on the trained DNABERT fine-tuning model to explain the features that the model focuses on.
[0042] In the above-mentioned G-quadruplex prediction method based on DNABERT fine-tuning, the explanation of the DNABERT fine-tuning model specifically includes:
[0043] The fine-tuned DNABERT model was used to calculate the attention score, and motif analysis was performed on an independent dataset. The p-value was used to screen the motifs, and the motifs whose frequency in the positive samples was significantly higher than the cutoff p-value of 0.005 were retained.
[0044] Merge the screened motifs to remove duplicate or highly similar motifs;
[0045] The motif length was defined by setting the window size to draw the weblogo diagram and extract the key features and distribution of endogenous G-quadruplexes.
[0046] Motif analysis in the validation set includes counting the number of times a specific sequence appears in the positive sample to calculate the p-value, which is used to measure whether the sequence is significantly enriched in the G4 positive sample set.
[0047] This method can perform motif analysis and attention score visualization to enhance model interpretability.
[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0049] (1) The present invention uses the largest endogenous G-quadruplex sequencing data to date as a training dataset, including G4 ChIP-seq and G4 CUT&Tag in vivo sequencing data of 36 human cell lines. The prediction performance of the model is improved by fine-tuning the DNABERT model. Compared with traditional one-hot encoding, the prediction model based on DNABERT encoding can better capture the local characteristics and global features in G4 sequences. This method can visualize the attention score of motif analysis and enhance the interpretability of the model.
[0050] (2) The G-quadruplex prediction method based on DNABERT fine-tuning in the present invention can significantly improve the prediction rate of the model for the whole human genome. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 Flow chart of the G-quadruplex prediction method based on DNABERT fine-tuning of the present invention;
[0052] Figure 2 This is a schematic diagram of the distribution of the G4 training data set of the present invention;
[0053] Figure 3 This is a schematic diagram of the DNABERT model solution of the present invention;
[0054] Figure 4 This is a graph of machine learning test results of the present invention;
[0055] Figure 5 The ROC curves of the five models of the present invention are shown in FIG.
[0056] Figure 6 This is the prediction result diagram of the DNABERT and G4 detector models of the present invention;
[0057] Fig. 7A The G4 motif analysis map shows 659 instances of GGGGA;
[0058] Figure 7B This is a G4 motif analysis diagram showing 5 instances of CTGGG;
[0059] Figure 7CThe G4 motif analysis map shows 40 occurrences of GAGGG;
[0060] Fig.7D The G4 motif analysis map shows 23 instances of GGTGG;
[0061] Fig. 7E The G4 motif analysis map shows 101 instances of GGGCG;
[0062] Figure 7F This is a G4 motif analysis diagram showing 6 instances of GGCTG;
[0063] Figure 7G This is a G4 motif analysis diagram showing 11 instances of GGGTT;
[0064] Figure 7H This is a G4 motif analysis diagram showing three instances of GGCCA;
[0065] Figure 8 Schematic diagram of the G-quadruplex results predicted by the DNABERT model and the G4Hunter model of the present invention. DETAILED DESCRIPTION
[0066] Specific implementation modes are listed below to further explain the technical solution of the present invention in detail.
[0067] like Figure 1 As shown, this embodiment provides a G-quadruplex prediction method based on DNABERT fine-tuning, and the specific steps are as follows:
[0068] Build the dataset:
[0069] Obtain sequence data from different cell lines and use prediction tools to predict potential quadruplex-forming sequences PQS;
[0070] The PQS was intersected with the G4 peak obtained by high-throughput sequencing technology;
[0071] The PQSs that overlapped with the G4 peak by at least one base pair were defined as eG4 as positive samples;
[0072] Based on the obtained eG4 positive samples, sequences with multiple features similar to the positive samples are randomly extracted from the human genome as negative samples, and a data set consisting of positive samples and negative samples is obtained.
[0073] EndoQuad was used to download the data from different cell lines (K562, IPSC.derived_neurons, A549, H975, HeLa.S3, HEK293T, HepG2, 93T449, AB521M, AB551, AB555M, AB577M, AB580, AB636M, AB790, AB863M, HCI005, HCI009, PAR1006, PAR1022, STG139, STG139M_181, STG139M_284, The data of EndoQuad were used to predict the potential quadruplex-forming sequences (PQS) with the peaks of G4 ChIP-seq and G4CUT&Tag sequencing using the pqsfinder tool. PQS with ≥1bp overlap with the G4 peak was defined as eG4, otherwise it was defined as non-eG4. The positive sample sequence data set was obtained.
[0074] For the positive sample sequence dataset, negative control sequences were obtained using the following steps: using the genNullSeqs function of the gkmSVM R package (https: / / cran.r-project.org / web / packages / gkmSVM), sequences were randomly extracted from the human genome whose length, GC content (%GC), and repeat content (number of tandem repeats from the Tan-demRepeatFinder mask of the hg19 genome) were similar to the positive DNA sequences.
[0075] like Figure 2 As shown, the length distribution of positive samples and negative samples is visualized using a violin plot. In the G4 dataset provided in this embodiment, the length distribution of positive samples and negative samples is almost completely consistent.
[0076] The new data set is divided into: 391,503 G4 positive sample sequences and 409,248 negative sample sequences are used for model training, testing, and verification.
[0077] In order to ensure the randomness of the distribution of positive and negative sample data, the model is input alternately according to positive and negative samples, and the ratio of training set, test set and validation set is 84:8:8, that is, 84% of the data is used for training, 8% for testing, and the remaining 8% for validation.
[0078] Fine-tuning training of DNABERT model: Pre-train the DNABERT model to obtain the vocabulary and parameters of the pre-trained model, process the data of the training set and obtain the input embedding layer according to the vocabulary, use the input embedding layer to fine-tune the DNABERT model, use AdamW with fixed weight decay as the optimizer, and apply dropout to the output layer to obtain the DNABERT fine-tuning model.
[0079] The detailed scheme of DNABERT model is as follows Figure 3 As shown in Figure 2. DNABERT uses the encoder structure of the Transformer model, which connects all relevant DNA bases in the context from different perspectives to extract the features of the DNA sequence. Unlike the ordinary Transformer model, the input sequence can be a single sentence or a concatenation of two sentences. The input of the model is the original sequence with a length less than 521. [CLS] is added to the first position of the input, and a special token [SEP] is used to separate the two sentences.
[0080] First, for the G4 sequence, use , iteratively divide the nucleic acid sequence into k base sequences. The obtained set of k-mer labeled sequences is used as the input of Token Embedding. The word embedding layer encodes each k-mer according to the vocab vocabulary of the pre-trained model and outputs Token Embedding. The position embedding layer encodes each k-mer starting from 0 according to the position and outputs Positional Embedding. The word embedding layer and the position embedding layer are added to obtain the final input embedding layer InputEmbedding.
[0081] Then, starting from the pre-trained parameters, DNABERT was fine-tuned with endogenous G4 (eG4) sequencing data. AdamW with fixed weight decay was used as the optimizer, and dropout was applied to the output layer. The key step of this example is to extract features from the G4 chain sequence using the DNABERT model.
[0082] In this embodiment, the fine-tuning of the DNABERT model is to feed the output of the Input Embedding layer to the Encoder block module of 12 Transformers. The Transformer captures the upstream and downstream information M of the DNA base by executing a multi-head self-attention mechanism:
[0083] The formula is as follows,
[0084] (1)
[0085] in:
[0086] (2)
[0087] and , , are the learning parameters of the linear projection, yes , The number of columns in the matrix, i.e. the vector dimension, the head value is the next hidden state M, is the sum of the attention scores between each two short sequences. MultiHead() adds multiple The independently calculated head results are concatenated, the input and output of the multi-head self-attention layer are added, and the layer is normalized after residual connection to normalize the activation value of each layer.
[0088] The input and output of the multi-head self-attention layer are added together and residual connection is performed to prevent network degradation. Then layer normalization is performed to normalize the activation values of each layer.
[0089] The feedforward network layer is a two-layer fully connected layer. The activation function of the first layer is Relu, and the second layer does not use an activation function. The corresponding formula is as follows:
[0090] (3)
[0091] Where X represents the input of the feedforward network layer and is also the output of the normalization layer. The dimension of the output matrix obtained by the Feed Forward layer is consistent with X. The result of adding the input of the feedforward network and the output of the feedforward network is then normalized to prevent network degradation.
[0092] Execute the entire Encoder block module 12 times. The 12 Encoder blocks are executed sequentially. The output of the first Encoder block becomes the input of the second block, the output of the second block becomes the input of the third block, and so on, until the 12th block.
[0093] These encoder blocks are connected in series. The output of one block is directly used as the input of the next block. This creates a deep network, which gradually transforms the input sequence through each layer, allowing the model to learn more and more abstract and advanced features.
[0094] , and They represent the position of the marker t, the input embedding and the final hidden state respectively. Finally, the output of the hidden state of the Encoder block is used as the feature extracted from the final DNA sequence.
[0095] In order to further improve the prediction accuracy of the model, the model of this embodiment also includes a multi-head perceptron. The last hidden layer state is followed by BertPooler, which is responsible for converting the representation of the entire input sequence, that is, the representation of all tokens, into a vector of fixed dimension, including a linear layer , the input dimension of this linear layer is 768 (corresponding to the hidden state dimension of the BERT model), and the output dimension is also 768. Then, an activation function is followed by the hyperbolic tangent function .
[0096] Then: through the Classifier classifier, that is, the Sequential module, a linear transformation is performed, and the ReLU activation function is used to introduce nonlinear characteristics. Then through the Dropout layer, the probability Randomly discard some elements of the input to prevent overfitting. The output model predicts the probability of G4 formation.
[0097] Test the prediction results of the DNABERT fine-tuning model: Select a machine learning model to train on the training set, and test the trained machine learning model and the DNABERT fine-tuning model on the test set respectively to test the fine-tuning results of the DNABERT fine-tuning model.
[0098] The typical machine learning methods SVM, CNN, RF and XGBOOST were used to build models and compared with the DNABERT fine-tuning model. The machine learning model used five-fold cross validation, and calculated the average results of the model evaluation indicators. It was tested with an independent test set, and the six evaluation indicators Pre (precision), Acc (accuracy), MCC (Matthews correlation coefficient), F1 (F1 score), AUC (area under the ROC curve), and Recall were used to evaluate the effect of the prediction model. The comparison results are shown in Figure 2. Figure 4 The ROC curve results of the corresponding model are shown as follows Figure 5 The DNABERT fine-tuning model provided in this embodiment performs well in all six rating indicators, and each value is greater than 0.99, that is, the fine-tuning result of the DNABERT fine-tuning model in this embodiment is relatively successful.
[0099] In addition, this embodiment uses the G4detector model to train on the training set, and uses the test set to predict the G4detector model and the DNABERT fine-tuning model respectively. Figure 6 shown.
[0100] In the test, Test Loss: 0.0118, Test Accuracy: 0.9920, Test MAE: 0.0176. On the independent test set, the accuracy of the DNABER fine-tuning model is 0.99591, and the accuracy of G4detector is 0.992; the mean absolute error of the DNABER fine-tuning model is 0.00506, and the mean absolute error of G4detector is 0.0176. This shows that the accuracy of the DNABER fine-tuning model has been significantly improved.
[0101] Therefore, the fine-tuning method provided in this embodiment enables the DNABER fine-tuning model to perform excellently on the G4 dataset and can effectively predict G-quadruplexes.
[0102] Explain the DNABERT fine-tuning model: Use the validation set to perform motif analysis on the tested DNABERT fine-tuning model and explain the features that the model focuses on.
[0103] The fine-tuned DNABERT model is used to calculate the model attention score, and motif analysis explains the features that the model pays attention to.
[0104] Motif analysis was performed on the validation set. The number of times a sequence appeared in the positive sample was counted, and the p-value was calculated to measure whether the sequence was significantly enriched in the G4 positive sample set. These motifs were then screened, and the motifs whose frequency in the positive sample was significantly higher than the cutoff p-value of 0.005 were retained. The screened motifs were then merged to remove duplicate or highly similar motifs. Finally, a window size of 24 was used to define the motif length and a weblogo graph was drawn. The G4 motif analysis graph statistically shown in this embodiment is shown in Figure 2. Figure 7A-7H As shown. Combined Figure 7A-7H The DNABERT fine-tuning model provided in this embodiment can obviously extract the key features and distribution of endogenous G4 and quickly identify new G4 patterns.
[0105] The verified DNABERT fine-tuned model can quickly and accurately predict G-quadruplexes.
[0106] The prediction model provided in this embodiment and the G4Hunter model are used to predict the human genome. The prediction results are as follows: Figure 8 shown.
[0107] The endogenous eG4s obtained from the experiment and the G-quadruplexes predicted by the DNABERT model were calculated to overlap the eG4s. It was found that the model of this embodiment predicted 98.0% of the positive samples.
[0108] ;
[0109] When the G4Hunter model threshold is 1.5, 10.5% of the positive samples are predicted.
[0110] .
[0111] It can be seen that this embodiment significantly improves the accuracy of the model for G-quadruplex prediction.
[0112] It should be appreciated that embodiments of the present invention may be implemented or enforced by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable memory. The method may be implemented in a computer program using standard programming techniques - including a non-transitory computer-readable storage medium configured with a computer program, wherein the storage medium so configured causes the computer to operate in a specific and predefined manner - according to the methods and drawings described in the specific embodiments. Each program may be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, if desired, the program may be implemented in an assembly or machine language. In any case, the language may be a compiled or interpreted language. In addition, the program may be run on a programmed ASIC for this purpose.
[0113] Furthermore, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.
[0114] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or part thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described herein includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques described in the present invention, the present invention also includes the computer itself. The computer program can be applied to input data to perform the functions described herein, thereby converting the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the converted data represents a physical and tangible object, including a specific visual depiction of the physical and tangible object produced on a display.
[0115] As used in this application, the terms "component", "module", "system", etc. are intended to refer to a computer-related entity, which can be hardware, firmware, a combination of hardware and software, software, or software in operation. For example, a component can be, but is not limited to: a process running on a processor, a processor, an object, an executable file, a thread in execution, a program, and / or a computer. As an example, an application running on a computing device and the computing device can both be components. One or more components can exist in a process and / or thread in execution, and a component can be located in a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures thereon. These components can communicate in a local and / or remote process manner, such as according to a signal having one or more data packets (e.g., data from a component that interacts with another component in a local system, a distributed system, and / or interacts with other systems in a signal manner through a network such as the Internet).
[0116] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A G-quadruplex prediction method based on DNABERT fine-tuning, characterized in that: include: Build the dataset: Obtain sequence data from different cell lines and use prediction tools to predict potential quadruplex-forming sequences PQS; The PQS was intersected with the G4 peak obtained by high-throughput sequencing technology; The PQSs that overlapped with the G4 peak by at least one base pair were defined as eG4 as positive samples; Constructing negative samples according to the obtained positive samples, and using the genNullSeqs function to generate negative samples that match the GC content, length, and repeat sequence of the positive samples, wherein constructing the negative samples includes using a human genome data package, calling the genNullSeqs function, randomly extracting positive sample sequences from a specified BED file, and generating negative samples that match the GC content, length, and repeat sequence of the positive sample sequences; A data set consisting of positive samples and negative samples is obtained; the difference in the number of positive and negative samples in the data set is less than 4.5%; Fine-tune the DNABERT pre-trained model using the dataset: Use the vocabulary of the DNABERT pre-trained model to segment the data set and convert positive and negative samples into tokenized sequences of consistent length; The DNABERT pre-trained model includes an Encoder block module and a multi-head perceptron, which directly provides the tokenized sequence to the input embedding layer for fine-tuning, uses AdamW with fixed weight decay as the optimizer, and adopts dropout to the output layer to obtain the DNABERT fine-tuning model; The Encoder block module includes an input embedding layer, an Encoder block layer and a final hidden layer. The Encoder block layer includes 12 serially connected Encoder blocks executed sequentially. The encoder block layer also includes a multi-head self-attention layer, which captures the upstream and downstream information of the DNA bases through the multi-head self-attention mechanism of the multi-head self-attention layer, adds the input and output of the multi-head self-attention layer, performs layer normalization after residual connection, and normalizes the activation value of each layer; The Encoder block layer also includes a feedforward network, which includes two fully connected layers. The activation function of the first layer is Relu, and the second layer does not use an activation function. The corresponding formula is as follows: in X Represents the input of the feedforward network. The dimension of the output matrix finally obtained by the feedforward network is the same as X Consistent, the input and output of the feedforward network are added and then layer normalized; the output of the last hidden layer state is used as the feature of the final sequence extraction; The multi-head perceptron includes using a fully connected layer for prediction, inputting the features extracted from the final sequence, and after feature fusion, the fully connected layer maps the fused features to a low-dimensional representation space, learns the relationship between samples and labels, and sends the features to one or more fully connected layers, applies an activation function, and realizes the final binary classification of the G-quadruplex; The multi-head perceptron also includes a Classifier classifier to perform linear transformation. The ReLU activation function is used to introduce nonlinear characteristics. After the Dropout layer, some elements of the input are randomly discarded to prevent overfitting. The output model predicts the probability of G4 formation; Extract some data from the dataset as an independent dataset and use the independent dataset to perform motif analysis on the trained DNABERT fine-tuning model to explain the features that the model focuses on, including: The fine-tuned DNABERT model was used to calculate the attention score, and motif analysis was performed on an independent dataset. The p-value was used to screen the motifs, and the motifs whose frequency in the positive samples was significantly higher than the cutoff p-value of 0.005 were retained. Merge the screened motifs to remove duplicate or highly similar motifs; The motif length was defined by setting the window size to draw the weblogo diagram and extract the key features and distribution of endogenous G-quadruplexes.
2. A G-quadruplex prediction method based on DNABERT fine-tuning according to claim 1, characterized in that: The formula for the multi-head self-attention layer to capture the upstream and downstream information M of the DNA base through the multi-head self-attention mechanism is as follows: in: and , , are the learning parameters of the linear projection, yes , The number of columns in the matrix, i.e. the vector dimension, the head value is the next hidden state M, is the sum of the attention scores between each two short sequences. MultiHead() adds multiple The independently calculated head results are concatenated.
