A gene editing off-target effect prediction method based on feature engineering
By combining feature engineering and deep learning, we extracted and fused diverse features, which solved the problem of dataset imbalance in the prediction of off-target effects in the CRISPR/Cas9 system, improved prediction accuracy and model generalization ability, and enhanced the safety and accuracy of gene editing.
Patent Information
- Application Number
- CN202310402256.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-14
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-04-14
AI Technical Summary
Existing off-target effect prediction methods for CRISPR/Cas9 systems cannot fully utilize diversity features, and imbalanced datasets lead to decreased model generalization performance, affecting the accuracy and safety of gene editing.
We employ a feature engineering-based approach, combining an LSTM network, a GRU feature fusion module, convolutional layers, and dense layers to extract features. We also incorporate the SMOTE method for oversampling and undersampling, and train the DenseNet deep learning model to integrate biological and sequence features, thereby optimizing feature selection and model structure.
It improves the accuracy and generalization ability of CRISPR/Cas9 off-target prediction, enhances the overall performance of the model, and solves the problems of deep learning models being unable to integrate diverse features and imbalanced datasets.
Smart Images

Figure CN116364173B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of bioinformatics, and particularly relates to a gene editing off-target effect prediction method based on feature engineering. BACKGROUND
[0002] The CRISPR / Cas9 system mediated genome editing technology is the third generation of "genome site-directed editing technology" after the zinc finger nuclease and the transcription activator-like effector nuclease, which can edit and modify the DNA sequence at a specific position. The technology is low in cost, easy to operate, and has made a series of remarkable achievements in the fields of gene knockout, gene expression regulation and genome base editing, and has attracted attention.
[0003] However, there are still many problems to be solved in this technology, and off-target effect is one of the problems that have a greater impact. Off-target effect leads to serious medical risks and hinders the further clinical application of the CRISPR / Cas9 system.
[0004] Therefore, off-target prediction has a great evaluation significance for guiding the design of good sgRNA and the efficiency and risk of genome editing.
[0005] However, different alignment-based methods allow different conditions, which affect the integrity of potential off-target site search (for example, the Bowtie and Cas-OFFinder tools have different requirements for PAM type and base mismatch number). The main problem solved by the score-based method is to score potential off-target sites (predict the possibility of off-target occurrence).
[0006] Through retrieval, the Chinese patent with the application number CN111261223B discloses a CRISPR off-target effect prediction method based on deep learning, which actually utilizes the prior information of the genome and solves the problem of unbalanced experimental data labels by using the SMOTE method, and also considers using a deep learning scheme.
[0007] However, there are many types of features related to off-target prediction, and these calculation methods cannot fully utilize or can only utilize relatively single features for model training. Although the deep learning model has good ability to learn high-dimensional abstract feature patterns, it loses other prior feature information such as biological structure features, thermodynamic features, and scores, so that the model learning performance has a relatively large bottleneck.
[0008] On the other hand, the CRISPR / Cas9 off-target dataset generally has a sample imbalance problem, that is, the number of positive and negative samples is very uneven, and the number of positive samples is much smaller than that of negative samples. This poses a great challenge to the generalization performance of deep learning algorithms. The model trained on an unbalanced dataset often has difficulty learning the feature mode of the positive sample completely, so that the model training accuracy is very high, but the performance often decreases greatly in actual prediction. SUMMARY
[0009] The purpose of the present application is to solve the defects in the prior art and provide a gene editing off-target effect prediction method based on feature engineering.
[0010] In order to achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0011] A gene editing off-target effect prediction method based on feature engineering comprises the following steps:
[0012] S1: Obtain a public dataset: obtain public experimental data containing sgRNA sequences and target DNA sequences that do not match as possible off-target sequences, the dataset includes GUIDE-Seq, HTGTS, and BLESS;
[0013] S2: Each sequence sample has a length of 23 bases and ends with NGG. The label of the dataset is preprocessed, the sample containing the off-target site is marked as a positive sample, and the label is 1. The sample not containing the off-target site is marked as a negative sample, and the label is 0;
[0014] S3: Encode the sample dataset and add features;
[0015] S4: Extract features through an LSTM network model, wherein the LSTM network model comprises a convolution feature fusion module, a gated recurrent unit feature fusion module, a convolution layer, and a dense layer;
[0016] S5: Combine the sequence feature score with the manual feature score;
[0017] S6: Over-sample the positive samples using the SMOTE method, and select a corresponding number of negative samples in combination with under-sampling;
[0018] S7: Divide the dataset samples obtained after processing into a training set and a test set according to a ratio of 85:15;
[0019] S8: Select and filter the sample features using embedded feature selection;
[0020] S9: The trained model is evaluated using the test set, and the main evaluation indicators are Accuracy and AUC value, wherein the higher the Accuracy, the better the prediction accuracy, and the higher the AUC, the better the prediction stability and classification effect.
[0021] Further, in step S3, the following steps are specifically included:
[0022] The four bases A, T, G, and C are encoded as five one-hot vectors (1, 0, 0, 0, 0), (0, 1, 0, 0, 0), (0, 0, 1, 0, 0), (0, 0, 0, 1, 0), (0, 0, 0, 0, 1) by deleting the base, and the base pair encoding is obtained by using or operation, and two direction channels are added to help distinguish the base pair type;
[0023] The encoded feature vector is learned using the LSTM network, and a sequence-based feature off-target prediction score is obtained.
[0024] Further, in step S4, the model input is the above-mentioned sgRNA-DNA sequence pair encoding matrix, and the size of the encoding matrix is (23, 7), wherein 23 is the sequence length and 7 is the encoding bit number of the nucleotide pair.
[0025] Further, the sequence feature processing process after encoding is as follows:
[0026] The encoding matrix is input into the convolution feature fusion module, wherein the convolution feature fusion module is composed of multiple convolution modules, and each convolution module includes a convolution layer, a batch normalization layer, and a PReLU activation layer.
[0027] Multiple convolution kernels are stacked to form a convolution layer, and through the convolution layer, the model sequentially performs convolution operation on the encoding of each nucleotide pair to obtain the abstract type feature of the nucleotide pair.
[0028] The input and the output of the convolution module are spliced to construct a feature map with high and low layer nucleotide pair type features.
[0029] Subsequently, the feature map extracted by the convolution feature fusion module is input into the forward GRU feature fusion module and the reverse GRU feature fusion module, wherein both fusion modules are based on the GRU module and each GRU module includes a GRU layer, a batch normalization layer, a PReLU activation layer, and a dropout layer.
[0030] The forward GRU feature fusion module, the reverse GRU feature fusion module, and the feature map output by the convolution feature fusion module are stacked and merged for subsequent network layer feature learning.
[0031] The average pooling operation makes small changes to features approximately invariant, thus improving the model's generalization ability.
[0032] Finally, the extracted features are input into the dense layer to predict the scores where off-target effects occur.
[0033] Furthermore, step S5 specifically includes the following steps:
[0034] The sgRNA, together with six features, forms a feature vector, which is further enriched with biological characteristics and corresponding binary classification labels of 0 or 1. The six features include: CFD score of DNA pair, CCTop score, CRISTA score, GC content, number of mismatches, and sgRNA-DNA sequence similarity score.
[0035] Furthermore, step S6 is also used to clean the noisy data, specifically by using the SMOTEENN method from the imblearn package to obtain the final positive and negative samples.
[0036] Furthermore, in step S8, the learner adopts the DenseNet deep learning model, whose network structure consists of dense blocks and transition layers. The dense blocks are used to define how to connect the input and output, and the transition layers are used to control the number of channels so that the model is not too complex.
[0037] Furthermore, the specific process of using the DenseNet deep learning model is as follows:
[0038] DenseNet first uses a single convolutional layer and a max-convergence layer, where batch regularization is added to correspond to the embedded feature selection filtering mentioned above.
[0039] Next, four dense blocks are used, and each dense block uses four convolutional layers. The number of channels in the convolutional layers in the dense block is set to 32, so each dense block will have 128 more channels. Between each block, DenseNet uses a transition layer to halve the height and width, and halve the number of channels.
[0040] Finally, a global aggregation layer and a fully connected layer are added to output the result.
[0041] Compared with existing technologies, the beneficial effects of this invention are: solving the problems of deep learning models being unable to integrate diverse features and imbalanced datasets, improving the off-target prediction accuracy and generalization ability of CRISPR / Cas9, and enhancing the overall performance of the model. Attached Figure Description
[0042] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0043] Figure 1 A flowchart of the gene editing off-target effect prediction method based on feature engineering proposed by the present application is shown in the figure.
[0044] Figure 2 A logic diagram of the gene editing off-target effect prediction method based on feature engineering proposed by the present application is shown in the figure. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments.
[0046] Embodiment one
[0047] Reference Figure 1 The gene editing off-target effect prediction method based on feature engineering comprises the following steps:
[0048] S1: Obtain a public data set: obtain public experimental data containing sgRNA sequences and target DNA sequences that do not match as possible off-target sequences, and the data set includes GUIDE-Seq, HTGTS, and BLESS;
[0049] S2: Each sequence sample is 23 bases long and ends with NGG (where N is any one of ACGT), and the data set label is preprocessed, the sample containing the off-target site is marked as a positive sample, and the label is 1, and the sample not containing the off-target site is marked as a negative sample, and the label is 0;
[0050] S3: Encode the sample data set and add features;
[0051] S4: Extract features through an LSTM network model, wherein the LSTM network model comprises a convolution feature fusion module, a gated recurrent unit (GRU) feature fusion module, a convolution layer, and a dense layer;
[0052] S5: Combine the sequence feature score with the manual feature score;
[0053] S6: Use the SMOTE method to oversample the positive samples, and combine the under-sampling to select a corresponding number of negative samples;
[0054] S7: Divide the data set samples obtained after processing into a training set and a test set according to a ratio of 85:15;
[0055] S8: Use embedded feature selection to select and filter the sample features.
[0056] The method is selected because the embedded feature selection integrates the feature selection process and the learner training process into one, both of which are completed in the same optimization process, i.e., the feature selection is automatically performed in the learner training process;
[0057] Specifically, L1 regularization can be used in the classification model training to process the loss function of the deep network, so that the result is more likely to obtain a "sparse" solution, i.e., the feature vector has fewer non-zero components.
[0058] S9: The trained model is evaluated using a test set, and the main evaluation indicators are Accuracy and AUC value, wherein the higher the Accuracy, the better the prediction accuracy, and the higher the AUC, the better the prediction stability and classification effect.
[0059] Embodiment two
[0060] As Figures 1-2 shown, based on embodiment one, more specifically:
[0061] A gene editing off-target effect prediction method based on feature engineering, comprising the following steps:
[0062] S10: Obtain public data set: obtain public experimental data containing sgRNA sequence and target DNA sequence mismatch as possible off-target sequence, the data set includes GUIDE-Seq, HTGTS, and BLESS;
[0063] S20: Each sequence sample has a length of 23 bases and ends with NGG (where N is any one of ACGT). The data set label is preprocessed, and the sample containing the off-target site is marked as a positive sample with a label of 1; the sample not containing the off-target site is marked as a negative sample with a label of 0;
[0064] S30: Encode the sample data set and add features, the specific steps are:
[0065] S301: In addition, two direction channels are added to help distinguish base pair types. Taking C-T mismatch as an example, the type channel code is (0, 1, 0, 1, 0), and the C-T mismatch is determined by the direction channel code (0, 1). The type channel of T-C mismatch is (0, 1, 0, 1, 0), and the direction channel code is (1, 0);
[0066] S302: Use the LSTM network to learn the features of the encoded feature vector, and obtain an off-target prediction score based on sequence features.
[0067] S40: The above LSTM network model for extracting features mainly includes four parts:
[0068] a convolutional feature fusion module, a gated recurrent unit (GRU) feature fusion module, a convolutional layer, and a dense layer.
[0069] The model input is a coding matrix for the sgRNA-DNA sequence pair. The coding matrix has a size of (23, 7), where 23 is the sequence length and 7 is the number of coding bits for the nucleotide pair. The sequence feature processing process after coding is as follows:
[0070] S401: First, the coding matrix is input into the convolutional feature fusion module. The convolutional feature fusion module is composed of multiple convolutional modules, each of which includes a convolutional layer, a batch normalization layer, and a PReLU activation layer. Convolution operation is another representation of input data, which obtains new features by convolving the input data with a convolution kernel. The convolution kernel is also called a filter, which is usually a two-dimensional matrix used to extract data features. Multiple convolution kernels are stacked to form a convolutional layer. Through the convolutional layer, the model sequentially convolves the coding of each nucleotide pair to obtain the abstract type features of the nucleotide pair. Subsequently, the input is spliced with the output of the convolutional module to construct a feature map with high and low layer nucleotide pair type features;
[0071] S402: Subsequently, the feature map extracted by the convolutional feature fusion module is input into the forward GRU feature fusion module and the reverse GRU feature fusion module. Both fusion modules are based on GRU modules, each of which includes a GRU layer, a batch normalization layer, a PReLU activation layer, and a dropout layer. GRU is a recurrent network layer, and the difference between the forward GRU and the reverse GRU is the direction of the input sequence, which can obtain feature representations of the forward and reverse sequence information, respectively;
[0072] S403: LSTM adds a gating mechanism (input gate, forget gate, and output gate) to the recurrent neural network (RNN) to control the storage and discard of information, solves the gradient explosion problem of RNN model, and more effectively learns the sequence features of data. Compared with LSTM, GRU combines the forget gate and the input gate into an update gate, and the other gate is called a reset gate. In addition, GRU removes the internal state and directly introduces a linear relationship between the current time input and the previous time output. Therefore, GRU is used to learn the sequence features of data, and the sequence features will contain context information such as nucleotide pair position. In the GRU feature fusion module, the feature maps output by each GRU module are stacked and merged for output. The feature maps output by the forward GRU feature fusion module and the reverse GRU feature fusion module are stacked and merged with the feature maps output by the convolutional feature fusion module, and then used for feature learning in the subsequent network layer;
[0073] S404: The high and low layer feature maps constructed by the feature fusion module are used for learning of the convolutional layer to obtain abstract feature representation containing high and low layer features. Through average pooling operation, small transformation of features becomes approximately invariant, improving the generalization ability of the model. Finally, the extracted features are input to the dense layer to predict the score of off-target effect.
[0074] S50: Combine the sequence feature score with the manual feature score, including:
[0075] S501: The CFD score, CCTop score, CRISTA score, GC content, number of mismatches, and sgRNA-DNA sequence similarity score of the sgRNA-DNA pair constitute a feature vector, and biological features are added, with the corresponding binary label 0 or 1.
[0076] S502: The above biological features are directly constructed using the biological features and tools proposed by Abadi et al., as shown in Table 1.
[0077]
[0078]
[0079] Table 1
[0080] Among them, Propeller-Twist (ProT) defines the rotation of one base relative to another base in a base pair; Helix-Twist (HelT) represents the rotation angle in the helix between two consecutive base pairs; Roll defines the rotation angle around the sliding axis; Minor Groove Width (MGW) defines the distance between the two paired strands in the DNA double helix. In summary, a sample becomes a 21-dimensional vector composed of 20 features such as sequence prediction score, manual score, and biological features, and a binary label;
[0081] S60: Use the SMOTE method to oversample the positive samples, and combine with undersampling to select a corresponding number of negative samples, which can also clean some noise data at the same time. Specifically, use the SMOTEENN method of the imblearn package to obtain the final positive and negative samples;
[0082] S70: Divide the processed dataset samples into training set and test set according to the ratio of 85%:15%;
[0083] S80: Select and filter the sample features using embedded feature selection. This method is selected because embedded feature selection integrates the feature selection process with the learner training process, both of which are completed in the same optimization process, i.e., feature selection is automatically performed during the learner training process; specifically, L1 regularization can be used in the classification model training to process the loss function of the deep network, so that the result is easier to obtain a "sparse" solution, i.e., the feature vector will have fewer non-zero components. Specifically, the parameters can be adjusted to filter out 1 / 3 of the original 20 feature components, obtaining important 12 feature scores;
[0084] S801: The above-mentioned learner uses a DenseNet deep learning model, and the network structure is mainly composed of two parts:
[0085] S802: Dense block, define how to connect input and output;
[0086] S803: Transition layer, control the number of channels, so that the model is not too complex;
[0087] DenseNet first uses a single convolutional layer and a maximum pooling layer (here, batch normalization is added to correspond to the above-embedded feature selection filtering). Next, 4 dense blocks are used, and each dense block uses 4 convolutional layers, and the number of convolutional layer channels in the dense block (i.e., the growth rate) is set to 32, so each dense block will increase 128 channels. Between each module, DenseNet uses a transition layer to halve the height and width, and halve the number of channels. Finally, a global pooling layer and a fully connected layer are connected to output the result.
[0088] S90: Evaluate the trained model using the test set, and the main evaluation indicators are Accuracy and AUC value, the higher the Accuracy, the better the prediction accuracy, and the higher the AUC, the better the prediction stability and classification effect.
[0089] On the basis of the above scheme, experiments are compared with CFD on the test set, and the specific results are shown in Table 2.
[0090]
[0091]
[0092] Table 2
[0093] From the above, it can be seen that the problem of the inability of the deep learning model to integrate diverse features and the imbalance of the data set samples can be well solved, the CRISPR / Cas9 off-target prediction accuracy and generalization ability are improved, and the overall performance of the model is improved.
[0094] The above merely describes preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art, according to the technical solution and inventive concept of the present application, makes equivalent replacement or change within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A gene editing off-target effect prediction method based on feature engineering, characterized in that, The method comprises the following steps: S1: obtaining a public data set: obtaining public experimental data containing sgRNA sequence and target DNA sequence mismatch as possible off-target sequences, wherein the data set comprises GUIDE-Seq, HTGTS, and BLESS; S2: each sequence sample is 23 bases long and ends with NGG, the data set label is preprocessed, the sample containing the off-target site is marked as a positive sample, the label is 1, and the sample not containing the off-target site is marked as a negative sample, and the label is 0; S3: encode the sample data set and add features; S4: extract features through an LSTM network model, wherein the LSTM network model comprises a convolution feature fusion module, a gated recurrent unit feature fusion module, a convolution layer, and a dense layer; S5: combine the sequence feature score with the manual feature score; S6: oversample the positive samples using the SMOTE method, and select a corresponding number of negative samples in combination with undersampling; S7: divide the obtained data set sample into a training set and a test set according to a ratio of 85:15; S8: select and filter the sample features using embedded feature selection; S9: evaluate the trained model using the test set, and the evaluation indicators are Accuracy and AUC value, wherein the higher the Accuracy, the better the prediction accuracy, and the higher the AUC, the better the prediction stability and classification effect; In step S3, the following steps are included: The four bases A, T, G and C and the base deletion are encoded into five one-hot vectors (1, 0, 0, 0, 0), (0, 1, 0, 0, 0), (0, 0, 1, 0, 0), (0, 0, 0, 1, 0), (0, 0, 0, 0, 1), and the base pair coding is obtained using the OR operation, and two direction channels are added to help distinguish the base pair type; Use the LSTM network to learn the encoded feature vector and obtain an off-target prediction score based on the sequence feature; In step S5, the following steps are included: The sgRNA and the six features together constitute a feature vector, and biological features are added, and the corresponding binary labels 0 or 1 are added, wherein the six features include CFD score of DNA pair, CCTop score, CRISTA score, GC content, number of mismatches, and sgRNA-DNA sequence similarity score; Step S6 is also used for cleaning noise data, wherein the SMOTEENN method of the imblearn package is used in step S6 to obtain the final positive and negative samples; In step S8, the learner uses a DenseNet deep learning model, and the network structure is composed of dense blocks and transition layers, wherein the dense block is used to define how to connect the input and the output, and the transition layer is used to control the number of channels to prevent the model from being too complex; The specific process of using the DenseNet deep learning model is as follows: DenseNet first uses a single convolution layer and a maximum pooling layer, wherein batch normalization is added to filter the above-mentioned embedded feature selection; Next, 4 dense blocks are used, and each dense block uses 4 convolutional layers, and the number of channels in the convolutional layer in the dense block is set to 32, so each dense block will increase 128 channels, and between each module, DenseNet uses a transition layer to halve the height and width and halve the number of channels; Finally, the global pooling layer and the fully connected layer are connected to output the results.
2. The feature-engineering-based gene-editing off-target effect prediction method according to claim 1, characterized in that, In step S4, the model input is the coding matrix of the sgRNA-DNA sequence pair, and the size of the coding matrix is (23, 7), where 23 is the sequence length and 7 is the number of coding bits of the nucleotide pair.
3. The feature-engineering-based gene-editing off-target effect prediction method according to claim 2, characterized in that, The process flow of the processed sequence feature is as follows: The coding matrix is input into the convolutional feature fusion module, wherein the convolutional feature fusion module is composed of multiple convolutional modules, and each convolutional module includes a convolutional layer, a batch normalization layer, and a PReLU activation layer. Multiple convolution kernels are stacked to form a convolutional layer, and through the convolutional layer, the model sequentially performs convolution operations on the coding of each nucleotide pair to obtain the abstract type features of the nucleotide pair. The input and the output of the convolutional module are spliced to construct a feature map with high and low layer nucleotide pair type features. Subsequently, the feature map extracted by the convolutional feature fusion module is input into the forward GRU feature fusion module and the reverse GRU feature fusion module, wherein both fusion modules are based on the GRU module, and each GRU module includes a GRU layer, a batch normalization layer, a PReLU activation layer, and a dropout layer. The forward GRU feature fusion module, the reverse GRU feature fusion module, and the feature map output by the convolutional feature fusion module are stacked and merged to be used for feature learning of subsequent network layers. Through the average pooling operation, the small transformation of the features becomes approximately invariant, improving the generalization ability of the model. Finally, the extracted features are input into the dense layer to predict the score of off-target effect.
Citation Information
Patent Citations
A Deep Learning-Based Method for Predicting CRISPR Off-Target Effects
CN111261223B
Quasi-unbalanced magnetic resonance whole brain data classification method based on deep learning
CN115310491A
TF-DNA combination recognition method based on multi-feature fusion
CN115810398A