Prediction of designer-recombinases for DNA editing with generative deep learning

Site-specific tyrosine-type recombinases are effective tools for genome engineering, with the first engineered variants having demonstrated therapeutic potential. So far, adaptation to new DNA target site selectivity of designer-recombinases has been achieved mostly through iterative cycles of directed molecular evolution. While effective, directed molecular evolution methods are laborious and time consuming. Here we present RecGen (Recombinase Generator), an algorithm for the intelligent generation of designer-recombinases. We gather the sequence information of over one million Cre-like recombinase sequences evolved for 89 different target sites with which we train Conditional Variational Autoencoders for recombinase generation. Experimental validation demonstrates that the algorithm can predict recombinase sequences with activity on novel target-sites, indicating that RecGen is useful to accelerate the development of future designer-recombinases.


Introduction
Tyrosine-type site-specific recombinases (Y-SSRs) are widely used genome engineering tools. They are capable of exchanging DNA strands between their target DNA sequences, which can facilitate controlled excision, inversion, insertion or exchange of DNA. Because this process is very precise and not reliant on DNA repair mechanisms, it offers seamless manipulation of genomic DNA without side effects (Meinke et al. 2016). These features distinguish Y-SSRs from nuclease-based genome engineering methods, such as CRISPR-Cas systems. All nuclease-based genome editing tools rely on the DNA repair pathways of the host cell, which can ultimately lead to unintended editing results (reviewed in Anzalone et al. 2020). However, the advantage of the widely used CRISPR-Cas9 system is the speed and efficiency with which it can be programmed to specifically edit novel target sites. In this regard, Y-SSRs are lagging behind and currently require substantial time and effort to be generated with tailored specificity. This bottleneck represents a considerable hurdle to harness the full potential of designer-recombinases as a versatile genome editing tool.
Current approaches to adapt site specific recombinases to novel target sequences use directed molecular evolution. One powerful approach to evolve designer Y-SSRs utilizes a plasmid-based bacterial application called substrate-linked directed evolution (SLiDE, (Buchholz and Stewart 2001;Buchholz and Hauber 2011;Lansing et al. 2019;Hoersten et al. 2021;Lansing et al. 2022)). SLiDE allows libraries of recombinases to be progressively evolved by screening random mutations in conjunction with a selection scheme for activity on new, stepwise altered target sequences. Several recombinases have already been developed this way (Buchholz and Stewart 2001;Sarkar et al. 2007;Karpinski et al. 2016;Lansing et al. 2019;Lansing et al. 2022), demonstrating the applicability of SLiDE.
Improvements of the approach have also been reported (Lansing et al. 2019), but the generation of a new designer Y-SSR still requires substantial time and resource investments.
The evolution of some of these recombinases took over 150 cycles, an equivalent of 6-12 months of work. Therefore, while SLiDE is effective, it remains expensive in terms of time and labor.
These disadvantages are a direct consequence of the randomized way new generations of recombinases are created when using SLiDE. At the start of a new project, it is not known which sequence modifications will lead to a protein variant that shows recombination activity on the predefined target sequence. There has been some success to introduce improvements based on protein model analysis on designer-recombinases with activity on a defined target site (Abi-Ghanem et al. 2012). However, due to the complex nature of the whole enzymatic reaction, which includes DNA binding, DNA bending and catalysis (reviewed in Meinke et al. 2016), it has so far not been possible to rationally design recombinases with activity at a new target sequence. Hence, a method that predicts amino acid changes that will cause recombination activity at a desired target site has the potential to accelerate the generation of novel designer-recombinases.
We set out to build such a system by employing a deep learning approach based on generative modeling. This type of algorithm is capable of representing proteins as a multivariate distribution whose parameters are learned during training of a deep neural network (reviewed in Wu et al. 2021). Thanks to this approach, it is possible to sample from this data distribution to generate new sequences. The algorithms that are most commonly used for protein sequence generation are Generative Adversarial Networks (GANs; (Goodfellow et al. 2014;Gupta and Zou 2018;Repecka et al. 2021) and Variational Autoencoders (VAEs; (Kingma and Welling 2013;Riesselman et al. 2018;Costello and Martin 2019;Davidsen et al. 2019;Das et al. 2021;Hawkins-Hooker et al. 2021;Giessel et al. 2022)). In addition to these two, there are also deep learning algorithms for natural language processing that have been adapted for generative modeling. In particular, LSTMs (Hochreiter and Schmidhuber 1997) and Autoregressive models have been used extensively (Alley et al. 2019;Biswas et al. 2021;Saka et al. 2021;Shin et al. 2021;Trinquier et al. 2021;Wang et al. 2021). The multitude of protein sequence generation publications in recent years clearly indicates the potential of the approach to become a standard for protein development.
Beyond mere generation of new protein sequences, the goal is often to generate variants with improved properties (Alley et al. 2019;Linder et al. 2020;Biswas et al. 2021;Hawkins-Hooker et al. 2021;Saka et al. 2021;Shin et al. 2021). These improvements usually involve quantifiable properties, such as thermostability or luminescence. In contrast, the present task requires the generation of recombinase variants with altered properties with respect to a complex categorical condition, their activity on a new DNA target site.To achieve this previously untapped mode of protein sequence generation, we decided to use Conditional Variational Autoencoders (CVAE, Sohn et al. 2015) to generate models capable of predicting recombinase sequences based on a specific target sequence.
The resulting algorithm (RecGen), which we trained with 89 evolved recombinase libraries and their respective target sites, captures the affinities between the recombinase sequences and their respective DNA binding sequences. Through the learned affinities RecGen is capable of constructing recombinase sequences for defined target sites by providing the DNA sequence as a condition. To verify predictions of RecGen, we generated designer recombinases for novel DNA target sites with the algorithm and tested their activity experimentally.

Results
Recombinases evolved for a wide range of target sites are highly diverse within and between libraries An essential part for machine learning is the collection of a large amount of data to train the models. We gathered the training data by sequencing the full gene fragments of evolved recombinase libraries with PacBio HiFi sequencing, a long read sequencing technology that provides highly accurate sequences (Fig. 1A, Supplementary Fig. 1, Wenger et al. 2019). In total we sequenced 89 recombinase libraries, each evolved for a different target site (loxA-1 to loxX-6), covering all four bases on each position of the target sequence half-site at least twice ( Fig. 1B). All of these libraries were derived from Cre-based recombinases. For each library, we extracted and translated~1000 to~34 000 of the 343 amino acid long recombinase coding sequences, which resulted in a total of over 2.2 million full length reads ( Supplementary Fig. 1C).
We first wanted to get an understanding of the data obtained from sequencing the different libraries and assess the quality of the data. We used Pacbio HiFi sequencing to sequence the evolved recombinases, which yielded full length reads with > 99.997% accuracy and high reproducibility ( Supplementary Fig. 1D,E). Interestingly, the sequenced recombinases showed very high diversity within the libraries, with multiple occurrences of identical clones being rare (Supplementary Figs. 2A,4A). In all sequenced libraries, mutations found in recombinases were distributed across 206 residue positions (frequency threshold of 10% per library), indicating that 60% of the 343 amino acids were subject to positive selection in at least one evolutionary campaign. Hot spot mutations in the positions 7-15, 30-44, 77, 86-93, 108, 175, 244-249, 258-268, 317-320 had been described previously for individual evolutions of designer-recombinases, confirming that these regions are important to change target-site selectivity (Fig. 1C, (Buchholz and Stewart 2001;Rufer 2002;Santoro and Schultz 2002;Sarkar et al. 2007;Karpinski et al. 2016;Meinke et al. 2016;Lansing et al. 2019)). The large amount of sequencing data allowed us to nominate additional mutations that contribute to survival of the selection pressure and potentially to target site selectivity.
For instance, we identified positions 5, 23, 57, and 166 as frequently mutated to different residues (Fig. 1C, marked in red), indicating that these residues play important roles in adapting designer-recombinases to a new target site. Hence, specifically targeting these residues in future evolution campaigns could be helpful to generate novel designer-recombinases. Notably, some recombinase sequences carried up to 75 amino acid substitutions (~22% of the protein sequence) compared to Cre (Fig. 1D, Supplementary Fig.   3), highlighting the adaptability of the protein during evolution. Importantly, we identified residues under positive selection throughout the recombinase coding sequence (Fig. 1C), confirming that virtually the complete sequence contributed to adaptations to new target sites. These results highlight the complex nature of changing target site recognition for this class of enzymes, indicating that simple correlative analyses might not be sufficient to predict new designer-recombinases with custom target site specificity.
Next, we were interested in the composition of the libraries. To get an overview of the distribution of the libraries, we used the dimensionality reduction method t-SNE to visualize the recombinase sequence relationships (Fig. 1D, Supplementary Fig. 2B). We found that many of the evolved libraries form independent clusters, indicating that common changes in the protein led to the ability of the recombinases to recombine the presented target site.
However, in some cases multiple clusters were observed for one library, hinting that diverging sets of mutations evolved in the library with activity on the required target site (Fig.   1D, Supplementary Fig. 2C). The complex relationships of the amino acid mutations in regard to the different libraries and therefore the target site selectivity suggested that advanced machine learning might be a way forward to solve the task of recombinase prediction.

CVAE model architecture for recombinase prediction
The complexity of the challenge at hand made us turn to deep learning to predict specific recombinases for new target sites. There were three requirements we wanted our prediction algorithm to cover. (I) The algorithm needed to be generative, i.e. it should have the ability to predict multiple sequences, so that it can be used in future applications for library generation and so that it would give us a higher chance of finding functional recombinases. (II) For a deep learning application, the data we have is limited, therefore we were looking for an approach that can be stably trained with the data at hand. (III) Trained models should be capable of receiving the target sequences as input and predict full recombinase sequences as output. Since Generative Adversarial Networks are known to be unstable and difficult to train (Salimans et al. 2016), we decided that requirements (I) and (II) are better fulfilled by Variational Autoencoders (VAEs). More specifically, we found Conditional Variational Autoencoders (CVAE, Sohn et al. 2015) to be the most suitable method to also fulfill criterion (III), as they are capable of predicting outputs conditioned on a set target sequence.
The CVAE architecture consists of two parts, the encoder and the decoder ( Fig. 2A). Our encoder receives the recombinase sequences together with the target sequences in one-hot encoding and learns to represent the given input into a compressed latent space. The latent space is designed to resemble a multivariate normal distribution. Therefore, for each latent space dimension mean (μ) and standard deviation (σ) are learned for normal distribution sampling ( Fig. 2A). In combination with the conditional input of the one-hot encoded target sequence the sampled latent space is delivered to the decoder, which aims to reconstruct the recombinase sequences. During training, the difference between reconstructed and true recombinase sequences are computed via the binary cross entropy loss function. This loss is then backpropagated using the so-called "reparameterization trick" (Kingma and Welling 2013). Additionally, the loss function contains a term that forces all encodings to resemble a multivariate normal distribution (KLD loss, Fig. 2A). Finally, sampling from the controlled latent space in combination with the desired target sequence enables the generation of recombinase sequences through the decoder (Fig. 2B).

Predictions result in high similarity to known targets
To confirm that the chosen CVAE architecture is capable of predicting functional recombinases, we first compared the model output with existing sequencing data. To this end, we decided to use leave-one-out cross-validation (LOOCV), i.e. excluding one target recombinase library (TRL) from the training set and using the resulting model to generate predictions for that one TRL target sequence (Fig. 2C). This procedure was then repeated for each recombinase library.
Assuming that all the sequences in the TRL are capable of recombining the TRL target site, we argued that any predicted recombinase that has a high similarity to any TRL shall be counted as a success. Therefore, to assess the prediction quality, we chose to calculate the hamming distance (i.e. the number of amino acids two sequences differ by) between the predicted recombinase library (PRL) sequences and their closest match in the TRL. In other words, this metric assesses the likelihood that the predicted sequences contain the necessary mutations to enable recombination on the given TRL target site. Ideally, the model infers the PRL sequences from the mutations it observed from the recombinase libraries in the training dataset with similar target sites. However, there is a chance that it lacks the depth of information to infer a viable sequence, which could lead to 'memorized' sequences from the training data. For this reason, we decided to also measure the distance of the closest recombinase libraries (CRL) in terms of target site distance to the TRL. Hence, if the measured PRL distance is lower than the CRL distance, it indicates that the model was capable of predicting a combination of amino acids with an increased likelihood of working for the desired target site than the amino acid combinations observed in the CRL (i.e. the best otherwise available evolution starting point).
The results obtained confirmed the validity of our proposed approach. More specifically, we calculated the LOOCV PRL hamming distances for all recombinase libraries and found the predicted sequences to be closer to the TRL by a median of 4 amino acids compared to the CRL (Fig. 2D). In 74 cases the PRL led to median improvements in the distance to the TRL, with only 3 cases where the median distance of the PRL was worse than in the CRL (Fig.   2E,F). The highest median improvement was a hamming distance of 20 while in the worst case the distance of the PRL was only 4 further away from the TRL than the CRL (Fig. 2F).
This difference in the distance to the TRL, a known solution to the recombination of the required target site, poses a substantial improvement of the predicted recombinases in comparison to the CRL. This suggests that PRLs are more likely to function at the desired target site compared to CRLs and that PRL sequences need to acquire fewer mutations in directed evolution to recombine efficiently at the desired target site. Color codes for if the PRL is closer to the TRL than the CRL to the TRL (orange), further away (blue) or the same distance (gray).

LOOCV predictions generate highly active recombinases
The LOOCV testing indicated that the model was capable of predicting approximations of the TRL sequences, but most of the predictions were still several amino acids different to the actual TRL sequences. We wanted to test some of the LOOCV predicted recombinases to investigate if they are genuinely recombining the respective target sites. In order to assess recombination activity, we used a previously published reporter plasmid (Buchholz and Stewart 2001;Lansing et al. 2019) that can be used in two different assays: a plasmid-based recombination assay (Fig. 3B) and a PCR-based recombination assay (Fig. 3C). The plasmid-based assay provides results that can be used to quantify the recombination rate of the recombinases, while the PCR-based assay allows for detection of rare recombination events.
We used the assays to test if the similarity of the predicted sequences to the TRL is an indication of a successful prediction. The predicted sequences for loxA-1 and loxD-1 were very similar to the sequences found in their TRLs (Fig. 2E). This similarity made it likely that these libraries would be functional. Additionally, we investigated how the predicted sequences compared to the TRLs and the CRLs. We tested the most prominent sequence of both predicted recombinase libraries (PRL single clone) and found them to have similar recombination efficiencies to the TRLs and the CRLs (Fig. 3D,E). Next, we decided to validate the loxE-3 predictions, as these were found to be far more distant to the TRL than most other predictions. However, the distance to the TRL of the PRL was still much shorter than from the CRL (Fig. 2D), suggesting that the predictions might perform better than the CRL if any activity could be observed at all. We found the activity of the most commonly observed prediction (PRL single clone) to be higher than the TRL and both CRLs (34% versus 13%, 2% and 7%, respectively, Fig. 3F). In summary, from all the LOOCV predictions we tested, the recombination efficiency was comparable or better compared to the reference libraries, indicating that RecGen is capable of predicting recombinases for known target sites. Predicted recombinases excise novel target sites Ultimately, we wanted to be able to predict recombinase sequences with activity on novel target sites, for which no functional recombinase sequences are known. To test whether RecGen can achieve this goal, we decided to generate predictions for 10 artificially constructed target sites for evaluation in a bacterial assay. We selected target sites from 4 of our evolved libraries (loxC-7, loxD-7, loxF-1, loxG-1) and changed 3 bp in the half-sites, resulting in loss of activity of the libraries on the modified target sites (Fig. 4A). For the changes we focused on the half-site positions 7-12 as these residues are known to severely affect activity of recombinases when changed (Bessen et al. 2019). This way, we constructed 10 target sites and generated recombinases from models trained with all recombinase libraries available, thereby setting up controlled test cases to study the performance of RecGen.
For each target site we predicted 10 000 recombinase protein sequences, from which we selected the most prevalent sequence for each target site. Using the recombination assays described earlier we tested the predictions and the CRLs on the respective novel target sites. Subsequently, we used the PCR assay to detect recombination. We found that none of the CRLs had activity on the selected novel target sites, indicating that additional sub-sites would be required to start SLiDE for these target sites. In contrast, we detected recombination activity at several target sites of the predicted recombinases. From the 10 novel target sites we found that 4 predictions resulted in genuine recombination products which were confirmed by sequencing (Fig. 4). We concluded that RecGen is capable of predicting recombinases selective for defined target sites, making it the first algorithm that can predict functional recombinases for an entirely new target site.

Discussion
So far, the development of designer-recombinases for novel target sites has been accomplished by applying directed molecular evolution (Buchholz et al. 1998;Buchholz and Stewart 2001;Rufer 2002;Santoro and Schultz 2002;Voziyanov et al. 2002;Voziyanov et al. 2003;Bolusani et al. 2006;Sarkar et al. 2007;Shah et al. 2015;Karpinski et al. 2016;Voziyanova et al. 2016;Lansing et al. 2019;Hoersten et al. 2021;Lansing et al. 2022), an effective but laborious and time consuming process. A more direct and faster approach could be the intelligent design of Y-SSRs for predefined target sequences. However, Y-SSRs are complex and the understanding of the necessary modifications for a change in target site specificity has been elusive thus far. To tackle this challenge, we gathered >2 million sequences of recombinase libraries evolved for 89 different target sites. Consistent with a complex recombination reaction that is hard-wired into the protein sequence, we found that many residues were mutated and positively selected for in the different libraries. Many of these residues had been reported previously in context of target site specificity (Supplementary Table 2, (Buchholz and Stewart 2001;Rufer 2002;Santoro and Schultz 2002;Sarkar et al. 2007;Karpinski et al. 2016;Meinke et al. 2016;Lansing et al. 2022)).
However, with the extensive sequencing of recombinase libraries we nominate several other mutational hotspots that seem to influence target site selectivity. Interestingly, a number of mutations selected for were found in the N-terminus, a region which is dispensable for recombination in Cre (Rongrong et al. 2005;Warren et al. 2008). The fact that residues in the N-terminus were clearly under positive selection indicates that the N-terminus fulfills an important role in evolved recombinases (Guillén-Pingarrón et al. 2022).
On the library level, we found that some libraries consisted of multiple distinct clusters of sequences, while most others form one uniform cluster. This finding indicates that the directed molecular evolution sometimes led to diverging sets of mutations that were capable of recombining the required target site, while other libraries evolved to contain very similar mutations. This trait has been found in other directed molecular evolutions where multiple sets of mutations were dominant until one set took over the whole population (Shen et al. 2021). It is therefore possible that for libraries with two clusters additional rounds of SLiDE would be necessary to eventually lead to a single cluster. Overall, sequencing of the evolved recombinases provided us with valuable information that further cemented the complexity of the recombinase target site selectivity.
We decided to approach the non-trivial task of adapting the activity of designer-recombinases to new target sites using a generative deep learning algorithm. With the described neural network we managed to predict sequences with high similarity to known recombinases specific for the predicted target sites. Through comparing the predictions to the closest recombinase libraries, we could show that these predictions are not merely "memorizations" of sequences with similar target sites. Overall, we found the predicted sequences to be closer to recombinases that are known to work by 4 amino acids, confirming the validity of our approach.
We did see variance in how closely the predicted sequences resemble recombinases that work and in how much the predictions were improved over the closest recombinase library.
We know that the amount of information available for the target site compositions varied and therefore contributed to a difference in the ability of the model to predict the TRL. This could be observed when predictions were performed by leaving out more information related to the TRL ( Supplementary Fig. 4B). Additionally, the residues contained in the most closely related libraries could be different even though they fulfill the same purpose. Diverging solutions for the same problem are known to happen in evolution and have also been described in directed evolution (Xie et al. 2021). Even though the performance of the models varied in regard to the target site, in over 80 % of the tested target sites the predicted recombinases showed an improvement over the libraries evolved for the most similar target site. This result suggests that the predicted recombinases are generally the better starting point for further directed evolution.
We assumed that the LOOCV predictions closer to the TRL sequences are more likely to be active on the TRL target site. To test this, we validated three LOOCV predictions experimentally. Two predictions which were very similar to TRL sequences were indeed active. However, we found that the more distant prediction we picked for testing worked even better. We suspect that the algorithm avoided predicting mutations that don't have an effect on the recombinase activity as they were not prominently present in the library. This led to the predictions being less variable ( Supplementary Fig. 4A), but the important residues were most likely maintained. All in all, the tested LOOCV predictions of novel target sites were all functional, an indication that the predictions from this model are useful.
Ultimately, we wanted to know if the model is capable of fulfilling its intended purpose, the prediction of recombinases for novel target sites. We could confirm that 4 out of 10 predictions were active on the respective target sites. Importantly, the CRLs, which were the libraries we would usually start an evolution from, showed no activity. This means that if we wanted to get a library with activity on the defined target site, it would be necessary to first evolve a library that works on a subsite, so that we could then move on to the target site of interest. Using our approach, we can now start an evolution directly on the intended target site. In the recent work by (Lansing et al. 2022) evolving recombinases the switch to the next subsite with one or two bases changed took 12 and more cycles. Each cycle is a full working day, in result each target site switch takes more than two weeks of actual working time.
Therefore, our predicted recombinases which have 3 bases changed in the target site would be equal or more work time saved.
One has to note that we only tested a single sequence of the PRLs, while we tested a full library for the CRL. The probability of finding a functional recombinase is much higher in a library of >100 000 variants than when testing only a single clone. Therefore, testing multiple predicted recombinases would probably yield an even higher success rate than just testing one sequence. Overall, the results we obtained here are encouraging and indicate that RecGen will be beneficial in cutting down the time and effort spent for the development of new designer-recombinases.
RecGen as it stands is already a valuable resource to shorten the development time of new designer-recombinases, but future iterations will likely further it's capabilities to reliably predict Y-SSRs. Changing the encoding to amino acid properties or a learned representation for protein sequences (Alley et al. 2019;Rao et al. 2019;Wittmann et al. 2021) would give RecGen additional information that could help to predict more reliably. Another way to adapt the network would be to change the fully connected neural network layers to convolutional or recurrent network layers, which could further improve the performance (Hawkins-Hooker et al. 2021;Giessel et al. 2022). While improvements to the algorithm are important, the data used to train the model is likely to be even more critical.
The amount of data we gathered is considerable in terms of laboratory work performed, but the target sequence space where successful predictions can be done is limited. So far we could only confirm predictions for target sites that differ by 3 bases in the half-site to known target sites. This is why the collection of more data will be key in making RecGen more useful for future designer-recombinase development. This means that we need to collect sequences from more recombinase libraries evolved for additional target sites. In addition, quantitative data about individual recombinase sequences within the library should be helpful to improve RecGen. This information would be important for the model to understand which mutations are more relevant for recombination activity on the defined target site.
In conclusion, we show that RecGen is capable of predicting recombinases for defined target sites. To the best of our knowledge, the successful prediction of proteins selective for a defined DNA target site has not been accomplished before and is therefore a novel achievement. Furthermore, we believe that RecGen will be a valuable tool to kick-start the evolution of future designer-recombinases, making the process faster and less laborious.

Material and Methods
Deep Sequencing of evolved recombinase libraries In order to deep sequence the recombinase libraries, 500 ng of pEVO plasmids (described in (Buchholz and Stewart 2001;Buchholz and Hauber 2011;Lansing et al. 2019

Conditional Variational Autoencoders
The aim of VAE is the inference of the characteristics of z (the latent space) based on x in other words P(z|X). To get P(z|X) we can use Bayes theorem: However, computing P(x) is intractable: can be defined so that it is similar to P(z|X). It can be used to perform approximate inference of the intractable distribution. To make sure that Q(z|X) is similar to P(X|z) Kullback-Leibler divergence of the two distributions is minimized. Therefore the objective of VAE is: To adapt the objective to a Conditional Variational Autoencoder we introduce the condition c to the encoder: Q(z|X,c) and the decoder: P(X|z,c) and therefore the objective is now: Additionally to this objective a binary cross entropy loss function is used to penalize reconstruction error: Where is the output value at position i, is the desired output and n is the size of the output.

CVAE model training and prediction
Neural networks were trained using pytorch on Python 3.9.6 (Van Rossum and Drake 2009).
Data pre-and post-processing was done with numpy and pandas (McKinney 2010; Harris et al. 2020). 1000 recombinase sequences per library plus the corresponding target half-site were one-hot encoded for training of the models.
One-hot encoding was generated by forming a binary matrix where the rows correspond to the recombinase sequences and the columns represent all possible combinations of amino acids and positions in the sequence. The sequence was then represented with ones in the places that correspond to the combinations found in the sequence and zeros for all other combinations. The target sequence and the recombinase sequence were concatenated and the possible letters allowed contained the naturally occuring 20 amino acids and one for the stop codon. The target sequence part was encoded in the same way, since the letters for the DNA are contained in the 20 amino acids.
The training data set corresponded to 89 target sites from 23 evolution projects. CVAE architecture was constructed according to (Sohn et al. 2015). The models were constructed with 2 fully connected layers in the encoder and decoder with 64 and 32 neurons (reversed in the decoder), while the latent space was defined with 2 neurons. Training was performed in 40 epochs with a batch size of 128, a dropout rate of 0.1, and a learning rate of 0.0001.
The reconstruction loss is calculated with binary cross entropy and the KLD is multiplied with a factor of 0.1 to 2, linearly increasing with each epoch (Sønderby et al. 2016).
Predictions with the trained models were done using the decoder part of the model by providing the one-hot encoded half-site target sequence with two random numbers generated from a normal distribution (Fig. 2B). The output of the model is then decoded from one-hot to amino acid. All predicted recombinase sequences can be found in Supplementary   Table 1. LOOCV testing Leave-one-out cross-validation was performed as illustrated in Fig. 2C. First the training set is reduced by removing the Target Recombinase Library (TRL). Model training and prediction with the reduced training data set were then done as described above. We found that training with the same parameters results in slightly different outcomes. To mitigate the output variance we decided to use multiple models for prediction, because of the computational cost we trained 10 models per TRL for prediction. A total of 1000 recombinase sequences were generated and their hamming distances to the TRL sequences was calculated with only the smallest distance recorded. Additionally, the same process is done with the CRL sequences in place of the PRL sequences. The recorded distances were then processed with the tidyverse R packages and plotted with ggplot2 Recombinase activity assays pEVO vectors with the respective target sites and recombinase genes were cultivated in E.
coli XL-1 Blue (Agilent) for 14-16h in 10 ml LB in the presence of chloramphenicol (25 mg/ml) and L-arabinose (10 ug/ml). Plasmid DNA was extracted using the GeneJet Plasmid Miniprep Kit (ThermoFisher). For the plasmid-based recombination assay 500 ng plasmid DNA was digested with XbaI and BsrgI-HF (NEB) followed by agarose gel electrophoresis.
The resulting bands indicate the fraction of recombined plasmid at~4.2 kb and non-recombined plasmid at~5kb. The amount of recombined and non-recombined plasmid was measured from the band intensities using Fiji for image processing. The rate of recombination was calculated by dividing the amount of the recombined plasmid with the amount of both plasmids. For the PCR-based recombination assay 500 ng of the plasmid DNA was digested with NdeI and AvrII, which linearizes all non-recombined plasmids. The digested product is then subjected to PCR with the primers EVO-F and EVO-R (AAGGGAATAAGGGCGACACG, CGGCGTCACACTTTGCTATG), which will amplify if the product is circular, but will fail if the product is linearized. The expected product of~1.7 kb is visualized with agarose gel electrophoresis.

Validation of LOOCV predictions
The pEVO evolution and reporter vector for loxA-1, loxD-1, loxE-3, as well as the respective TRL and CRL genes were obtained from (Sarkar et al. 2007;Karpinski et al. 2016;Lansing et al. 2019) (Supplementary Table 3). The PRL clones were ordered codon optimized for E.
coli from Twist Bioscience. All recombinase genes were excised by XbaI and BsrGI digest followed by gel excision (Isolate II PCR and Gel Kit from Bioline) for cloning into the respective pEVO vector. The cloned vectors were tested for recombination activity with the assays described above using a concentration of 10 ug/ml L-arabinose.

Prediction for novel target sites and validation
As mentioned in the results section, novel target sites were generated by randomly mutating 3 bases of the half-site target sequence at positions 7-12 and selected for a distance to other known target sites of 4 or more. 15 of these generated target sites were then cloned into the pEVO plasmid as previously described using the Cold Fusion Cloning kit (SystemBiosicences) and tested for recombination activity (200 ug/ml ara, described above) with the library corresponding to the target site it was based on, which is equivalent the CRL.
From the 15 target sites we found 10 to have no activity on their respective CRLs. For these 10 novel target sites recombinase sequences were predicted with 100 models trained on the full training data as described above. Each model was tasked to predict 100 recombinase sequences, which resulted in a total of 10 000 recombinase sequences per novel target site.
The most prominent predicted recombinase sequences per target sites were then ordered and cloned as described above. Recombinase activity assays were also performed as described above with 200 ug/ml L-arabinose. Sequence verification was performed from gel excision products of the 1.7kb fragments (Isolate II PCR and Gel Kit from Bioline) with the Microsynth sanger sequencing services.

Data Availability
Data available on request.

Supplementary Material Supplementary Figures and Methods
Supplementary