Structural Alignment of Pseudoknotted RNA

In this paper, we address the problem of discovering novel non-coding RNA (ncRNA) using primary sequence, and secondary structure conservation, focusing on ncRNA families with pseudo-knotted structures. Our main technical result is an efficient algorithm for computing an optimum structural alignment of an RNA sequence against a genomic substring. This algorithm finds two applications. First, by scanning a genome, we can identify novel (homologous) pseudoknotted ncRNA, and second, we can infer the secondary structure of the target aligned sequence. We test an implementation of our algorithm (Pal), and show that it has near-perfect behavior for predicting the structure of many known pseudoknots. Additionally, it can detect the true homologs with high sensitivity and specificity in controlled tests. We also use Pal to search entire viral genome and mouse genome for novel homologs of some viral, and eukaryotic pseudoknots respectively. In each case, we have found strong support for novel homologs.


Introduction
Ribonucleic acid (RNA) is the third, and (until recently) most underrated of the trio of molecules that govern most cellular processes: the other two being proteins and DNA. While much of cellular RNA carries a message encoding an amino-acid sequence, other, 'non-coding' RNA participate directly in performing essential functions. Recent and unanticipated discoveries of novel ncRNA families [1,2,3,4,5] point to the possibility of a 'Modern RNA world' in which RNA molecules are as abundant, and diverse as protein molecules [6]. The analog of the computational gene-finding problem: "given genomic DNA, identify all substrings that encode ncRNA" is increasingly relevant, and relatively unexplored. While potentially abundant, RNA signals are weaker than proteins making them harder to identify computationally. Possibly, the strongest clue is from secondary structure. Being single-stranded, the base-pairs stabilize by forming hydrogen bonds, leading to a characteristic secondary and tertiary structure. With a few exceptions, the base-pairs are non-crossing, and form a tree-like structure. This recursive structure is the basis for efficient algorithms to predict RNA structure [7,8]. With this extensive work in structure prediction, it is natural to expect that novel noncoding RNA could be discovered simply by looking for genomic sub-strings that fold These authors contributed equally in the research. into low-energy structures. Unfortunately, that idea doesn't work. Rivas and Eddy [9] showed that random DNA (usually with high GC-content) can also 'fold' into lowenergy configurations, making it unlikely for a purely de novo approach to be successful. Therefore, a comparative approach is employed, often typified by the question: "Given a query RNA with known structure, and a genome, identify all genomic substrings that match the query sequence and structure". The query itself can be either a single molecule or a model (covariance model/stochastic context free grammar) of an RNA structure. This approach has been quite successful and single queries as well as covariance based models are routinely used to annotate genomes with ncRNA [10,11]. Central to these approaches is an algorithm for computing a local alignment between a query structure and a DNA string. The search itself is simply a scan of the genome to obtain all high scoring local alignments.
Here we pose a related question: Given a query RNA with known structure, allowing for pseudoknots, and a genome, identify all genomic sub-strings that match the query sequence and structure. Without being precise, pseudoknots are base-pairs that violate the non-crossing rule (See Figure 1). While not as common as other substructures (bulges,loops), they are often critically important to function. Pseudoknotted RNAs are known to be active as ribozymes [12], self-splicing introns [13], and participate in telomerase activity [14]. They have also been shown to alter gene expression by inducing ribosomal frame-shifting in many viruses [15]. However, understanding the extent and importance of these molecules is partially handicapped by the difficulty of identifying them (computationally). The algorithm presented here will facilitate identification.
In order to compute a local structural alignment, we must start with a formal definition of a pseudoknot in Section 2. Many definitions of pseudoknots have been postulated [16,17,18,19,20], and recent research investigates the power of these definitions in describing real pseudoknots [21]. We start here with Akutsu's formalism (simple pseudoknots) [16], which has a clean recursive structure and encompasses a majority of the known cases [21,22]. We also present algorithms that extend this class of allowed pseudoknots (standard pseudoknots). Section 3 describes the chaining procedure which is key to the alignment algorithm that follows (Section 4). However, the simple pseudoknots usually do not occur independently, but are embedded in regular RNA structures. In Section 5, we extend the algorithm to handle these cases. Other extensions are considered in Section 7. It has been brought to our attention that a recent publication [23] considers the identical problem using the formation of tree adjoining grammars to model pseudoknots. The pseudoknots considered by them are a restricted version of our simple pseudoknots. Futhermore, our alignment combines sequence and structural similarity. A detailed comparison is deferred to the full version of the paper.
The local alignments can be used in two ways. First, they can be used to infer the structure of the aligned substring that is conserved with the query. We show in Section 8.1 that in a majority of the cases, this leads to a perfect prediction of secondary (pseudoknotted) structure. Next, they can be used to predict novel ncRNA in genomic sequences. While our algorithms are computationally intensive, they can be used in combination with database filtering approaches to search large genomic regions. In Section 8.2, we validate our approach on real sequences embedded in random sequence. Finally, in Section 9, we identify (putative) novel pseudoknotted ncRNA in a search of viral and eukaryotic genomes.

Definitions and Preliminary Information
Let A = a 1 ...a n be an RNA sequence. The secondary structure is represented simply as the set of base-pairs The secondary structure, in the absence of crossing or interweaving base-pairs is called regular, and has the following recursive definition.
Next, we can define the class of allowed pseudoknots ( [16]). Definition 2. M i0,k0 is a simple-pseudoknot (see Figure 1(a)) if and only if M i0,k0 is regular or ∃j 1 , j 2 ∈ N (i 0 ≤ j 1 < j 2 ≤ k 0 ) such that the resulting partition, , satisfies the following: Figure 1 and satisfy the following: Note that a simple-pseudoknot is a standard-pseudoknot of degree 3.
, which satisfy the following: A recursive-simple-pseudoknot is a recursive-standard-pseudoknot of degree 3 (Figure 1(c)). While we can devise algorithms to align recursive-standard-pseudoknots, they are computationally expensive, and most known families have a simpler structure. Therefore, we will limit our description and tests to a simpler structure (with a single level of recursion), defined as follows: , which satisfy the following: In the full version of the paper, we extend these algorithms to the case of standardpseudoknots. The full version of the paper will present the algorithm for the most general case (recursive-standard-pseudoknot).

Structural Alignment Preliminaries
For alignment purposes, we do not distinguish between RNA and DNA, as every substring in the genome might encode an RNA string. Let q[1 · · · m] and t[1 · · · n] be two RNA strings over the alphabet = {A, C, G, U } where q has a known structure M . An alignment of q and t is defined by a 2-rowd matrix A, in which row 1 (respectively, 2) contains q (respectively, t) interspersed with spaces, and for all columns j, A [1, j] The score of alignment A is given by The function γ scores for sequence similarity, while δ scores for conservation of structure. While this formulation encodes a linear gap penalty, we note here that alignments of RNA molecules may contain large gaps, particularly in the loop regions, and we implement affine penalties for gaps (details omitted). Naturally, we wish to compute alignments with the maximum score.
The key ideas are as follows: First, note that regular and pseudoknotted structures have a recursive formulation. Therefore, the problem of structurally aligning an RNA structure against a subsequence, can be decomposed into the problems of (recursively) aligning its sub-structures against the appropriate sub-sequences, and combining the results. For regular-structures, the structure is tree-like, and the recursion follows the nodes of the tree. For simple-pseudoknots, the structure is more complex, and will be described in Section 4. The structure for embedded-simple-pseudoknots is simply a combination of the two (See Section 7).
However, it is not sufficient to consider structural elements alone, as we wish to score for sequence conservation as well. The recursive structure described only contains a subset of the nucleotides that participate in structure. Therefore, we employ a second trick of introducing spurious structural elements (base-pairs) to M . The augmented structure M must have the following properties: , so that the size of the structure does not increase too much.
-The recursive structure of M is maintained.
Pseudoknots and regular structures have very different recursive structure, and require different augmentation procedures. In Section 3, we present chaining, a novel augmentation procedure for simple pseudoknots. An augmentation for regular structures, binarization was presented in [24], and is implicit in the covariance models used to align regular RNA [25]. Here, we extend binarization to include chaining for embeddedsimple-pseudoknots ( Figure 5). These augmentations are used in the alignment algorithms for simple (Section 4), and embedded-simple-pseudoknots (Section 5).

Chaining
Before describing the chaining procedure, we revisit the problem of aligning a simple pseudoknot to a genomic sub-string. Unlike regular structures, we cannot partition the genome into contiguous substrings, because of interweaving base pairs. Thus, we need a new substructure for simple pseudoknot structures.
We start by defining a total ordering among the base pairs of a simple pseudoknot. Recall (Definition 3) that a simple-pseudoknot structure M i0,k0 can be divided into 3 parts: Figure 2(a)) For each base pair (i, j) ∈ M , exactly one of i and j is in D 2 part. We define an ordering of the base pairs in M by sorting the coordinate in D 2 . Formally, define D 2 (i, j) for all (i, j) ∈ M as follows: As distinct base-pairs do not share any coordinates, ≥ p defines a total ordering on the actual base-pairs, and can be used to define a partial order on substructures that we can recurse on. Define a subpseudoknot P(i, j, k) as the union of two subintervals Figure 2 (b)). Denote the triple (i, j, k) as the frontier for P(i, j, k). Note that i 0 is implicit from the context. Suppose that we are aligning frontier (i , j , k ) of the query against frontier (i, j, k) of the target, with the score represented by A naive algorithm would need to consider O(m 3 n 3 ) pairs of frontiers. We improve this as follows: consider the special case of (i , j ) ∈ M where (i , j ) ∈ S L . The following recursion gives the score for B (proof omitted).

Theorem 1
Note that in every sub-case of MATCH and DELETE, we move from the query frontier (i , j , k ) to the frontier (i − 1, j + 1, k), because if either i or j is not used, we cannot score for the pair (i , j ). In the INSERT case, we stay at the frontier (i , j , k ). The situation is symmetric when The key idea for the chaining procedure is that we can define a unique frontier to move to in all cases, and still ensure that each nucleotide is touched by at least one frontier. By starting with a fixed frontier, and always moving to a fixed child, we only have O(m) frontiers to consider. From Definition 2, there exist indices j 1 , j 2 which divide the simple pseudoknot structure into D 1 , D 2 and D 3 . We choose (j 1 − 1, j 1 , k 0 ) as the root frontier. Note that P(j 1 − 1, j 1 , k 0 ) represents the entire simple-pseudoknot (See Figure 3(a)). We maintain the invariant that if (i, j, k) is a frontier and j participates in a base-pair, then the base-pair must be 'below' or within the frontier. In other words, if For a frontier (i, j, k), we have different cases: for example, if (i , j) ∈ S L , we add spurious base pairs (i, j), (i −  1, j), . . . (i , j). These base pairs define an ordered set of frontiers (i, j, k) − 1), . . . , (j, k ), which define the frontiers (i, j, k) ≥ . . . ≥ (i, j + 1, k − 1). The chaining algorithm, with a complete listing of cases is described in Figure 3. The output of chaining is a directed path of 'frontiers'. The number of nucleotides in a frontier (i, j, k) is given by the expression ((i − i 0 +1)+(k − j +1)) ≤ m. Further, this number decreases by at least 1 for each adjacent frontier. Thus the return CREATENODE(j, k, empty, move (0, 1, 0), v) j 1 j 1 -1 i 0 k 0 j 2 P(j 1 -1,j 1, k 0 ) P(j 1 -1,j 1, k 0 -1 ) P ( j 1 -1,j 1, k 0 -2 ) P(j 1 -1,j 1, k 0 -3 ) P(j 1 -1,j 1, k 0 -4 ) P(j 1 -1,j 1 +1 , k 0 -5 ) P(j 1 -2,j 1 +1 , k 0 -5 ) P(j 1 -3,j 1 +2 , k 0 -5 ) if v ∈ MS and move(v) = (1, 0, 0) if v ∈ MS and move(v) = (0, 0, 1)   Figure 4(a)(Line 15). Next, we have the cases corresponding to match or deletion of v. We consider the case v ∈ M L corresponding to the subpseudoknot The corresponding recurrences are shown on Line 6 of the procedure. The other cases are handled in an analogous fashion and are described in Figure 4.

Alignment Algorithm for Embedded-Simple-Pseudoknots
We consider now the special case of aligning recursive-simple-pseudoknots in which simple-pseudoknots are embedded in a regular structure. This is by far the most common occurrence of pseudoknots. While it is relatively easy to extend our algorithms to handle the full generality of recursive-pseudoknots, the complexity increase makes the algorithms untractable for real problems. Thus, this special case offers a compromise between generality and practicality.
The first step in the procedure is to binarize the query RNA, so that every nucleotide is in a base-pair, and can be represented by a binary tree of size O(m) [24]. The main difference is that we invoke the chaining procedure whenever a simple-pseudoknot is encountered. Thus, in the binary tree, the simple pseudoknot substructure appears as a chain rooted at a pseudo-node.
After the binary tree structure M of query sequence q is created, target sequence t is aligned to this tree. The following procedure ALIGN aligns a given subsequence In Align procedure in Figure 6, we first call Binarization-SP procedure which runs in O(m) time. We also call Align-SP procedure whenever we encounter with a pseudonode in the binary tree formed. Let m p be the length of the pseudoknot regions in q[1 · · · m], m 1 and m 2 be the number of the nodes with one child and two children in the binary tree of q representing the regions with regular structure. Then, the total running time of Align procedure will be O(m p n 4 + m 1 n 2 + m 2 n 3 ). It is useful to note that very often, m p , m 2 ∈ o(m), and so the true complexity is better than the worst case complexity. Also, in computing good alignments, we can often bound the gap-lengths. if v is a pseudo node if v ∈ M − M and v has one child To take advantage of this, we employ a banding procedure (details not shown). A discussion of scoring matrices and gap penalties is deferred to the full-version of the paper.

Alignment Algorithm for Standard Pseudoknots
It is possible to extend the algorithm for aligning a simple pseudoknot to an alignment algorithm for a standard pseudoknot with degree d > 3. In the full version of the paper, we present an extension of our algorithm for standard pseudoknot structures with degree 4, and achieve the following result: The optimal alignment for a standard pseudoknot with degree 4 can be computed in O(mn 4 ) time which is identical to the degree 3 case (simple pseudoknots). In general, standard pseudoknots of degree 2k − 1 and 2k can be aligned in O(mn 2k ) time.

Results
A C++ implementation of the algorithm given for simple pseudoknots (PAL) is done. PAL takes an RNA query and target sequence, and returns all high scoring structural local alignments in the target sequence. All tests were performed on a PC (3.4 Ghz, 1 GB RAM) unless otherwise stated. The structure of the target sub-sequence is inferred from the alignment (Ex: Figure 8). In order to assess the performance of PAL, we tested 6 RNA families from Rfam database: UPSK, Antizyme, Parecho CRE, Corona-FSE, Corona-pk3 and IFN-gamma. Each of these families has an embedded-simplepseudoknot structure. General information about these families are shown in Table 1.

Predicting Structure with PAL
To test structural inference, we select a pair of members from a family as the query and target. PAL is used to align the query to the target. The inferred structure of the target is compared against the annotated structure in the Rfam database. We evaluate the predicted structure by computing TP (true positives), FP (false positives) and FN (false negatives), defined as follows: TP is the number of base pairs in inferred target structure that are correct: FP is the number of base pairs in the inferred structure that are not in the true structure, and FN is number of base pairs in the true structure that are not inferred. We define Specificity = TP / (TP + FP) and Sensitivity = TP / (TP + FN). Good performance is indicated by both being close to 1. Table 2 summarizes the result of testing each pair in the 6 families. As the results show, PAL is a strong predictor of structure, with mean sensitivity and specificity of 0.95. We also investigated the few cases in which the prediction was away from the mean. In most of those cases, the target had stem loops that were longer than the query. As they were not aligned to the query structure, they were not inferred. In practice, we would augment the inferred structure by a local extension of stem loops in both directions. A second source of errors was incorrect annotation in Rfam. Other than these two scenarios, the structure inference was essentially correct.
There is a second caveat in these results which is not apparent. Many (but not all) of the sequences have high sequence similarity, which might be making the alignment task easier. We believe this is because a sequence search tool like Blast is used to fish out candidates, which are then manually aligned, and experimentally validated. We will show in the following sections that our tool can pick out candidates that BLAST cannot find, and also align them structurally. Also, in the cases where there isn't high sequence similarity, the structure inference was just as good.

Searching for Structural Homologs
In this test, we use one of the members of an RNA family as a query, and look for its homolog in a large random sequence, with the other members inserted. Figure 7(a) shows the results for the Corona-FSE family, in which 17 members were embedded in a 19kb random sequence. The windowed scores are shown by solid lines. The actual positions of the remaining 17 members are denoted by '*'. We note that the true hits are easily the highest scoring regions along the sequence, and that all true positives score higher than all the false hits. The lowest scoring TP has a score of 988 and the highest scoring FP has a score of 606. Moreover, the random sequence scores do not show a large variation. We do not compute P -values on the hits, but in future work, we will use the distribution of scores on random, or genomic sequence (with differing GC-content) to compute the P -value. In general, the distribution is not understood, and we will either use a non-parametric value such as the Chebyshev's inequality [26], or perhaps the Gumbel distribution, which has been shown to be a good approximation to the actual distribution [11]. In contrast, Blastn (E-value 10, Word-size 7) is able to locate only 4 of the members. These results also show the significance of the secondary structure for searching homologue in addition to the primary structure. We repeat the same experiment for RNA families, UPSK, Antizyme, Parecho, Corona-FSE, Corona-pk3 and IFN-gamma. In all cases, PAL locates all members as the topmost hits (See Figure 7(b)). We agree that Blast is not the most appropriate tool for comparison as other tools such as RSEARCH, and our own tool FastR can search for structural homologs of RNA [11,26]. However, these other tools cannot align psuedoknotted RNA and the search must be followed up with a correct alignment to determine homologs. Also, the complexity of these methods often force a use of Blast to determine initial candidates.
In the next section, we show that our tool used in conjunction with RNA filters can efficiently search large genomes.

Searching Genomes for Pseudoknots
While PAL is accurate in fishing for structural homologs, it is computationally intensive, making genome scale searches intractable. However, there has been much recent research (including our own work) on computational filters for RNA, which quickly eliminate much of the database, while retaining the true homologs [27,26]. We used PAL in conjunction with sequence based filters [28] to search genomes, for the 3 most interesting families. The structure of the query is denoted by parenthesis <, >" , and "A,a" for the pseudoknot. The symbols describe the conservation: (*) sequence and structure is conserved. (+) structure is conserved but not sequence. (|) sequence is conserved, but not structure.
The Corona-FSE family (RF00507) is a conserved pseudoknot in Coronaviruses which can promote ribosomal frameshifting [29]. We searched the entire Viral genome (79 Mb) for homologs of this family in 33.8 CPU hours on 1.6GHz AMD Opteron Grid, and identified 11 novel members of the sub-family. Like other known members, these are found in coronaviruses, murine hepatitis virus, and Avian flu viruses. Only 2 of the 11 were similar enough in sequence to be identified by BLAST. The alignments can be retrieved from (http://www.cse.ucsd.edu/∼bdost/RF00507.htm). A similar result was obtained for Corona-pk3. This family has a conserved ∼ 55nt pseudoknot structure which has been shown to be necessary for viral genome replication [30]. We identified 20 novel members of this family with significant scores (See http://www.cse.ucsd.edu/ ∼bdost/RF00165.htm). Only 1 of the 20 was similar enough in sequence to be identified by BLAST.
The Interferon-gamma family is an interesting example of a pseudoknot that is found in the 5'UTR of the Interferon-gamma gene. It regulates translation of the downstream gene by binding to the kinase PKR, a known regulator of IFN-gamma translation [31]. After its discovery in 2002, the pseudoknot was found to be conserved in many mammals. Its presence in rodents was speculated, but the homolog was not located. We searched in mouse and rat genomic DNA, and in the complete gene of gerbil. In all 3 species, we clearly identified the homologs as the top-scoring alignment. The alignment of human and mouse pseudoknots are shown in Figure 8. The conserved location in the two species, just upstream of the start codon, and conservation of key elements validates the hit. We are working with collaborators on experimental validation, and to locate more members of this family.
In conclusion, we demonstrate that the algorithm for aligning pseudoknots, implemented as PAL represents a viable tool for searching for novel homologs, and for struc-tural inference. We hope that our tool will help increase the impact and influence of pseudoknotted RNA in cellular function. PAL and supplemental data are available upon request.