Conserved RNA structures are critical for designing diagnostic and therapeutic tools for many diseases including COVID-19. However, existing algorithms are much too slow to model the global structures of full-length RNA viral genomes. We present LinearTurboFold, a linear-time algorithm that is orders of magnitude faster, making it, to our knowledge, the first method to simultaneously fold and align whole genomes of severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) variants, the longest known RNA virus (∼30 kb). Our work enables unprecedented global structural analysis and captures long-range interactions that are out of reach for existing algorithms but crucial for RNA functions. LinearTurboFold is a general technique for full-length genome studies and can help fight the current and future pandemics. The constant emergence of COVID-19 variants reduces the effectiveness of existing vaccines and test kits. Therefore, it is critical to identify conserved structures in severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) genomes as potential targets for variant-proof diagnostics and therapeutics. However, the algorithms to predict these conserved structures, which simultaneously fold and align multiple RNA homologs, scale at best cubically with sequence length and are thus infeasible for coronaviruses, which possess the longest genomes  among RNA viruses. As a result, existing efforts on modeling SARS-CoV-2 structures resort to single-sequence folding as well as local folding methods with short window sizes, which inevitably neglect long-range interactions that are crucial in RNA functions. Here we present LinearTurboFold, an efficient algorithm for folding RNA homologs that scales linearly with sequence length, enabling unprecedented global structural analysis on SARS-CoV-2. Surprisingly, on a group of SARS-CoV-2 and SARS-related genomes, LinearTurboFold’s purely in silico prediction not only is close to experimentally guided models for local structures, but also goes far beyond them by capturing the end-to-end pairs between 5 RNA plays important roles in many cellular processes , 2. To m3Commonly, conserved structures involve compensatory base pair changes, where two positions in primary sequences mutate across evolution and still conserve a base pair; for instance, an AU or a CG pair replaces a GC pair in homologous sequences. These compensatory changes provide strong evidence for evolutionarily conserved structures –10. Meank sequences with the average sequence length n. Several software packages provide implementations of the Sankoff algorithm .To automate comparative analysis, three distinct algorithmic approaches were developed , 14. Thelgorithm –21 that lgorithm  and was lgorithm . The thilgorithm  and impllgorithm  and MARNlgorithm   genomes, which contain ∼30,000 nucleotides; in fact, no joint-align-and-fold methods can scale to these genomes, which are the longest among RNA viruses. As a (not very principled) workaround, most existing efforts for modeling SARS-CoV-2 structures –36 resorOver a group of 25 SARS-CoV-2 and SARS-related homologous genomes, LinearTurboFold predictions are close to the canonical structures  and stru32tal work  and yet tal work B and C. tal work  and antital work . We furttal work , small ital work , CRISPR-tal work , and RT-tal work . LinearTThe framework of LinearTurboFold has two major aspects A: linearLinearTurboFold achieves linear time regarding sequence length with two major linearized modules: our recent work, LinearPartition  Fig. 1A and baseMethods). The number of iterations and other hyperparameters were tuned on the training set. As observed previously , which is consistent with the observation on the training set. After approximately three iterations, both structure prediction and MSA accuracies remain stable with small fluctuations. To better demonstrate the improvement in each iteration, we visualized both base-pairing probabilities and alignment coincidence probabilities from LinearTurboFold for a group of five tRNAs across iterations .LinearTurboFold also integrates a linear-time stochastic sampling algorithm named LinearSampling  module . Therefoeviously , 28, impMethods, Efficiency and Scalability Datasets). n and is substantially faster than other algorithms, which scale superlinearly. The linearization in LinearTurboFold brings orders of magnitude speedup over the cubic-time TurboFold II, taking only 12 min on the HIV family , while TurboFold II takes 3.1 d (372× speedup). More importantly, LinearTurboFold takes only 40 min on five SARS-CoV sequences while all other benchmarks fail to scale. Regarding the memory usage . Besides Sankoff-style LocARNA and MXSCARNA, we also consider three types of negative controls: 1) single-sequence folding (partition function based), Vienna RNAfold , MAFFT + RNAalifold  F, which RNA sequences with conserved secondary structures play vital biological roles and provide potential targets. The current COVID-19 outbreak raises an emergent requirement of identifying potential targets for diagnostics and therapeutics. Given the strong scalability and high accuracy, we used LinearTurboFold on a group of full-length SARS-CoV-2 and SARS-related (SARSr) genomes to obtain global structures and identify highly conserved structural regions.Methods, SARS-CoV-2 Datasets). We further extended the group by adding nine SARS-related homologous genomes (five human SARS-CoV-1 and four bat coronaviruses) . The average pairwise sequence identities of the 16 SARS-CoV-2 and the total 25 genomes are 99.9% and 89.6%, respectively. LinearTurboFold takes about 13 h and 43 GB on the 25 genomes.We used a greedy algorithm to select the 16 most diverse genomes from all the valid SARS-CoV-2 genomes submitted to the Global Initiative on Sharing Avian Influenza Data (GISAID)  up to Deviruses) . In totaTo evaluate the reliability of LinearTurboFold predictions, we first compare them with Huston et al.’s  SHAPE-guructures A and B,  studies , 36. In  studies A.The most important difference between LinearTurboFold’s prediction and Huston et al.’s  experimeet al.’s  model. Iv et al.  using thv et al. C. These v et al. –56 to bev et al. –35. By cSI Appendix, Figs. S12A and S13, Left column). For the other sequences, however, LinearPartition either cannot predict end-to-end interactions or predicts them in the wrong locations. On the other hand, LinearTurboFold propagates the correct structural information from those eight sequences to other homologs, resulting in all SARS-CoV-2 sequences having the same end-to-end pairs . By contrast, the align- then-fold approach , which relies on the input hard alignment and predicts one single consensus structure for all homologs, fails to predict such long-range interactions .LinearTurboFold can model these end-to-end interactions due to three ingredients: 1) linearization, 2) LinearPartition’s better modeling power on long sequences and long-range pairs, and 3) homologous folding and soft alignment. Linearization not only enables LinearTurboFold to scale to longer sequences, but also improves the accuracy of modeling long-range interactions benefiting from LinearPartition . In addiSI Appendix, Fig.S11D–F for alternative structures of SI Appendix, Fig.S11G) predict quite different structures compared with the LinearTurboFold prediction (The frameshifting stimulation element (FSE) is another well-characterized region. For an extended FSE region, the LinearTurboFold prediction consists of two substructures A: The 5′d models , 33, 35 d models B–D. In td models . For thed models , which meudoknot  . These different structures are potential targets for small-molecule drugs , which implies highly conserved structural regions whose functions might not have been explored. We provide the complete multiple-sequence alignment and predicted structures for 25 genomes from LinearTurboFold .In addition to the well-studied UTRs and FSE regions, LinearTurboFold discovers 50 conserved structures with identical structures among 25 genomes, and 26 regions are different compared to previous studies , 32 . Here, LinearTurboFold is able to provide more principled design candidates by identifying accessible regions of the target genome. In addition to accessibility, the emerging variants around the world reduce effectiveness of existing vaccines and test kits , which indicates sequence conservation is another critical aspect for therapeutic and diagnostic design. LinearTurboFold, being a tool for both structural alignment and homologous folding, can identify regions that are both (sequence-wise) conserved and  accessible, and it takes advantage of not only SARS-CoV-2 variants but also homologous sequences, e.g., SARS-CoV-1 and bat coronavirus genomes, to identify conserved regions from historical and evolutionary perspectives.Studies show that the siRNA silencing efficiency, ASO inhibitory efficacy, CRISPR-Cas13 knockdown efficiency, and RT-PCR primer binding efficiency all correlate with the target region’s accessibility –45, 59, Z is the partition function that sums up the equilibrium constants of all possible secondary structures, R is the universal gas constant, and T is the thermodynamic temperature. Therefore s is the sample size and s0 is the number of samples in which the target region is single stranded. The regions whose free-energy changes are close to zero need less free energy to open and are thus more accessible to bind with siRNAs, ASOs, CRISPR-Cas13 gRNAs, and RT-PCR primers.To get unstructured regions, Rangan et al.  imposed  , notatedMethods, SARS-CoV-2 Datasets). Finally, we identified 33 accessible and conserved regions , which are not only structurally accessible among SARS-CoV-2 genomes but also highly conserved among SARS-CoV-2 and SARS-related genomes . Finally, we also listed the GC content of each region. Among these regions, region 16 corresponds to the internal loop containing the slippery site in the extended FSE region, and it is conserved at both structural and sequence levels  that are accessible but only highly conserved on SARS-CoV-2 variants.Next, to identify conserved regions that are highly conserved among both SARS-CoV-2 and SARS-related genomes, we require that these regions contain at most three mutated sites on the nine SARS-related genomes compared to the SARS-CoV-2 reference sequence because historically conserved sites are also unlikely to change in the future , and the genomes C. Becaus genomes , we usede levels D and H. e levels A. By remSI Appendix, Table S7). The reason for this difference is that, even with a high sequence identity (over 99.9%), single-sequence folding algorithms still predict greatly dissimilar structures for the SARS-CoV-2 genomes : aligning two nucleotides from two sequences (ALN), inserting a nucleotide in the first sequence without a corresponding nucleotide in the other sequence (INS1), and a nucleotide insertion in the second sequence without a corresponding nucleotide in the first sequence (INS2). We then define h, i, j) with m + 2 steps, where  means an alignment step at the position pair  by the action h. Thus, for the lth step li and lj depend on the action lh and the positions SI Appendix, Fig. S3). The action lh in each step li, lj). Thus, the line segment is horizontal, vertical, or diagonal toward the top-right corner when lh is SI Appendix, Fig. S3).We use a pairwise hidden Markov model (pair-HMM) to align two sequences , 66. Theh1 to h2, and h1 emitting a character pair  with values from {A, G, C, U, –}. Both the emission and transition probabilities were taken from TurboFold II. The function la and the nucleotides of two sequences:ix and jy are the ith and jth nucleotides of sequences x and y, respectively. Note that the first step We initialize the first step with the state x and y up to positions i and j and all the alignments that go through the step :kth step and SI Appendix, Fig. S3B–D). Similarly, the backward probability We denote forward probability SI Appendix, Fig. 3 B–D). Thus, the probability of observing two sequences For example, i and j in two sequences x and y are said to be coincident   is reachable by three actions i, j) given two sequences isa, and Nucleotide positions e  . Since ti and j , LinearAlignment scans the matrix based on the step count s, which is the sum value of i and jSI Appendix, Fig. S4), the forward phase starts from the node  in the state ALN of probability 1 and then iterates the step count s from 0 to s with a specific state h from i, j) with the step count s with i, j) has been visited via the state h before. Then each node makes transitions to next nodes by their states and updates the corresponding forward probabilities Unlike a previous method  that fils with a state h, LinearAlignment applies the beam search method first over B, which is the collection of all the nodes  with step count s and the presence of SI Appendix, Fig. S4, line 6). This algorithm saves only the top B, and these are subsequently allowed to make transitions to the next states. Here s is SI Appendix, Fig.S3A), while the forward–backward algorithm adopts the same idea by summing the probabilities of all the possible alignments.The current alignment algorithm is still an exhaustive-search algorithm and costs quadratic time and space for all the lgorithm  and keepSI Appendix, Fig. S4) performs in linear time to calculate the coincidence probabilities automatically because only a linear number of nodes in B are stored. Thus by pruning low-scoring candidates at each step in the forward algorithm, we reduce the runtime from k input homologous sequences, LinearTurboFold computes posterior coincidence probabilities for each pair of sequences by LinearAlignment, which costs After the forward phase, the backward phase :α1, α2, and α3 are weight parameters trained in TurboFold II. The forward–backward phrases integrate the match score as a prior when aligning two nucleotides .To encourage the pairwise alignment conforming with estimated secondary structures, LinearTurboFold predicts structural alignments by incorporating the secondary structural conformation. PMcomp  first prk homologous sequences, LinearTurboFold reduces the runtime of the whole module of pairwise posterior coincidence probability computation from TurboFold II separately precomputes match scores for all the i, j) in the sequence x maps the estimated base-pairing probabilities of other sequences to the target sequence via the coincident nucleotides between each pair of sequences:k, l) in the sequence y from the i, k) and , respectively, from the (t) th iteration. The extrinsic information x and y. The sequences with a low identity contribute more to the extrinsic information than sequences of higher identity. The sequence identity is defined as the fraction of nucleotides that are aligned and identical in the alignment.To update partition functions for each sequence with the structural information from homologs, TurboFold  introducThe classical partition function algorithm scales cubically with sequence length. The slowness limits its extension to longer sequences. To address this bottleneck, our recent LinearPartition  algorithi, j). Similarly, in LinearPartition, for each span Q, the partition function is modified as ix, jx) is an allowed pair, where λ denotes the contribution of the extrinsic information relative to the intrinsic information. Specifically, at each step j, among all possible spans ix and jx are paired, we replace the original partition function Q with TurboFold introduces the extrinsic information k homologous sequences, LinearTurboFold reduces the runtime of base pair probabilities estimation for each sequence from Similarly, TurboFold II obtains the extrinsic information for all the After several iterations, TurboFold II builds the multiple-sequence alignment using a probabilistic consistency transformation, generating a guide tree and performing progressive alignment over the pairwise posterior coincidence probabilities . The whoθ (θ and γ). On a sampled RNAStrAlign training set, ThreshKnot is closer to the upper right hand than MEA, which indicates that ThreshKnot always has a higher sensitivity than MEA at a given positive predictive value (PPV) .Estimated base pair probabilities are fed into downstream methods to predict secondary structures. To maintain the end-to-end linear-time property, LinearTurboFold uses ThreshKnot , which ihttps://www.hiv.lanl.gov/), and the SARS-related betacoronaviruses (SARS-related)  . RNAStrArelated) A and B.To assess the runtime and memory usage of LinearTurboFold with group size, we fixed the sequence length around 1,500 nt and sampled five groups of sequences from the small-subunit ribosomal RNA (Alphaproteobacteria subfamily) with group sizes 5, 10, 15, and 20, respectively C and D. We built a test set from the RNAStrAlign dataset to measure and compare the performance between LinearTurboFold and other methods. Sixty groups of input sequences consisting of five homologous sequences were randomly selected from the small-subunit rRNA (Alphaproteobacteria subfamily), SRP RNA (Protozoan subfamily), RNase P RNA , and telomerase RNA families from the RNAStrAlign dataset. We removed sequences shorter than 1,200 nt for the small-subunit rRNA to filter out subdomains and removed sequences that are shorter than 200 nt for SRP RNA following the TurboFold II paper to filter out less reliable sequences. We resampled the test set five times and show the average PPV, sensitivity, and F1 scores over the five samples F and G.θ = 0.1, 0.2, 0.3, 0.4, and 0.5 for ThreshKnot and γ = 1, 1.5, 2, 2.5, 3, 3.5, 4, 8, and 16 for MEA. We reported the average secondary structure prediction accuracies (PPV and sensitivity) across all training families .An RNAStrAlign training set was built to compare accuracies between MEA and ThreshKnot. Forty groups of three, five, and seven homologs were randomly sampled from 5S ribosomal RNA (Eubacteria subfamily), group I intron (IC1 subfamily), transfer-messenger RNA, and tRNA families from the RNAStrAlign dataset. We chose k input sequences with the average length n. Both LocARNA . LinearTurboFold also runs three iterations with default beam sizes . This resulted in a dataset of ∼2 million genomes, which was used to evaluate conservation in Supplementary FileSupplementary File


To assign structural and functional annotations to the ever increasing amount of sequenced proteins, the main approach relies on sequence-based homology search methods, e.g. BLAST or the current state-of-the-art methods based on profile Hidden Markov Models, which rely on significant alignments of query sequences to annotated proteins or protein families. While powerful, these approaches do not take coevolution between residues into account. Taking advantage of recent advances in the field of contact prediction, we propose here to represent proteins by Potts models, which model direct couplings between positions in addition to positional composition, and to compare proteins by aligning these models. Due to non-local dependencies, the problem of aligning Potts models is hard and remains the main computational bottleneck for their use.We introduce here an Integer Linear Programming formulation of the problem and PPalign, a program based on this formulation, to compute the optimal pairwise alignment of Potts models representing proteins in tractable time. The approach is assessed with respect to a non-redundant set of reference pairwise sequence alignments from SISYPHUS benchmark which have lowest sequence identity (between These results show that pairwise couplings from protein Potts models can be used to improve the alignment of remotely related protein sequences in tractable time. Our experimentation suggests yet that new research on the inference of Potts models is now needed to make them more comparable and suitable for homology search. We think that PPalign’s guaranteed optimality will be a powerful asset to perform unbiased investigations in this direction. Thanks to sequencing technologies, the number of available protein sequences has considerably increased in the past years, but their functional and structural annotation remains a bottleneck. This task is thus classically performed in silico by scoring the alignment of new sequences to well-annotated homologs. One of the best-known method is BLAST , which pDespite their solid performance, pHMMs are innerly limited by their positional nature. Yet, it is well-known that residues that are distant in the sequence can interact and co-evolve, e.g. due to their spatial proximity, resulting in correlated positions. One can cite for instance experiments of Ranganathan et al. on the WW domain who showed by experimentally testing libraries of artificial sequences of the WW domain that coevolution information is necessary to reproduce the functional properties of native proteins .There have been a few attempts to make use of long-distance sequence information. Menke, Berger and Cowen introduced a Markov Random Field (MRF) approach, SMURF , where Mfication  have beeentclass1pt{minimau et al.  proposedIn addition to these inputs, MRFalign relies on complex scoring functions based on Conditional Neural Fields and Probabilistic Neural Network trained on reference alignments and structural information to optimize the similarity measures of the positional and coupling potentials of the MRF models to be compared. In reported results, PSSM–PSSM and HMM–HMM alignment methods are outperformed by MRFalign in terms of both alignment accuracy and remote homology detection accuracy, notably on mainly beta proteins, showing the potential of using long-distance information in protein sequence alignment.Workshop on Co-evolutionary Methods for the Prediction and Design of Protein Structure and Interactions by Muntoni and Weigt [Meanwhile, a more interpretable type of MRF grounded in the maximum entropy principle led to a breakthrough in the field of contact prediction : the Potnd Weigt , proposind Weigt , proposiA method to align a sequence to an hybrid model between Potts model and profile Hidden Markov Model was concurrently proposed by Wilburn and Eddy with Hidden Potts Models .The main computational bottleneck for such approaches is that, due to non-local dependencies, alignment problems involving Potts models are hard. Muntoni and Weigt  proposedThis paper fully describe our Potts to Potts model alignment of sequences approach and focus on its performances in terms of alignment quality on remote homologs. In the following sections, we explain our choices for the inference of Potts models and describe the method PPalign for aligning them. To assess the tractability and the quality of alignments by this approach, we extracted 33 non-redundant pairwise reference alignments with a particularly low identity from the manually curated structural alignments database SISYPHUS  and randPotts models are discrete instances of pairwise Markov Random Fields which originate from statistical physics. They generalize Ising models by describing interacting spins on a crystalline lattice with a finite alphabet. In the paper introducing Direct Coupling Analysis, Weigt et al. came up with the idea of applying them to proteins: by building a multiple sequence alignment of a protein sequence and its close homologs and inferring a Potts model on it, one can predict contacts between residues by looking at its parameters .The inference of a Potts model from a set of protein sequences can be formally defined as follows:N protein sequences of lengths N sequences S extended with a new gap character ’−’, which all have the same length L and such that removing all gaps from a sequence L is called the length of the MSA. We denote by q the size of the alphabet.Let q states for MSA X can be defined as a statistical model whose probability distribution P over all sequences of length L maximizes the Shannon entropy Z is a normalization constant : X:A Potts model with q where a to be found at position i.a and b are when found at positions i and j.An illustration of Potts model is given Fig. These parameters can be assigned a practical interpretation:mentclass2pt{minimgauge invariance: Eqs. (These parameters are unique up to a ce: Eqs.  and 2)  gauge inZ at each step, which is computationally intractable. Among the several approximate inference methods that have been proposed [v:In practice, maximizing the likelihood would require the computation of the normalization constant proposed , 23–26, proposed , 28 withproposed , a recenproposed  which, iUnlike homology detection methods based on simple pairwise sequence alignment such as BLAST, as HHalign our method explicitly considers sequence conservation and variability around sequences to be compared by modeling each sequence and its retrieved close homologs, with the addition of coupling information in our case. This implies that the quality of the alignment will be dependent on the quality of the MSAs of close homologs built for each sequence. In this paper, based on CCMpred’s recommendations , for eacfiltering at taking the first 1000 sequencesremoving all columns with g trimal The resulting MSA is inputted to CCMpredy [i  represent positions in B. A node i.k in the alignment graph represents the alignment of node i from Potts model A and node k from Potts model B. Directed edges  are drawn for n positions in the two Potts models is represented by a set of nodes increasing path.The i.k or heads of edges with tail at i.k, that contain at least one node at row j (resp. column l), and that mutually contradict, i.e. no two of them lie on an increasing path.In order to properly set constraints on the alignment, two additional node sets are defined: i.k in the alignment graph, with i in Potts model A and position k in Potts model B are aligned, and similarly a binary variable i.k, j.l) is activated.To cast the alignment problem into an ILP, binary variables A and B of lengths Given notations above, the alignment of two Potts models Constraints  and 25)25) preveA major asset of the solver is that it can yield the exact solution of this ILP, or a solution within a chosen epsilon range of the exact one, in tractable time. Desired precision of the optimization can be set by the parameter As in , an affiFurthermore, as in most profile-profile methods , in ordeFrom each multiple sequence alignment in SISYPHUS, every possible pairwise sequence alignment with a sequence identity lower than For each sequence in each of these extracted pairwise reference alignments, we attempted to build a Potts model with the workflow previously described. Sequences that had less than 1000 Finally, for each reference multiple sequence alignment in SISYPHUS with more than two of such eligible sequences, a reference sequence pair was randomly selected. This last steps discards many alignment pairs but ensures that no multiple sequence alignment biases the results.This resulted in a set of 33 non-redundant reference pairwise alignments which was randomly split into a train set of 11 alignments on which our hyperparameters were trained \documentIn this experiment, we compared the results of PPalign with HHalign, the core alignment method of the state-of-the-art remote homology detection method HHsearch. We ran HHalign v3.0.3 with default options to align pHMMs built with HHmake with default options from the MSAs used to infer Potts models .To assess the contribution of direct couplings in sequence alignment, we also used PPalign to compute alignments of independent-site Potts models  with the same hyperparameters  of the sequence pairs from the test set. Experiments were run on a Debian9 virtual machine with 4 VCPUs (2.3 GHz) and 8 GB RAM. The timeout for each alignment was set to 6 hours.The first result is that all the alignments could be computed by PPalign in running times ranging from 5 seconds to 6 minutes, with an average of 1 min 36. Figure When couplings are not considered, the problem is fundamentally easier and running times of HHalign and independent-site PPalign are significantly faster than PPalign: both programs were able to compute each optimal positional alignment in less than 1 second. The running times of HHalign and independent-site PPalign are plotted in Fig. Alignment quality was assessed by comparing the alignment obtained by the different methods for the 22 sequences pairs in the test set to their reference alignment.Overall, PPalign achieves a better Results for each sequence pair of the test set are displayed in Fig. In most cases, PPalign and HHalign yield similar PPalign is significantly outperformed by HHalign on 3 pairs, marked by yellow dots in Fig. Interestingly, PPalign without coupling score  achieves an Although the problem is very likely to be NP-hard since the threading problem is NP-hard , these e CCMpred  shows thRegarding alignment quality, our results for the alignment of Potts models inferred using a pseudo-likelihood method designed for co-evolution prediction purposes are overall better than for the alignment of pHMMs by HHalign, with significant examples demonstrating how taking couplings into account can improve the alignment of remote homologous proteins, especially for lowest similarity alignments. There is still room for improvement in our method. We have noticed a tendency to align too many positions that can be corrected and our worst score with respect to HHalign is associated with very gappy train MSAs, indicating that augmenting Potts models with an appropriate gap handling strategy would undoubtedly improve our results. Above all, it is worth noting that independent-site PPalign finds sometimes a better alignment than PPalign, coupling matrices bringing more noise than assistance in these cases. To get better alignments, the priority is now is to work on more robust inference of Potts models, to make them more comparable and informative for homology search despite the relatively small size of training samples. We proposed here some ideas towards the inference of more canonical Potts models, with only the necessary couplings, as well as some post-processing steps, notably to smooth weights by simulated uniform pseudocounts. This later step allowed us to raise the average While Potts models have been successfully used for contact prediction and other tasks on protein sequences, using coevolutionary information captured by direct coupling analysis to improve homology search by sequence alignment seems promising, but challenging. The main computational bottleneck is the hardness of alignments involving Potts models.We presented here PPalign, our method for Potts model to Potts model alignment based on the introduction of an Integer Linear Programming formulation of the problem with an implementation relying on an efficient solver able to yield the optimal solution in tractable time. This initiates a new approach for remote homology search by alignment of Potts models inferred from close homologs, similarly to HHalign with the alignment of pHMMs but with the addition of long distance sequence correlations reflecting the 3D structure of proteins. In this approach, Potts models need to be comparable. As a basic principle for building canonical Potts models, we proposed to infer models with as much weight as possible on the positional parameters and to add only necessary weight on pairwise couplings. We also proposed a scheme for lessening the effects of small sample variations on the Potts model’s parameters.To experimentally assess the feasibility and interest of the approach, we carefully selected a set of non-redundant reference pairwise alignments with low sequence identity and with enough close homologs for each aligned sequence to infer a Potts models. We carried out rigorous experimentation with a strict separation of data used to train hyperparameters of the method and data used to test its performances. Results on test alignments confirm that Potts models can be aligned in reasonable time (Our experiments suggest that new research on the inference of Potts models could improve their usefulness for homology search. The approach would undoubtedly benefit from extending to Potts models the insertion/deletions modeling capacities as well as the efficient pseudocount schemes of pHMMs. Maybe a more difficult issue is to have guarantees on a canonical form or at least some robustness of inferred Potts models to make them more comparable. We hope that PPalign’s efficiency and optimality will help to perform unbiased investigations in these directions.


Coronavirus disease 2019 (COVID-19), caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), has resulted in ~4.8 million deaths worldwide as of this writing. Almost all conceivable aspects of SARS-CoV-2 have been explored since the virus began spreading in the human population. Despite numerous proposals, it is still unclear how and when the virus gained the ability to efficiently bind to and infect human cells. In an effort to understand the evolution of receptor binding domain (RBD) of the spike protein of SARS-CoV-2, and specifically, how the ability of RBD to bind to angiotensin-converting enzyme 2 receptor (ACE2) of humans evolved in coronaviruses, we have applied an alignment-free technique to infer functional relatedness among betacoronaviruses. This technique, concurrently being optimized for identifying novel prions, was adapted to gain new insights into coronavirus evolution, specifically in the context of the ongoing COVID-19 pandemic. Novel methods for predicting the capacity for coronaviruses, in general, to infect human cells are urgently needed.proposed method utilizes physicochemical properties of amino acids to develop fully dynamic waveform representations of proteins that encode both the amino acid content and the context of amino acids. These waveforms are then subjected to dynamic time warping (DTW) and distance evaluation to develop a distance metric that is relatively less sensitive to variation in sequence length and primary amino acid composition.Using our proposed method, we show that in contrast to alignment-based maximum likelihood (ML) and neighbor-joining (NJ) phylogenetic analyses, all bat betacoronavirus spike protein RBDs known to bind to the ACE2 receptor are found within a single physicochemical cluster. Further, other RBDs within that cluster are from pangolin coronaviruses, two of which have already been shown to bind to ACE2 while the others are suspected, yet unverified ACE2 binding domains. This finding is important because both severe acute respiratory syndrome coronavirus (SARS-CoV) and SARS-CoV-2 use the host ACE2 receptor for cell entry. Surveillance for coronaviruses belonging to this cluster could potentially guide efforts to stifle or curtail potential and/or early zoonotic outbreaks with their associated deaths and financial devastation.Robust methods for predicting human ACE2 receptor binding by the spike protein of coronaviruses are needed for the early detection of zoonotic coronaviruses and biosurveillance to prevent future outbreaks. Here we present a new waveform-based approach that utilizes the physicochemical properties of amino acids to determine the propensity of betacoronaviruses to infect humans. Comparison with the established phylogenetic methods demonstrates the usefulness of this new approach in the biosurveillance of coronaviruses. Alphacoronavirus, Betacoronavirus, Gammacoronavirus and Deltacoronavirus [Alphacoronavirus and Betacoronavirus are known to primarily infect mammals including humans [Coronaviruses are a diverse group of RNA viruses of the family Coronaviridae. There are currently four recognized genera within this family, namely, onavirus . Of thesg humans , 2. Therg humans .Betacoronavirus SARS-CoV that in November 2002 began circulating with human-to-human transmission in China [Betacoronavirus MERS-CoV that in 2012 made the leap to humans in the middle-east with human-to-human transmission limited primarily to healthcare settings [Betacoronavirus SARS-CoV-2 that began circulating in the human population of Guangdong Province, China in late 2019 [In the past 20 years, three of the seven known human coronaviruses have emerged, presumptively through zoonoses, as deadly human pathogens. These include in China , Betacorsettings , 13, andate 2019 . Of gravate 2019 , 16. Of ate 2019 . TherefoThe question of the origin of any organism, protein, or gene is a question of both homology and mapping of that homology. Current phylogenetic analyses mostly involve comparison and quantification of similarity among biomolecular entities, mainly at the nucleotide or protein primary sequence level. Arguably the most objective approach to classify genetic entities is using quantifiable traits even when that quantification is boolean in nature . This isWhen sequence identity as determined by primary sequence alignment is low and yet functional conservation is obvious, homology determination becomes difficult, that is, many such cases fall into the twilight zone of <30% identity among homologs where ambiguity rules . Of evenIn the early years of phylogenetics, perhaps when biomolecular sequences were not abundant, homology was predominately determined using traits expressed at the macro-morphological scale. This practice continues even today, albeit in a limited scope and most notably in cases where molecular data are not available or collection is not practical such as in the analysis of fossils  and fishRather than inferring the substitution of amino acids based on probabilistic models derived from the alignments of well-understood protein sequences, which underpin most scoring matrices commonly used for sequence alignment, the inference by the method presented herein is based solely on the assumption of conservation of structure/function within orthologous protein domains. Such structural conservation likely varies spatially within a protein and therefore our alignment-free method, not constrained by genomic segment contiguity relied upon by alignment-based methods, is able to account for such conservation at the structural/functional level and thus could resolve the twilight zone homology, where the alignment-based methods relying on genomic segment contiguity and probabilistic matrices become progressively less reliable.The physicochemical properties that we chose to mathematically represent the underlying structure of the RBDs of coronaviruses were HP and molecular weight (MW). While HP is well established as the premier factor with regards to the formation of stable protein–protein interaction , MW as aWe therefore build upon the use of HP by Lolkema and Slotboom  by incluPrimary amino acid sequences can be converted into vector representations according to the physicochemical properties of each individual residue. In doing so it becomes possible to visualize polypeptide sequences as waveforms . These are similar in concept to time series data except that periodicity is based on a serial representation of residues rather than observations at sampling times. The techniques employed are, therefore, conceptually similar to those used in the analysis of time series data such as speech recognition profiles.®Core™i5-7200u processor with 8GB of RAM. Each RBD sequence was converted into a vector according to the algorithm described below. The algorithm uses the values for residue MW and HP to compute residual value V  and originally published by Monera et al. [A complete list of the sequences used in our analyses can be found in  value V . The vala et al. .(1)V=; and H is the residue HP index.Where V for the residue of interest and the extrinsic value was obtained as the mean of the V value for the residue of interest and V value for the left flanking residue .The values in  residue . The vec residue . The vecRBD polypeptide sequences were analyzed by performing direct Euclidean and cosine comparisons using the ape, dtw, proxy and TreeTools libraries in R . Three-phttp://www.atgc-montpellier.fr/phyml/ (Accessed 02 November 2021), with automatic substitution model selection (default) and 1000 bootstrap steps [In addition to the waveform-based, alignment-free approach, we reconstructed phylogenetic trees for the amino acid sequences using alignment-based ML and NJ protocols. Amino acid sequences were used in our alignment-based analysis because the results from such analyses are directly comparable to our DTW-based approach which uses the physicochemical properties of those amino acids to derive distance and topological relationships. For the alignment-based analyses, multiple sequence alignments were performed using ClustalW version 2.1 as implemented in Jalview 2.11.1.3 with a gap initiation penalty of 10, a gap extension penalty of 0.2, and a Gonnet series scoring matrix (default) , 45. ML ap steps . NJ treeap steps .Three methods of determining the congruence among dendrograms were used. These included visual examination of tanglegrams, evaluation of the number of nodes with the exact same list of terminal taxa (aka common nodes) and calculation of the Robinson–Foulds Metric . TanglegX-axis warping. In other words, differences indicated by peaks in the plots of these waveforms may not be directly comparable across multiple waveforms unlike multiple alignment-based methods.To compare the waveform representation of RBD sequences from different coronaviruses including SARS-CoV-2, we used the Warping Correspondence function in Mathematica version 11.3.0.0  with a EThe MW and HP of amino acids were used to encode the RBDs of the betacoronavirus spike proteins. Those encoded sequences were subjected to direct comparisons using Euclidean and cosine distance and also DTW comparison using Euclidean distance. The resulting distance matrices were then subjected to hierarchical clustering analysis using both NJ and UPGMA methodologies and compared to the ML and NJ trees produced using a multiple alignment of the same primary sequences. As can be observed in While alignment-based ML and NJ are both commonly used in the analysis of protein sequences, the congruency between the dendrograms produced using these methods was low as indicated by tanglegram comparison of those dendrograms in DTW and strict Euclidean/cosine distance-based methods employed herein resulted in little ambiguity within and among clusters and were in general agreement, regarding cluster composition, with the alignment-based ML analysis. However, there is a major exception among ACE2-binding RBDs where the alignment-based ML method results in two separate clusters, a finding that has been reported by others as well , 55–58; The alignment-based NJ tree shows a less cohesive grouping of ACE2-binding RBDs than does our physicochemical clustering method and also exhibits numerous polytomies . AdditioCloser examination of congruency as indicated by the proportion of nodes with the exact same taxa (Common Nodes) in In addition to the cluster composition, overall tree topological congruency was evaluated using the Robinson–Foulds Metric. The greatest level of congruency was observed between the single- and three-peak DTW analyses and the alignment-based ML analysis (58%) as shown in Due to multiple polytomies in the tree produced using an alignment-based NJ methodology , the topThe death toll from SARS-CoV-2 has been growing steadily since the beginning of the COVID-19 pandemic in early 2020 . RecentlFour of the pangolin coronavirus RBDs used in our analyses have not been investigated with regards to ACE2 binding. However, two pangolin coronaviruses that have been previously investigated and confirmed to bind ACE2 (GXP2V and MP789) are found within our unified cluster , 21 raisWhile it is the most pronounced benefit, the ability to identify newly sequenced ACE2-binding RBDs is not the only value in our waveform-based approach. Some studies have focused on the divergent origin of SARS-CoV-2 coupled with recombination , 61. OthAnother way to approach the question of convergent evolution is by asking if there is excessive conservation of function given the observed level of phylogenetic diversification. Such functional conservation can be maintained semi-independent of primary sequence due to overlap in the physicochemical profiles of amino acids. Lolkema and Slotboom noted this physicochemical conservation and therefore made their previously mentioned statement to the effect that the 3D structure of proteins and thus their function is very tolerant of changes in their primary sequence . Herein,The true evolutionary history of the ACE2-binding betacoronavirus RBDs may have experienced convergent evolution, recombination or both. However, the most pressing question is whether or not a newly emerged betacoronavirus has the ability to bind to ACE2. Addressing this brings us closer to targeting the betacoronaviruses with the propensity to evolve to bind to human ACE2. The fact that our waveform-based approach results in a single cluster of ACE2-binding betacoronavirus RBDs when a large number of betacoronavirus RBDs were analyzed demonstrates the utility of the method in the identification of potential betacoronavirus zoonoses before they become an actuality in the human population. This is emphasized by the fact that prior to the identification of SARS-CoV-2, it would not have been assumed that a new RBD sequence belonging to the clade that we now know contains SARS-CoV-2  would beEMPH online.Conflict of interest: None declared.eoab032_Supplementary_DataClick here for additional data file.


We report a Method to Search for Highly Divergent Tandem Repeats (MSHDTR) in protein sequences which considers pairwise correlations between adjacent residues. MSHDTR was compared with some previously developed methods for searching for tandem repeats (TRs) in amino acid sequences, such as T-REKS and XSTREAM, which focus on the identification of TRs with significant sequence similarity, whereas MSHDTR detects repeats that significantly diverged during evolution, accumulating deletions, insertions, and substitutions. The application of MSHDTR to a search of the Swiss-Prot databank revealed over 15 thousand TR-containing amino acid sequences that were difficult to find using the other methods. Among the detected TRs, the most representative were those with consensus lengths of two and seven residues; these TRs were subjected to cluster analysis and the classes of patterns were identified. All TRs detected in this study have been combined into a databank accessible over the WWW. Most proteins fold into a single specific conformation, which is characteristic for globular proteins composed of stable domains, whereas unstructured loop-forming fragments represent an insignificant part of the molecule. In contrast, non-globular proteins contain intrinsically disordered regions and low-complexity sequences. An important role in the formation of the spatial structure of the protein is played by repeats ,2. Repeano acids . Structuresidues , whereasresidues .crystalline (TR consensus length: two to three residues),fibrous (TR consensus length: three to four residues),solenoid (TR consensus length: 5–42 residues),proteins with domain-forming repeats (TR consensus length: ≥30 residues), including a subclass of β-propellers (TR consensus length: 44–60 residues).In most cases, there is an association between the repeat’s consensus length and the protein’s 3D structure, on which the most popular classification of repeat-containing proteins is based . AccordiThe interest in TR-containing proteins is not accidental, as they play diverse roles in vital processes in the cell. Thus, proteins with repeats represent structural elements of cells and tissues  and provide a framework for protein–protein interactions  or, convA major effort has been put into the search for TRs using mathematical methods. Among these, statistical methods, although being the earliest, have not lost their relevance and are still quite popular . They arThe methods most frequently used to search for TRs are based on constructing sequence alignment with a determined repetitive consensus or self-alignment. The alignment method was one of the first applied to detect repeats in DNA sequences . HoweverDynamic programming is used to find TRs with a consensus over 20 residues at the 3D level. The ProStrip program is based on translating protein backbone dihedral angles  into alpha characters for repeat detection . The T-RSince, from the mathematical point of view, TRs can be considered as periodicity in protein sequences, spectral approaches are also widely applied to search for repeats ,30,31. SHidden Markov Models (HMMs) such as HHrep  and HHReRecently, machine learning methods have become popular for big data analysis. These algorithms work by setting up a program for specific patterns and applying it to recognize a similar object in the analyzed sequence. For example, RAPHAEL software, which uses a geometric approach that simulates manual classification by an expert, can reveal spatial structures of the solenoid type, determine their periodicity, and assign indels . SupportS < 0.5, but fail to detect repeats with a large number of residue substitutions and indels. However, it is the TRs with a high degree of evolutionary divergence that are of particular interest for studying the structural characteristics of protein molecules, as well as for further deciphering evolutionary processes.Many programs for finding TRs are available as program codes or web servers, such as ProSTRIP , Swelfe S > 0.5 in the presence of indels. MSHDTR does not require any information other than the amino acid sequence. Using MSHDTR, we detected highly divergent TRs missed by the currently existing methods and constructed weight matrices characterizing the consensus sequence of repeats, which could be further used by other methods  to search for specific repeat domains in proteins.Here, we describe a Method to Search for Highly Divergent TRs (MSHDTR), which can find repeats with MSHDTR was implemented in the Fortran programming language using the MPI parallel programming library. All calculations were performed in the computer cluster of the Research Center of Biotechnology RAS .Z0 using 132,133 sequences from the Swiss-Prot databank  denoted as the sequence set Q. The symbols in each sequence of the set Q were then randomly shuffled to obtain the set Qr; the two sets were searched for TRs with consensus lengths of 2–100 , where FP and TP are false positive and true positive hits, respectively. The number of TRs in the set Qr is equal to FP and that in the set Q to FP + TP. For TRs with Z0 ≥ 6.0, FP = 1284 and FP + TP = 3720, which corresponds to the FDR of 34.5%; this FDR value was chosen because it is typical for most methods used to detect TRs in proteins (see the section below).First, we determined the statistical significance level ended in ) and theThe search for TRs in the Swiss-Prot databank produced 15,035 amino acid sequences that contained TRs with different consensus lengths. Considering that one sequence may have several non-overlapping TRs, the total number of identified regions with TRs was 15,407.Q and Qr as described in psim = 0.75 and XSTREAM with the default parameters were 33.5% and 31.3%, respectively, and could be considered similar to that of MSHDTR (34.5%). In further analysis, we used T-REKS with psim = 0.75, XSTREAM with default parameters, and MSHDTR with Z0 ≥ 6.0.To correctly compare the performance of MSHDTR with those of the T-REKS  and XSTRn ; homo-repeats were excluded from consideration. Random fragments of length n were created based on the average residue composition according to Swiss-Prot; for each n, 100 different random chunks were obtained, and each fragment was then repeated k times . As a result, we generated an amino acid sequence of length nk that contained TRs of a consensus length n.Next, MSHDTR, T-REKS, and XSTREAM were applied to various artificial sequences with TRs. For this, we generated random sets of amino acid sequences, which contained different numbers of repeats with a length W(0), was used to perform the TR search methods. In each sequence of set W(0), we introduced random indels at the rate of 1 per 100 residues and substitutions of a certain percent i  and created the sets W(i). Each sequence from the sets W(i) was inserted into a random position of a random sequence consisting of 600 residues, and the information was stored to test the accuracy of TR boundary determination. TR identification in the sets W(i) was considered to be correct if the consensus length of the found repeat exactly coincided with n, and the TR-containing region overlapped with the artificial repeat region of length nk by at least 50%. If several non-overlapping regions with the same n were found inside the tested TRs, their lengths were summed during calculation of the intersection length.A total set of 5400 sequences, denoted as W(i) by T-REKS, XSTREAM, and MSHDTR are shown in nk was large enough and, consequently, overlooked short regions such as two-residue fragments repeated four times, which were successfully identified by T-REKS. Therefore, the next task of the study was to determine the application area of the developed method, i.e., the conditions (nk and degree of evolutionary divergence) under which MSHDTR could reliably identify TRs.The results of TR identification in the sets To determine the scope of the MSHDTR application, we calculated the divergence degree of TRs found in Swiss-Prot using the following algorithm.k be the number of TRs with a length n and built multiple alignments for the TRs found. Columns with the number of residues less than k/2 were disregarded.1. We let M2, where i = 1, 2, …, 20 and j = 1…n1, was calculated. The length of the multiple alignment was n1 ≥ n; m2 was an element of the matrix M2 filled according to the multiple alignment and was equal to the number of amino acids of type i in column j of the multiple alignment.2. The coincidence matrix s3(j) , where i was in position j if m2 was the maximum for i = 1, 2, …, 20.3. For TRs, we calculated the consensus sequence. The consensus sequence v, which was the number of residues in all repeats of the multiple alignment that coincided with the respective position of the consensus sequence. The total number of residues v1 was also determined as the sum of all elements of the matrix M2. Then, the degree of divergence was determined as follows:4. Finally, we calculated S for the found TRs was calculated using Equation (1). The results indicated that T-REKS and XSTREAM could identify more TRs than MSHDTR: 41,375 and 19,255 vs. 15,407, respectively. However, it should be noted that the TRs detected by MSHDTR were very different from those found by the other methods. In particular, we examined properties such as the degree of divergence (S) and the length of the sequence fragment (L) where TRs were found. N) on the length L The function value represents the absolute number of regions whose lengths was greater or equal to L. It can be seen from the graph that the lengths of most such regions detected by T-REKS and XSTREAM did not exceed 100 residues , whereas those identified by MSHDTR were much longer: 399 residues.MSHDTR, T-REKS, and XSTREAM were used to search for TRs in Swiss-Prot, and N) on the degree of divergence S Equation (1). The value of the function shows the number of regions with TRs that had a divergence degree greater or equal to the argument. Although T-REKS detected almost 2.5 times more TRs than the other two methods, most of them were short, practically identical repeats. Typically, T-REKS and XSTREAM identified TRs with a high degree of similarity, whereas MSHDTR recognized repeats with significant evolutionary divergence.S value; it is evident that at S > 0.5, only MSHDTR could detect TRs.SEQ0–SEQ7) with different percentages of random substitutions . TRs were constructed from 100 repeats with a consensus of seven residues and inserted into random positions of random amino acid sequences 600 residues long. The positions of the artificial TRs in random sequences are shown in l0, r0).We also compared MSHDTR with a mathematical approach that implements hidden Markov models . The HHRZ > 10.0) with a degree of evolutionary divergence of up to 120%; over that (150%), the presence of TRs could hardly be detected (Z = 5.0). In all cases, the identified areas included complete TRs. It is important to note that the found consensuses exactly corresponded to the TR consensus length in the artificial sequence.The identification was considered correct if the overlap with TRs was at least 50% and the consensus length of the repeat differed from 7 by no more than 1 or a multiple of 7. The results shown in SEQ1, HHRepID identified two distinct regions with a consensus length of seven residues, which were included in real TRs. At higher levels of evolutionary divergence (75% and 90%), only short fragments with the required or multiple consensus lengths were detected, and the overlap with the real TRs was less than 33% of the length. At the mutation level of 100%, only short parts of sequences with repeats of 14 and 15 residues were found.In contrast, HHRepID correctly detected only two sequences with evolutionary divergence rates of 25% and 50%. In The comparison of MSHDTR and HHRepID revealed not only that MSHDTR was able to recognize highly divergent TRs but also that it could more accurately detect the boundaries of TR fragments and the consensus length. At the same time, HHRepID tended to overestimate the consensus length, which was either presented as a multiple of the real length or differed from it by several residues; furthermore, it frequently significantly underestimated the length of the region occupied by TRs.n. It turned out that short TRs with consensus lengths from 2 to 11 amino acids were the most frequently observed in proteins, accounting for 71.0% of all TRs found using MSHDTR ). The matrices max (n = 2 or 7) were obtained by analysis of the Swiss-Prot databank; in total, 2104 maxM and 1650 maxM were obtained. Next, we created two sets, MR2 and MR7, which contained 2104 2 × 25 matrices and 1650 7 × 25 matrices (2 and 7 are the number of rows and 25 is the number of columns in the matrix). Each i-th matrix in the sets MR2 and MR7 was obtained by randomly rearranging the elements of matrix i from the original set max. We then performed cluster analysis for each set MR2 and MR7 and determined the average number of elements in the class for different values of the distance B, denoted as n(B)Y . We calculated the mathematical expectation and variance of the random variable n(B)Y to classify the sets MR2 and MR7, and determined the average number of elements in the class n(B)X for the real matrices max. After that, we calculated the value of n(B)Z [r1 and r2 are the numbers of classes obtained by classifying the matrices max and the set nMR, respectively, at the level B.We calculated distance of Zn(B) :(2)Zn(B)B0 = 19 for n = 2 and B0 = 35 for n = 7; in both cases, n(B)Z exceeded 10. The obtained classes at the given levels are framed in red in the dendrograms . The  elements of the matrix were found by averaging them in all matrices included in the class, taking the phase into account. To do this, we first found the central matrix for each class, from which the total distance to the rest of the class elements was minimal. The order of the rows in the other matrices of the class was shifted before averaging to the phase with the central matrix of the class by cyclic permutation of the rows. The phase for the matrix was considered to be correct if the distance B between the matrix and the central matrix was minimal. Class matrices for n = 2 or 7 residues are provided in the For each created class, we determined the common class matrices S > 0.5. MSHDTR can also successfully detect TRs with a very high Z (>30.0), such as those present in collagen-like proteins, serine-aspartate repeat proteins, and zinc finger proteins; these proteins have been previously reported as TR-containing and were confirmed as such here by using MSHDTR. However, the performance of MSHDTR is more notable in the analysis of sequences with a low Z in the interval of 8.0–10.0, in which most TRs are not recognized by other methods. Below, we present two examples of such sequences from Swiss-Prot.A specific feature of our method is that it is able to detect TRs in rather extended protein regions as well as highly divergent TRs with Mus musculus . The enzyme is the first in the glycolysis pathway, where it catalyzes the phosphorylation of hexoses; it consists of two sub-units and is ubiquitously expressed in all mammalian tissues. MSHDTR could detect TRs of n = 64, S = 0.75, and Z = 9.0 at positions from 96 to 805. 1. Hexokinase-1 from Repeats are shown using the five-character code introduced in The TRs identified by MSHDTR have not been previously detected by other methods and are not described in Swiss-Prot. The 3D structure of the enzyme monomer 73–969 is shown in Pseudomonas aeruginosa strain UCBPP-PA14 . MSHDTR could detect TRs six residues long  at positions from 186 to 469. The multiple alignment of the found TRs is shown in 2. Aspartyl/glutamyl-tRNA (Asn/Gln) amidotransferase subunit B from Repeats are shown using the five-character code introduced in http://victoria.biengi.ac.ru/aarep/ access date: 30 June 2021) running under MySQL DBMS. All TRs in the database are presented in the form of a list; detailed information on specific features such as the matrix max and alignments can be accessed through the hyperlink. There is also a standard filtering functionality for finding TRs with the desired parameters, such as a specified range of consensus lengths or a Z value.The 15,407 TRs found by our program in Swiss-Prot have been placed in a database  and re-coded the protein sequences using five instead of 20 symbols. As a result, MSHDTR considers the positions of TRs containing amino acids of the same group as identical; therefore, TRs for which the probability of residue substitutions within a group was higher than that between groups detected as similar by this method, which would not happen in case of 20-letter sequences.The ability of MSHDTR to identify TRs with Second, in the search for TRs, MSHDTR considers the correlation of neighboring residues. The weighting matrix for alignment was calculated based on the frequencies of pairs of symbols that encoded groups of amino acids rather than individual residues and, thus, reflected correlations between adjacent amino acids in TRs. As a result, MSHDTR could recognize highly divergent TRs that otherwise would not be possible to detect at a statistically significant level using previously developed methods.S < 0.5) with a small number of copies, then T-REKS and XSTREAM should be chosen. If, however, the aim is to detect highly divergent TRs (S > 0.5) present in large numbers, MSHDTR should be applied. Therefore, to cover the whole spectrum of potentially existing TRs, we recommend using T-REKS and XSTREAM in conjunction with MSHDTR.At the same time, MSHDTR skips TRs present in small numbers, which limits its applicability. Thus, the scopes of the existing methods, such as T-REKS and XSTREAM, and our method regarding TR detection are fundamentally different. If the aim is to find reasonably well-preserved TRs .It is well known that IDPs do not have unique spatial structures. Their structure and functions are customizable to interact with different partners using alternative splicing and post-translational modifications. Thus, they contribute to increasing the complexity of biological organization ,40. The Homo sapiens, Breast cancer Type 1 susceptibility protein (length: 1863 residues). It has 83.2% disordered content from 100 to 1649 residues. At the same time, in it, we detected TRs from 31 to 1768 residues with a consensus length of 24, Z = 10.7, and S = 0.81. We can also consider protein P30185 from Arabidopsis thaliana, Dehydrin Rab18 (length: 186 residues). The disordered content was 100%. It has TRs with a consensus length of seven residues, Z = 7.2, and S = 0.61 from 10 to 180 residues.Previously, the DisProt database containing IDPs was created . We analThus the developed method detects such divergent patterns thatallows the protein to accept the desired conformation only in certain interactions.K , N , I , M , and T , respectively [Seq(l), l = 1, 2, …, NN (where NN is the volume of the Swiss-Prot databank) and was searched for TRs using the algorithm MSHDTR.Before the search for TRs, we divided the 20 amino acids into 5 groups according to the polarity of their side chains—non-polar, polar, aromatic, positively charged, and negatively charged—and assigned a specific letter to each group: ectively . Next, eSeq(l), we used a mathematical algorithm that included 4 steps. First, we created a set of random position–weight matrices (PWMs) Q(n) of size , where n is the consensus length of TRs. Set Q(n) contained 103 matrices M, where n and 25 are the numbers of rows and columns, respectively, in each PWM, since we considered correlations of adjacent symbols in Seq(l).To find TRs in maxM that best described TRs of length n present in the sequence Seq(l). For this, we performed local alignment of the sequences S1 and Seq(l) using the matrix M from the set Q(n) [S1(n) was created artificially and contained a fragment 1, 2, …, n, which was repeated in tandem over the length L. The matrix maxM was considered to have the best local alignment with the sequence Seq(l) if it had the highest value of the similarity function max(n)F.Second, we used an iterative procedure to determine the matrix set Q(n) . The seqn from 2 to 100, and maxM and max(n)F were determined for each length n.In the third step, this procedure was iterated for a consensus length n = 2–100 using the Monte Carlo method. Each step of the developed algorithm is described in detail below.Finally, we evaluated the statistical significance of TRs with consensus lengths S1(n) that contained the fragment 1, 2, …, n repeated 1000 times; thus, the sequence S1(n) had a length L = 1000 n. Next, we created the sequence S2 of length L, where numbers from 1 to 5 occurred in a random order and with equal probabilities. Next, we filled in the matrix M1 using an iterative procedure. Initially, the elements of the matrix were zeroed; in this case, M1(s1(i), k) = M1(s1(i), k) + 1, where i = 2 to L, s1(i) is the i-th element of the sequence S1(n), and k = s2(i − 1) + 5 (s2(i) − 1). The sum of the elements of the matrix M1 is equal to L-1. Based on the matrix M1, we calculated PWM M using the formula:We generated the sequence M from the set Q(n). After that, we randomly mixed the numbers in the sequence S2, re-filled matrix M1, and calculated the second matrix M by Equation (3). In total, we created 103 matrices M for each Q(n), where n varied from 2 to 100.Thus, we created the first Q(n) created in max according to the following algorithm:The sets 1. Matrix transformationM from the set Q(n) and calculated:p1 (i) is the probability of symbols in S1, which is equal to 1/n for any i, and p1(k) and p2(l) are the probabilities of the numbers k and l, respectively, in S2 .We took the first matrix Q(n) have the same 2R and dK, we performed matrix transformation as described in detail in [R0= 110 n and dK = −1.0; the transformed matrix was denoted as MT. The aim of the transformation was to obtain approximately the same distribution for the similarity function F(n) [maxF(n) could be selected as the most statistically significant. Such an assumption greatly speeds up calculations.To make each matrix from the set etail in , after wion F(n)  to analyS1(n) and Seq(l)2. Local Alignment of the Sequences Seq(l) be L. To calculate the local alignment, we used the sequence S1(n) introduced in Seq(l). For local alignment of the sequences S1(n) and Seq(l), we calculated the matrix of similarity function F using the formula:t = s(k) + 5(s(i) − 1)); i and j range from 2 to L; s(i) and s1(j) are elements of the sequences S(l) and S1, respectively; and t indicates the fact that in the matrix MT, symbol pairs are considered.Let the length of the sequence k already included in the alignment. The process of searching for k and filling the matrix F with the dimensions  is described in [For calculations using Equation (6), we need to find the previous position ribed in  in theirF = 0 and F = 0 for i and j from 1 to L as the initial conditions. The penalty for indel (del = 25.0) was chosen as previously described [F, in which we determined the maximum element mF and built the maximum subsequence from mF to the first element of the matrix F equal to zero. This maximum subsequence, denoted as Local, represented the local alignment of the sequences S1(n) and S(l), including its coordinates in each sequence.We took escribed . The invmaxF(n)3. An Iterative Procedure for Finding Local, we iteratively changed PWM MT. First, we calculated the frequency matrix M1 by scanning Local from the beginning to end and filling the matrix M1 as: M1(s1(i), k) = M1(s1(i), k) +1, where i is the entire length of Local, s1(i) is the i-th element of the sequence S1 in Local, and k = s(i − 1) + 5(s(i) − 1). The sum of the elements in the matrix M1 was equal to the length of Local minus 1. If, in Local, the sequences S1(n) and S(l) had a missing character, then i = i + 1 without filling the matrix M1. Next, we calculated a new PWM M using Equation (3), transformed the matrix M, and obtained MT as described above. MT was used again in Equation (6) to obtain new Local and mF values; the procedure was reiterated starting with the construction of a new frequency matrix M1 with the new Local until the mF value was increased. If mF remained the same or decreased, or showed cyclical fluctuations, then the iterative procedure was stopped. The maximum value of mF corresponding to its Local and PWM MT was obtained as the output.To determine the best Q(n), for each of which its own mF, Local, and MT were created; then the maximum mF, denoted as max(nF), was chosen and used to select maxM and Local.The above steps were repeated for all matrices from the set n using Monte Carlo simulation, we randomly shuffled the sequence Seq(l) 200 times and obtained a set (Sr) containing 200 random sequences, each with a length of L. We then took the matrix maxM, aligned the sequence S1(n) with each sequence from the set Sr using the iterative procedure described in mF values, which were inserted into the set nV. Next, we determined the mean (D(nV)) for the set nV and calculated the statistical significance Z(n) of TRs with a consensus length of n:To estimate the statistical significance of each TR with a consensus length of Z0, which means that if Z(n) > Z0, then the identified TRs can be considered statistically significant.For all consensus lengths, we introduced the same threshold level Seq(l), we obtained a spectrum of Z(n), and for each n, we had maxF(n), maxM, and Local. The local alignment coordinates for various values of n may differ. If TRs with different lengths n overlapped slightly, the protein was considered to have regions with separate TRs, but if the overlap was significant, then the TRs were treated as the same. This situation can be encountered for multiple lengths n: 2n, 3n, etc., or close lengths. In order to avoid duplication of TRs in further analysis, the detected TRs were filtered.For sequence Seq(l), we chose the 0n that had 0Local and the largest Z(n0); next, the values of n which had a local alignment intersection with 0Local over 50% of the length were excluded, and the next 0n was chosen. The procedure was reiterated until all values of n for sequence Seq(l) had been considered.First, for each sequence α-helices [The results shown in -helices , in whic-helices .Z(n) > Z0 for n equal to 2 and 7 by assessing the difference between the matrices maxM for TRs with the same n.We classified all TRs with maxM can be considered as a point in the n × 25 space and the difference between two matrices could be measured according to the Euclidean distance between them according to the formula:M1max and M2max, respectively. It is impossible to know the phase orientation of these matrices; since a phase shift may be present, all distances obtained for any possible phase shifts should be checked. Algorithmically, the phase shift is produced by a cyclic shift of the rows of the second matrix. We take the minimum of n calculated distances (minB) as the resulting distance between two TRs.The matrix n = 2 and n = 7, we compared all pairs of matrices maxM and maxM and found 2104 and 1650 TRs, respectively; next, the distance matrices B2 and B7 were calculated. Next, we performed a cluster analysis of the TRs for n = 2 and n = 7 using the R software environment for statistical computing, with B2 and B7 as the input data. First, all TRs were considered to be separate objects and were then merged iteratively into classes with other objects or previous iteration classes according to the shortest distance between them using the complete linkage method. Finally, the algorithm combined all objects into 1 class, forming a hierarchical tree structure.For TR consensus lengths


Birds exhibit an enormous diversity in adult skull shape (disparity), while their embryonic chondrocrania are considered to be conserved across species. However, there may be chondrocranial features that are diagnostic for bird clades or for Aves as a whole. We synthesized and analyzed information on the sequence of chondrification of 23 elements in ten bird species and five outgroups. Moreover, we critically considered the developmental morphology of the chondrocrania of 21 bird species and examined whether the diversity in adult skull shape is reflected in the development of the embryonic skull, and whether there are group-specific developmental patterns.Apteryx), the unique morphology of the bony skull in the orbito-nasal region is reflected in its chondrocranial anatomy. Finally, differences in morphology and chondrification sequence may distinguish between different Palaeognathae and Neognathae and between the Galloanserae and Neoaves. The sequence of chondrification is largely conserved in birds, but with some variation in most regions. The peri- and prechordal areas in the base of the chondrocranium are largely conserved. In contrast to the outgroups, chondrification in birds starts in the acrochordal cartilage and the basicranial fenestra is formed secondarily. Further differences concern the orbital region, including early chondrification of the pila antotica and the late formation of the planum supraseptale.We found that chondrocranial morphology is largely uniform in its major features, with some variation in the presence or absence of fenestrae and other parts. In kiwis . These issues were taken into consideration when assessing differences across species. The summary of works on avian chondrocranial development, covered more than a century, and a comparison of the chondrification sequence among birds could be conducted. Future studies could test the hypothesis that chondrocranial disparity in Aves, in terms of the shape and proportion of individual elements, could be as large as adult skull disparity, despite conserved developmental patterns and the richness of forms in other  portions of the skull.The online version contains supplementary material available at 10.1186/s12983-021-00406-z. There is much disparity among birds, as reflected in variation in skull shape , 2. AdulReportedly, only a few chondrocranial features distinguish birds from non-avian sauropsids, in particular from crocodilians . CrocodiNo specific chondrocranial features to discriminate among the major avian taxa are known; essentially the chondrocrania are considered to be similar , 25. TheOnly few authors have dealt with chondrification sequences of the skull , 42, 43.We present a comprehensive analysis on the chondrification sequence and the diversity of the cartilaginous embryonic skull of birds based on detailed descriptions published since the nineteenth century. We compare patterns of chondrification among ten bird species and five outgroup representatives, and we discuss homology and variation in the morphology of their chondrocrania and those of eleven other bird species. We focus on the question if the great diversity of bird skulls is reflected in chondrocranial disparity, and whether the sequence of chondrification of the embryonic skull is preserved among different bird taxa.The supposed conservatism of chondrocranial morphology Fig.  in the gPhalacrocorax carbo is the only documented exception among birds in which the onset of chondrification was not in the chondrocranium sensu stricto, but the chondrification of Meckel’s cartilage and hyoid apparatus took place before that of the neurocranium  must not be confused with it” . In a later stage of Spheniscus, the lateral carotid foramen was formed without the contribution of the infrapolar process. Instead, the posterior part of the trabecular-polar bar formed together with the basitrabecular process and the acrochordal cartilage a “infrapolar commissure” that bordered the lateral carotid foramen . It presents a consensus of several molecular studies. Birds are grouped in Palaeognathae and Neognathae. Neognathae includes the monophyletic clade Galloanserae consisting of Anseriformes and Galliformes . In case of unresolved nodes of the tree, the ancestral state is reconstructed as uncertain and potential apomorphies of the ground pattern are shifted to more terminal nodes in the tree.For the analysis of chondrocranial diversity the data of 21 species were recorded for seven discrete chondrocranial elements Table  and for The used nomenclature in the study follows Sonies , de BeerAdditional file 1: Table S1. Chondrocranial development sources on bird and reptile outgroups used in this study.Additional file 2: Table S2. Terminology of the processes of the trabecular-polar region and their presumed homology [homology , 50, 64.Additional file 3: Table S3. Selection of anatomical terms used for homologous chondrocranial characters in the bird chondrocranial literature.Additional file 4: Table S4. Compilation of the original stages of species used for the analysis of the chondrification sequence. Continued in Table S5, Additional file Additional file 5: Table S5. Compilation of the original stages of species used for analysis of the chondrification sequence. Continued from Table S4, Additional file


Aligning sequencing reads onto a reference is an essential step of the majority of genomic analysis pipelines. Computational algorithms for read alignment have evolved in accordance with technological advances, leading to today’s diverse array of alignment methods. We provide a systematic survey of algorithmic foundations and methodologies across 107 alignment methods, for both short and long reads. We provide a rigorous experimental evaluation of 11 read aligners to demonstrate the effect of these underlying algorithms on speed and efficiency of read alignment. We discuss how general alignment algorithms have been tailored to the specific needs of various domains in biology.The online version contains supplementary material available at 10.1186/s13059-021-02443-7. Contemporary sequencing technologies are capable of generating tens of millions to billions of reads per sample, with read lengths ranging from a few hundred to a few million base pairs . Ho. Ho26]. variants . Third, variants . Fourth,variants , 29.TabOver the past few decades, we have observed an increase in the number of alignment tools developed to accommodate rapid changes in sequencing technology Table . PublishWe have studied the underlying algorithms of 107 read alignment tools that were designed for the short- and long-read sequencing technologies and were published from 1988 to 2020  required of eleven read alignment tools when applied to ten real WGS datasets Fig. a, b. We p value = 0.5)    .5) Fig. , 4. SMAL−3) Fig. . SNAP [8p value = 3.7 × 10−11)   in computation time of read alignment over time  Fig.  but no sWe surveyed 28 BWT-FM-based tools to compare the popularity of the read alignment algorithms using the number of times the introductory publication has been cited in other papers. Of those, three aligners have accumulated more than 1000 citations per year since release, and 18% of the BWT-FM-based tools have been cited by at least 500 papers per year. In contrast, only two of the 63 hashing-based tools have more than 1000 citations per year, but those two aligners  of various seeds extracted from the sequencing reads Fig. c. The reThe number of possible locations of a seed in the reference genome is affected by two key factors: the seed length and the seed type. The estimated number of such locations is extremely large for short seeds and can reach tens of thousands for the human genome. The high frequency of short seeds is due to the repetitive nature of most genomes, which creates a high probability of finding the same short seed frequently in a long string of only four DNA letters. A large number of possible locations for short seeds imposes a significant computational burden on read alignment algorithms , 149. OnLonger seed lengths can help reduce both the number of possible locations of a seed in the reference genome and the number of chosen seeds from each read. These benefits come at the cost of a possible reduction in alignment sensitivity, especially in cases where the mismatches between the read and the genome are located within the seed sequence. To enable increasing the seed length without reducing the alignment sensitivity, seeds can be generated as spaced seeds   , align each short segment individually, and determine the mapping locations of each long read based on the adjacent mapping locations of these short segments , 127. SoBox 1. Advantages and limitations of short- versus long-read alignment algorithmsWe discuss the challenges and the features of these algorithms that are specific to the various domains of modern biological research. Often the domain-specific alignment problem can be solved by creating a novel tool from scratch or wrapping the existing algorithms into a domain-specific alignment tool  of eukaryotes, a number of task-specific aligners are utilized to identify the origin of candidate reads or to perform homology searches. For example, Infernal  utilizeslignment .k-mer matching to detect the presence of organisms in a metagenomic sample [For untargeted whole genome shotgun (WGS) metagenomic studies, the task of identifying the genomic or taxonomic origin of sequencing reads (referred to as “fragment recruitment” or “taxonomic read binning”) is even more difficult, individual reads can originate from multiple organisms due to shared homology or horizontal gene transfer and reads may originate from previously unsequenced organisms. This has sparked the development of a variety of tools  which aic sample , 202, asc sample .Other approaches handle growing reference database sizes by aligning reads onto a reduced reference database, sometimes composed of marker microbial genes that are present in specific taxa. Reads mapping to those genes can be used to determine the presence of specific taxa in a sample . Such toEven with the development of these new metagenomic tools, existing read alignment tools  are still used for fragment recruitment purposes . Howeverand the query reads provides multiple orders of magnitude in speed improvements over older tools (such as BLASTX) at the cost of increased memory usage. Recently, MMseqs2 [k-mer matches to further improve the speed of protein alignment.Metagenomics studies are also capable of functional annotation of microbiome samples by aligning the reads to genes, gene families, protein families, or metabolic pathways. Protein alignment is beyond the scope of this manuscript, but many of the algorithmic approaches previously discussed are utilized for functional annotation , 206. Fo MMseqs2  utilizes−4 per base per cell [RNA viruses such as human immunodeficiency virus (HIV) are highly mutable, with the mutation rates being as high as 10per cell  allowingper cell . Rare geper cell , 211. MaSimilar to other domains, accurate read alignment is essential for assembling viral genomic variants including the rare ones. Aligning reads that originated from heterogeneous populations of closely related genomic variants to the reference viral genome give rise to unique challenges for existing read alignment algorithms. For example, read alignment methods should be extremely sensitive to small genomic variations while being robust to artificial variations introduced by sequencing technologies. At the same time, the genetic difference between viral quasispecies of different hosts is usually substantial , which makes the application of predefined libraries of reference sequences for viral read alignment problematic or even impossible.Currently, viral haplotyping tools , 213 andBisulfite-converted sequencing is a technique used to sequence methylated fragments , 218. DuOther domains requiring specialized alignment include B and T cell receptor repertoire analysis. The repertoire data is generated using targeter repertoire sequencing protocols, known as BCR- or TCR-Seq. For example, tools designed to align reads to the V(D)J genes use combinations of fast alignment algorithms and more sensitive modified Smith-Waterman and Needleman-Wunsch algorithms , 221.Genome sequencing datasets, especially those generated with long reads, provide a unique perspective to reveal errors in the reference assemblies  based on the discrepancies between the reads and the reference sequence. References and reads  are often produced using different technologies, and there are usually disagreements between references and reads that produce mapping errors. Similarly, some of these errors also come from the errors in the reads used for assembly, collapsed/merged duplications/repeats, and heterozygosity. For example, a study for structural variation discovery led to the identification of incorrectly inverted segments in the reference genome . SimilarStructural errors in the reference genomes can be found and corrected by using various orthogonal technologies such as mate-pair and paired-end sequencing , 226, opRapid advances in sequencing technologies shaped the landscape of modern read alignment algorithms leading to today’s diverse array of alignment methods. Those technological changes rendered some read alignment algorithms irrelevant—yet provide context for the development of new tools better suited for modern next-generation sequencing data. The development of alignment algorithms is shaped not only by the characteristics of sequencing technologies but also by the specific characteristics of the application domain. Often different biological questions can be answered using similar bioinformatics algorithms. For example, BLAT , 234, a In general, the read alignment problem is extremely challenging due to the large size of analyzed datasets and numerous technological limitations of modern sequencing platforms. A modern read aligner should not only be able to maintain a good balance between speed and memory usage but also be able to preserve small and large genetic variations. It should be capable of tackling numerous technological limitations and changes, ultimately inducing rapid evolution of sequencing technologies such as constant growth of read length and changes in error rates. In general, determining an accurate global position of the read in the reference genome provides no guarantee that accurate local pairwise alignment can be found. This is especially challenging for the error-prone long reads, where determining the accurate global position of the read in the reference genome is usually easy, but local pairwise alignment represents a substantial challenge due to a high error rate.This review not only provides an understanding of the basic concepts of read alignment, its limitations, and how they are mitigated but also helps inform its future directions in read alignment development. We believe the future is bright for read alignment algorithms, and we hope that the many examples of read alignment algorithms presented in this work inspire researchers and developers to enhance the field of computational genomics by accurate and scalable tools.Additional file 1. Supplementary tables 1-6; supplementary Figures 1-11; supplementary notes 1-6; supplementary materials.Additional file 2. Review history.