Debian Codegraph @

hmmer/easel/documentation/format_wuss.tex

raw
1 % Expects to be a section; whoever is including must
2 % provide section header.
3
4 Easel supports RNA secondary structure annotation using a linear
5 string representation called ``WUSS notation'' (Washington University
6 Secondary Structure notation), as originally developed for Infernal
7 and the Rfam database.
8
9 WUSS notation extends the common bracket notation for RNA secondary
10 structures, where open- and close-bracket symbols (or parentheses) are
11 used to annotate base pairing partners: for example,
12 \verb+((((...))))+ indicates a four-base stem with a three-base loop.
13 Bracket notation is difficult for humans to look at, for anything much
14 larger than a simple stem-loop. WUSS notation makes it somewhat easier
15 to interpret the annotation for larger structures -- such as in
16 structural alignments output by Infernal.
17
18 The following figure shows an example with the key elements of WUSS
19 notation. At the top left is an example RNA structure. At the top
20 right is the same structure, with different RNA structural elements
21 marked. Below is the WUSS notation string for the structure, aligned
22 to the sequence.
23
24 \begin{center}
25 \includegraphics[scale=0.8]{figures/rna_elements}
26 \end{center}
27 \begin{center}
28 \begin{BVerbatim}
29 ::((((,<<<___>>>,,,<<-<<____>>-->>,))-))
30 AACGGAACCAACAUGGAUUCAUGCUUCGGCCCUGGUCGCG
31 \end{BVerbatim}
32 \end{center}
33
34 \subsection{Full (output) WUSS notation}
35
36 In detail, symbols used by WUSS notation in \emph{output} structure
37 annotation strings are as follows:
38
39 \begin{sreitems}{\textbf{Bulge, interior loops}}
40 \item[\textbf{Base pairs}]
41 Base pairs are annotated by nested matching pairs of symbols
42 \verb+<>+, \verb+()+, \verb+[]+, or \verb+{}+.
43 The different symbols indicate the ``depth'' of the
44 helix in the RNA structure as follows:
45 \verb+<>+ are used for simple terminal stems;
46 \verb+()+ are used for ``internal'' helices enclosing a multifurcation of
47 all terminal stems; \verb+[]+ are used for internal helices
48 enclosing a multifurcation that includes at least one annotated
49 \verb+()+ stem already; and \verb+{}+ are used for all internal
50 helices enclosing deeper multifurcations.
51
52 \item[\textbf{Hairpin loops}]
53 Hairpin loop residues are indicated by underscores, \verb+_+.
54 Simple stem loops stand out as, e.g.\ \verb+<<<<____>>>>+.
55
56 \item[\textbf{Bulge, interior loops}]
57 Bulge and interior loop residues are indicated by dashes, \verb+-+.
58
59 \item[\textbf{Multifurcation loops}]
60 Multifurcation loop residues are indicated by commas, \verb+,+.
61 The mnemonic is ``stem 1, stem2'', e.g.\ \verb+<<<___>>>,,<<<___>>>+.
62
63 \item[\textbf{External residues}]
64 Unstructured single stranded residues completely outside the
65 structure (unenclosed by any base pairs) are annotated by
66 colons, \verb+:+.
67
68 \item[\textbf{Insertions}]
69 Insertions relative to a known structure are indicated by periods,
70 \verb+.+. Regions where local structural alignment was invoked,
71 leaving regions of both target and query sequence unaligned,
72 are indicated by tildes, \verb+~+. These symbols only appear in
73 alignments of a known (query) structure annotation to a target
74 sequence of unknown structure.
75
76 \item[\textbf{Pseudoknots}]
77 WUSS notation allows pseudoknots to be annotated as pairs of
78 upper case/lower case letters: for example,
79 \verb+<<<<_AAAA____>>>>aaaa+ annotates a simple pseudoknot;
80 additional pseudoknotted stems could be annotated by \verb+Bb+,
81 \verb+Cc+, etc.
82
83 This is not a fully general notation. It is possible to come up with
84 pseudoknotted structures that could not be represented with 26
85 levels of nesting ($>$26th order pseudoknot, in the sense of
86 \citep{RivasEddy99}). However, it is unlikely you will ever see one
87 in nature. I believe the highest order pseudoknot known is the S1
88 (alpha operon) pseudoknot, which is 3rd order.
89 \end{sreitems}
90
91 An example of WUSS notation for a complicated structure
92 (\emph{E. coli} RNase P) is shown in Figure~\ref{fig:RNaseP}. An
93 example of WUSS notation for a local alignment of \emph{B. subtilis}
94 RNase P to \emph{E. coli} RNase P, illustrating the use of local
95 alignment annotation symbols, is in Figure~\ref{fig:bsu-alignment}.
96
97 \begin{figure}[tp]
98 \begin{center}
99 \includegraphics[scale=0.6]{figures/rnaseP-ecoli}
100 \end{center}
101 \begin{center}
102 {\scriptsize
103 \begin{BVerbatim}
104 {{{{{{{{{{{{{{{{{{,<<<<<<<<<<<<<-<<<<<____>>>>>>>>>->>>>>>>>
105 1 GAAGCUGACCAGACAGUCGCCGCUUCGUCGUCGUCCUCUUCGGGGGAGACGGGCGGAGGG 60
106
107 >,,,,AAA-AAAAA[[[[---BBBB-[[[[[<<<<<_____>>>>><<<<____>>>->(
108 61 GAGGAAAGUCCGGGCUCCAUAGGGCAGGGUGCCAGGUAACGCCUGGGGGGGAAACCCACG 120
109
110 (---(((((,,,,,,,,,,,,<<<<<--<<<<<<<<____>>>>>->>>>>>-->>,,,,
111 121 ACCAGUGCAACAGAGAGCAAACCGCCGAUGGCCCGCGCAAGCGGGAUCAGGUAAGGGUGA 180
112
113 ,,,<<<<<<_______>>>>>><<<<<<<<<____>>>->>>>>->,,)))--))))]]]
114 181 AAGGGUGCGGUAAGAGCGCACCGCGCGGCUGGUAACAGUCCGUGGCACGGUAAACUCCAC 240
115
116 ]]]]]],,,<<<<------<<<<<<----<<<<<_bbbb>>>>>>>>>>>----->>>>,
117 241 CCGGAGCAAGGCCAAAUAGGGGUUCAUAAGGUACGGCCCGUACUGAACCCGGGUAGGCUG 300
118
119 ,,,,,<<<<<<<<____>>>>>>>>,,,,,,,,,,}}}}}}}----------aaaaaaaa
120 301 CUUGAGCCAGUGAGCGAUUGCUGGCCUAGAUGAAUGACUGUCCACGACAGAACCCGGCUU 360
121
122 -}-}}}}}}}}}}::::
123 361 AUCGGUCAGUUUCACCU 377
124 \end{BVerbatim}
125 }
126 \end{center}
127 \caption{\small \textbf{Example of WUSS notation.} Top: Secondary
128 structure of \emph{E. coli} RNase P, from Jim Brown's RNase P database
129 \citep{Brown99}. Bottom: WUSS notation for the same structure,
130 annotating the \emph{E. coli} RNase P sequence. Note that the P4 and P6
131 pseudoknots are annotated, as A's and B's.}
132 \label{fig:RNaseP}
133 \end{figure}
134
135 \begin{figure}[tp]
136 \begin{center}
137 \includegraphics[scale=0.6]{figures/rnaseP-bsu-alignment}
138 \end{center}
139 \begin{center}
140 {\scriptsize
141 \begin{BVerbatim}
142 hit 0 : 4 399 52.56 bits
143 {{{{{{{{{{{{{{{{{{,<<<<<<<<<<<<<-<<<<<____>>>>>>>>>->>>>>>>>
144 1 ggAGuggGgcaGgCaguCGCugcuucggccuuGuucaguuaacugaaaaggAccgaagga 60
145 +: :::G::C:GG:A:UCGCU+C:::: U+ ::::G+A
146 4 CUUAACGUUCGGGUAAUCGCUGCAGAUC-----------UUG----------AAUCUGUA 42
147
148 >,,,,,,,,,,,,,[[[.[--------[[[[[~~~~~~~((---(((((,,,,~~~~~~)
149 61 GAGGAAAGUCCGGGCUC.CACAGGGCAgGGUG*[ 29]*GGAAAGUGCCACAG*[96]*G 229
150 GAGGAAAGUCC GCUC C A GG :G G :GAAAGUGCCACAG G
151 43 GAGGAAAGUCCAUGCUCgC--ACGGUGCUGAG*[102]*UGAAAGUGCCACAG*[37]*G 226
152
153 ))--))))]]]]]].]]],,,~~~~~~,,,,,,,,,,}}}}}}}--..............
154 230 GUAAACCCCACCcG.GAGCAA*[77]*CuAGAUGAAUGacuGcCCA.............. 344
155 GUAAACC:C C: G GAG AA UAGAU++AUGA:U:CC
156 227 GUAAACCCCUCGAGcGAGAAA*[64]*GUAGAUAGAUGAUUGCC--gccugaguacgagg 342
157
158 ..........................-----------------}-}}}}}}}}}}::::
159 345 ..........................CGACAGAACCCGGCUUAuagcCccaCUccucuu 377
160 ACA AAC GGCUUA:AG::C::: :+ C
161 343 ugaugagccguuugcaguacgaugga--ACAAAACAUGGCUUACAGAACGUUAGACCAC 399
162 \end{BVerbatim}
163 }
164 \end{center}
165 \caption{\small \textbf{Local alignment annotation example.} Top:
166 Secondary structure of \emph{B. subtilis} RNase P, from Jim Brown's
167 RNase P database \citep{Brown99}. Residues in red are those that
168 Infernal aligns to a CM of \emph{E. coli} type RNase
169 P's. The local structural alignment is in four pieces; three regions
170 of the structure (102, 37, and 64 nt long) are skipped over. One
171 additional stem is treated as a 40 nt insertion. Bottom: the
172 Infernal output, showing the \emph{E. coli} query structure
173 aligned to the \emph{B. subtilis} sequence.}
174 \label{fig:bsu-alignment}
175 \end{figure}
176
177 \subsection{Shorthand (input) WUSS notation}
178
179 While WUSS notation makes it easier to visually interpret Infernal
180 \emph{output} structural annotation, it would be painful to require
181 people to \emph{input} all structures in full WUSS notation. Therefore
182 when software like Infernal reads input secondary structure
183 annotation, it also allows simpler rules:
184
185 \begin{sreitems}{\textbf{Single stranded residues}}
186 \item [\textbf{Base pairs}]
187 Any matching nested pair of \verb+()+, \verb+()+, \verb+[]+, \verb+{}+
188 symbols indicates a base pair; the exact choice of symbol has no
189 meaning, so long as the left and right partners match up.
190 Similarly, pseudoknotted pairs can also be annotated by matching nested
191 pairs of any alphabet character, such as \verb+Aa+, \verb+Bb+, etc.
192
193 \item [\textbf{Single stranded residues}]
194 All other symbols \verb+_-,:.~+
195 indicate single stranded residues.
196 The choice of symbol has no special meaning.
197 Annotated pseudoknots (nested matched pairs of upper/lower case
198 alphabetic characters) are also interpreted as single
199 stranded residues in Infernal input.
200 \end{sreitems}
201
202 Thus, for instance, \verb+<<<<....>>>>+ and \verb+((((____))))+ and
203 \verb+<(<(._._)>)>+ all indicate a four base stem with a four base
204 loop (the last example is legal but weird).
205
206 Remember that the key property of canonical (nonpseudoknotted) RNA
207 secondary structure is that the pairs are \emph{nested}.
208 \verb+((<<....))>>+ is not a legal annotation string: the pair symbols
209 don't match up properly.
210
211 Because many other RNA secondary structure analysis programs use a
212 simple bracket notation for annotating structure, the ability to input
213 the simple format makes it easier to use data generated by other RNA
214 software packages. Conversely, converting output WUSS notation to
215 simple bracket notation is a matter of a simple Perl or sed script,
216 substituting the symbols appropriately.