1\hypertarget{group__struct__utils__pair__table}{}\doxysection{Pair Table Representation of Secondary Structures}
2\label{group__struct__utils__pair__table}\index{Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}}
3
4
5\doxysubsection{Detailed Description}
6Collaboration diagram for Pair Table Representation of Secondary Structures\+:
7\nopagebreak
8\begin{figure}[H]
9\begin{center}
10\leavevmode
11\includegraphics[width=350pt]{group__struct__utils__pair__table}
12\end{center}
13\end{figure}
14\doxysubsection*{Functions}
15\begin{DoxyCompactItemize}
16\item
17short $\ast$ \mbox{\hyperlink{group__struct__utils__pair__table_gab124ba58014a97d2fb8c21831e19f107}{vrna\+\_\+ptable}} (const char $\ast$structure)
18\begin{DoxyCompactList}\small\item\em Create a pair table from a dot-\/bracket notation of a secondary structure. \end{DoxyCompactList}\item
19short $\ast$ \mbox{\hyperlink{group__struct__utils__pair__table_ga2c4f27a8e277f21f0d2cc10bc9a99420}{vrna\+\_\+ptable\+\_\+from\+\_\+string}} (const char $\ast$string, unsigned int options)
20\begin{DoxyCompactList}\small\item\em Create a pair table for a secondary structure string. \end{DoxyCompactList}\item
21short $\ast$ \mbox{\hyperlink{group__struct__utils__pair__table_gacca520048b24ec5a8978f4dafb4e4bf8}{vrna\+\_\+pt\+\_\+pk\+\_\+get}} (const char $\ast$structure)
22\begin{DoxyCompactList}\small\item\em Create a pair table of a secondary structure (pseudo-\/knot version) \end{DoxyCompactList}\item
23short $\ast$ \mbox{\hyperlink{group__struct__utils__pair__table_ga2daefbbd6d9f8803731651882f54332d}{vrna\+\_\+ptable\+\_\+copy}} (const short $\ast$pt)
24\begin{DoxyCompactList}\small\item\em Get an exact copy of a pair table. \end{DoxyCompactList}\item
25\mbox{\Hypertarget{group__struct__utils__pair__table_ga1ee4cdcda1f57d32dcb38032116d335d}\label{group__struct__utils__pair__table_ga1ee4cdcda1f57d32dcb38032116d335d}}
26short $\ast$ \mbox{\hyperlink{group__struct__utils__pair__table_ga1ee4cdcda1f57d32dcb38032116d335d}{vrna\+\_\+pt\+\_\+ali\+\_\+get}} (const char $\ast$structure)
27\begin{DoxyCompactList}\small\item\em Create a pair table of a secondary structure (snoop align version) \end{DoxyCompactList}\item
28short $\ast$ \mbox{\hyperlink{group__struct__utils__pair__table_gaef0f7e1a6c00c81a349973de53039dda}{vrna\+\_\+pt\+\_\+snoop\+\_\+get}} (const char $\ast$structure)
29\begin{DoxyCompactList}\small\item\em Create a pair table of a secondary structure (snoop version) \end{DoxyCompactList}\item
30short $\ast$ \mbox{\hyperlink{group__struct__utils__pair__table_gae8f31c859b48f97b8af889e914e4d040}{vrna\+\_\+pt\+\_\+pk\+\_\+remove}} (const short $\ast$ptable, unsigned int options)
31\begin{DoxyCompactList}\small\item\em Remove pseudo-\/knots from a pair table. \end{DoxyCompactList}\end{DoxyCompactItemize}
32
33
34\doxysubsection{Function Documentation}
35\mbox{\Hypertarget{group__struct__utils__pair__table_gab124ba58014a97d2fb8c21831e19f107}\label{group__struct__utils__pair__table_gab124ba58014a97d2fb8c21831e19f107}}
36\index{Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}!vrna\_ptable@{vrna\_ptable}}
37\index{vrna\_ptable@{vrna\_ptable}!Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}}
38\doxysubsubsection{\texorpdfstring{vrna\_ptable()}{vrna\_ptable()}}
39{\footnotesize\ttfamily short $\ast$ vrna\+\_\+ptable (\begin{DoxyParamCaption}\item[{const char $\ast$}]{structure }\end{DoxyParamCaption})}
40
41
42
43{\ttfamily \#include $<$\mbox{\hyperlink{utils_2structures_8h}{Vienna\+RNA/utils/structures.\+h}}$>$}
44
45
46
47Create a pair table from a dot-\/bracket notation of a secondary structure.
48
49Returns a newly allocated table, such that table\mbox{[}i\mbox{]}=j if (i.\+j) pair or 0 if i is unpaired, table\mbox{[}0\mbox{]} contains the length of the structure.
50
51\begin{DoxySeeAlso}{See also}
52\mbox{\hyperlink{group__struct__utils__pair__table_ga2c4f27a8e277f21f0d2cc10bc9a99420}{vrna\+\_\+ptable\+\_\+from\+\_\+string()}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_gaf9ecd0d7877fecdbb0292e24f40283d5}{vrna\+\_\+db\+\_\+from\+\_\+ptable()}}
53\end{DoxySeeAlso}
54
55\begin{DoxyParams}{Parameters}
56{\em structure} & The secondary structure in dot-\/bracket notation \\
57\hline
58\end{DoxyParams}
59\begin{DoxyReturn}{Returns}
60A pointer to the created pair\+\_\+table
61\end{DoxyReturn}
62\begin{DoxyRefDesc}{SWIG Wrapper Notes}
63\item[\mbox{\hyperlink{wrappers__wrappers000136}{SWIG Wrapper Notes}}]This functions is wrapped as overloaded function {\ttfamily ptable()} that takes an optional argument {\ttfamily options} to specify which type of matching brackets should be considered during conversion. The default set is round brackets, i.\+e. \mbox{\hyperlink{group__struct__utils__dot__bracket_gac92d5fa7c6625bce2670ece510a24fbd}{VRNA\+\_\+\+BRACKETS\+\_\+\+RND}}. \end{DoxyRefDesc}
64\mbox{\Hypertarget{group__struct__utils__pair__table_ga2c4f27a8e277f21f0d2cc10bc9a99420}\label{group__struct__utils__pair__table_ga2c4f27a8e277f21f0d2cc10bc9a99420}}
65\index{Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}!vrna\_ptable\_from\_string@{vrna\_ptable\_from\_string}}
66\index{vrna\_ptable\_from\_string@{vrna\_ptable\_from\_string}!Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}}
67\doxysubsubsection{\texorpdfstring{vrna\_ptable\_from\_string()}{vrna\_ptable\_from\_string()}}
68{\footnotesize\ttfamily short $\ast$ vrna\+\_\+ptable\+\_\+from\+\_\+string (\begin{DoxyParamCaption}\item[{const char $\ast$}]{structure,  }\item[{unsigned int}]{options }\end{DoxyParamCaption})}
69
70
71
72{\ttfamily \#include $<$\mbox{\hyperlink{utils_2structures_8h}{Vienna\+RNA/utils/structures.\+h}}$>$}
73
74
75
76Create a pair table for a secondary structure string.
77
78This function takes an input string of a secondary structure annotation in \mbox{\hyperlink{rna_structure_notations_dot-bracket-notation}{Dot-\/\+Bracket Notation (a.\+k.\+a. Dot-\/\+Parenthesis Notation)}} or dot-\/bracket-\/ext-\/notation, and converts it into a pair table representation.
79
80\begin{DoxyNote}{Note}
81This function also extracts crossing base pairs, i.\+e. pseudo-\/knots if more than a single matching bracket type is allowed through the bitmask {\ttfamily options}.
82\end{DoxyNote}
83\begin{DoxySeeAlso}{See also}
84\mbox{\hyperlink{group__struct__utils__pair__table_gab124ba58014a97d2fb8c21831e19f107}{vrna\+\_\+ptable()}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_gaf9ecd0d7877fecdbb0292e24f40283d5}{vrna\+\_\+db\+\_\+from\+\_\+ptable()}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_ga690425199c8b71545e7196e3af1436f8}{vrna\+\_\+db\+\_\+flatten\+\_\+to()}}, \mbox{\hyperlink{group__struct__utils__pair__table_gae8f31c859b48f97b8af889e914e4d040}{vrna\+\_\+pt\+\_\+pk\+\_\+remove()}} \mbox{\hyperlink{group__struct__utils__dot__bracket_gac92d5fa7c6625bce2670ece510a24fbd}{VRNA\+\_\+\+BRACKETS\+\_\+\+RND}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_ga863e03f7f73f10fc9bbcbefbdda4bec8}{VRNA\+\_\+\+BRACKETS\+\_\+\+ANG}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_gaf41be40e79cb756c4e0bb8edb4d803d2}{VRNA\+\_\+\+BRACKETS\+\_\+\+CLY}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_ga60525d61d7496eeea490a37f3d6bf757}{VRNA\+\_\+\+BRACKETS\+\_\+\+SQR}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_ga7e3f630af8d69bb0e917145aacf2f96d}{VRNA\+\_\+\+BRACKETS\+\_\+\+ALPHA}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_ga559ebf76b1b289f85309f4206e99aa1a}{VRNA\+\_\+\+BRACKETS\+\_\+\+DEFAULT}}, \mbox{\hyperlink{group__struct__utils__dot__bracket_ga013a9da903462d2f2b037f0c6ffb46e4}{VRNA\+\_\+\+BRACKETS\+\_\+\+ANY}}
85\end{DoxySeeAlso}
86
87\begin{DoxyParams}{Parameters}
88{\em string} & Secondary structure in dot-\/bracket-\/ext-\/notation \\
89\hline
90{\em options} & A bitmask to specify which brackets are recognized during conversion to pair table \\
91\hline
92\end{DoxyParams}
93\begin{DoxyReturn}{Returns}
94A pointer to a new pair table of the provided secondary structure
95\end{DoxyReturn}
96\begin{DoxyRefDesc}{SWIG Wrapper Notes}
97\item[\mbox{\hyperlink{wrappers__wrappers000137}{SWIG Wrapper Notes}}]This functions is wrapped as overloaded function {\ttfamily ptable()} that takes an optional argument {\ttfamily options} to specify which type of matching brackets should be considered during conversion. The default set is round brackets, i.\+e. \mbox{\hyperlink{group__struct__utils__dot__bracket_gac92d5fa7c6625bce2670ece510a24fbd}{VRNA\+\_\+\+BRACKETS\+\_\+\+RND}}. \end{DoxyRefDesc}
98\mbox{\Hypertarget{group__struct__utils__pair__table_gacca520048b24ec5a8978f4dafb4e4bf8}\label{group__struct__utils__pair__table_gacca520048b24ec5a8978f4dafb4e4bf8}}
99\index{Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}!vrna\_pt\_pk\_get@{vrna\_pt\_pk\_get}}
100\index{vrna\_pt\_pk\_get@{vrna\_pt\_pk\_get}!Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}}
101\doxysubsubsection{\texorpdfstring{vrna\_pt\_pk\_get()}{vrna\_pt\_pk\_get()}}
102{\footnotesize\ttfamily short$\ast$ vrna\+\_\+pt\+\_\+pk\+\_\+get (\begin{DoxyParamCaption}\item[{const char $\ast$}]{structure }\end{DoxyParamCaption})}
103
104
105
106{\ttfamily \#include $<$\mbox{\hyperlink{utils_2structures_8h}{Vienna\+RNA/utils/structures.\+h}}$>$}
107
108
109
110Create a pair table of a secondary structure (pseudo-\/knot version)
111
112Returns a newly allocated table, such that table\mbox{[}i\mbox{]}=j if (i.\+j) pair or 0 if i is unpaired, table\mbox{[}0\mbox{]} contains the length of the structure.
113
114In contrast to \mbox{\hyperlink{group__struct__utils__pair__table_gab124ba58014a97d2fb8c21831e19f107}{vrna\+\_\+ptable()}} this function also recognizes the base pairs denoted by \textquotesingle{}\mbox{[}\textquotesingle{} and \textquotesingle{}\mbox{]}\textquotesingle{} brackets. Thus, this function behaves like
115\begin{DoxyCode}{0}
116\DoxyCodeLine{\mbox{\hyperlink{group__struct__utils__pair__table_ga2c4f27a8e277f21f0d2cc10bc9a99420}{vrna\_ptable\_from\_string}}(structure, \#\mbox{\hyperlink{group__struct__utils__dot__bracket_gac92d5fa7c6625bce2670ece510a24fbd}{VRNA\_BRACKETS\_RND}} | \mbox{\hyperlink{group__struct__utils__dot__bracket_ga60525d61d7496eeea490a37f3d6bf757}{VRNA\_BRACKETS\_SQR}})}
117
118\end{DoxyCode}
119
120
121\begin{DoxySeeAlso}{See also}
122\mbox{\hyperlink{group__struct__utils__pair__table_ga2c4f27a8e277f21f0d2cc10bc9a99420}{vrna\+\_\+ptable\+\_\+from\+\_\+string()}}
123\end{DoxySeeAlso}
124
125\begin{DoxyParams}{Parameters}
126{\em structure} & The secondary structure in (extended) dot-\/bracket notation \\
127\hline
128\end{DoxyParams}
129\begin{DoxyReturn}{Returns}
130A pointer to the created pair\+\_\+table
131\end{DoxyReturn}
132\mbox{\Hypertarget{group__struct__utils__pair__table_ga2daefbbd6d9f8803731651882f54332d}\label{group__struct__utils__pair__table_ga2daefbbd6d9f8803731651882f54332d}}
133\index{Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}!vrna\_ptable\_copy@{vrna\_ptable\_copy}}
134\index{vrna\_ptable\_copy@{vrna\_ptable\_copy}!Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}}
135\doxysubsubsection{\texorpdfstring{vrna\_ptable\_copy()}{vrna\_ptable\_copy()}}
136{\footnotesize\ttfamily short$\ast$ vrna\+\_\+ptable\+\_\+copy (\begin{DoxyParamCaption}\item[{const short $\ast$}]{pt }\end{DoxyParamCaption})}
137
138
139
140{\ttfamily \#include $<$\mbox{\hyperlink{utils_2structures_8h}{Vienna\+RNA/utils/structures.\+h}}$>$}
141
142
143
144Get an exact copy of a pair table.
145
146
147\begin{DoxyParams}{Parameters}
148{\em pt} & The pair table to be copied \\
149\hline
150\end{DoxyParams}
151\begin{DoxyReturn}{Returns}
152A pointer to the copy of \textquotesingle{}pt\textquotesingle{}
153\end{DoxyReturn}
154\mbox{\Hypertarget{group__struct__utils__pair__table_gaef0f7e1a6c00c81a349973de53039dda}\label{group__struct__utils__pair__table_gaef0f7e1a6c00c81a349973de53039dda}}
155\index{Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}!vrna\_pt\_snoop\_get@{vrna\_pt\_snoop\_get}}
156\index{vrna\_pt\_snoop\_get@{vrna\_pt\_snoop\_get}!Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}}
157\doxysubsubsection{\texorpdfstring{vrna\_pt\_snoop\_get()}{vrna\_pt\_snoop\_get()}}
158{\footnotesize\ttfamily short$\ast$ vrna\+\_\+pt\+\_\+snoop\+\_\+get (\begin{DoxyParamCaption}\item[{const char $\ast$}]{structure }\end{DoxyParamCaption})}
159
160
161
162{\ttfamily \#include $<$\mbox{\hyperlink{utils_2structures_8h}{Vienna\+RNA/utils/structures.\+h}}$>$}
163
164
165
166Create a pair table of a secondary structure (snoop version)
167
168returns a newly allocated table, such that\+: table\mbox{[}i\mbox{]}=j if (i.\+j) pair or 0 if i is unpaired, table\mbox{[}0\mbox{]} contains the length of the structure. The special pseudoknotted H/\+ACA-\/m\+RNA structure is taken into account. \mbox{\Hypertarget{group__struct__utils__pair__table_gae8f31c859b48f97b8af889e914e4d040}\label{group__struct__utils__pair__table_gae8f31c859b48f97b8af889e914e4d040}}
169\index{Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}!vrna\_pt\_pk\_remove@{vrna\_pt\_pk\_remove}}
170\index{vrna\_pt\_pk\_remove@{vrna\_pt\_pk\_remove}!Pair Table Representation of Secondary Structures@{Pair Table Representation of Secondary Structures}}
171\doxysubsubsection{\texorpdfstring{vrna\_pt\_pk\_remove()}{vrna\_pt\_pk\_remove()}}
172{\footnotesize\ttfamily short$\ast$ vrna\+\_\+pt\+\_\+pk\+\_\+remove (\begin{DoxyParamCaption}\item[{const short $\ast$}]{ptable,  }\item[{unsigned int}]{options }\end{DoxyParamCaption})}
173
174
175
176{\ttfamily \#include $<$\mbox{\hyperlink{utils_2structures_8h}{Vienna\+RNA/utils/structures.\+h}}$>$}
177
178
179
180Remove pseudo-\/knots from a pair table.
181
182This function removes pseudo-\/knots from an input structure by determining the minimum number of base pairs that need to be removed to make the structure pseudo-\/knot free.
183
184To accomplish that, we use a dynamic programming algorithm similar to the Nussinov maxmimum matching approach.
185
186\begin{DoxySeeAlso}{See also}
187\mbox{\hyperlink{group__struct__utils__dot__bracket_ga97dbebaa3fc49524cf5afa338a6c52ee}{vrna\+\_\+db\+\_\+pk\+\_\+remove()}}
188\end{DoxySeeAlso}
189
190\begin{DoxyParams}{Parameters}
191{\em ptable} & Input structure that may include pseudo-\/knots \\
192\hline
193{\em options} & \\
194\hline
195\end{DoxyParams}
196\begin{DoxyReturn}{Returns}
197The input structure devoid of pseudo-\/knots
198\end{DoxyReturn}
199