Add missing doc files
[jabaws.git] / binaries / src / ViennaRNA / doc / latex / mainpage_8h_source.tex
diff --git a/binaries/src/ViennaRNA/doc/latex/mainpage_8h_source.tex b/binaries/src/ViennaRNA/doc/latex/mainpage_8h_source.tex
new file mode 100644 (file)
index 0000000..2fda35f
--- /dev/null
@@ -0,0 +1,539 @@
+\hypertarget{mainpage_8h_source}{\section{mainpage.\-h}
+}
+
+\begin{DoxyCode}
+00001 \textcolor{comment}{/*}
+00002 \textcolor{comment}{#############################################################}
+00003 \textcolor{comment}{# The next comment is used to order the modules correctly   #}
+00004 \textcolor{comment}{#############################################################}
+00005 \textcolor{comment}{*/}
+00006 
+00108 \textcolor{comment}{/*}
+00109 \textcolor{comment}{#############################################################}
+00110 \textcolor{comment}{# Now the mainpage text is following                        #}
+00111 \textcolor{comment}{#############################################################}
+00112 \textcolor{comment}{*/}
+00113 
+00327    \{   0,   2,   2,   2,   2,   1,   1\},   \textcolor{comment}{/* Null replaced */}
+00328    \{   2,   0,   2,   2,   2, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* H    replaced */}
+00329    \{   2,   2,   0,   1,   2, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* B    replaced */}
+00330    \{   2,   2,   1,   0,   2, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* I    replaced */}
+00331    \{   2,   2,   2,   2,   0, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* M    replaced */}
+00332    \{   1, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF},   0, INF\},   \textcolor{comment}{/* S    replaced */}
+00333    \{   1, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF},   0\},   \textcolor{comment}{/* E    replaced */}
+00334 
+00335 
+00336 \textcolor{comment}{/* Null,   H,   B,   I,   M,   S,   E   */}
+00337    \{   0, 100,   5,   5,  75,   5,   5\},   \textcolor{comment}{/* Null replaced */}
+00338    \{ 100,   0,   8,   8,   8, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* H    replaced */}
+00339    \{   5,   8,   0,   3,   8, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* B    replaced */}
+00340    \{   5,   8,   3,   0,   8, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* I    replaced */}
+00341    \{  75,   8,   8,   8,   0, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}\},   \textcolor{comment}{/* M    replaced */}
+00342    \{   5, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF},   0, INF\},   \textcolor{comment}{/* S    replaced */}
+00343    \{   5, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF}, \hyperlink{energy__const_8h_a12c2040f25d8e3a7b9e1c2024c618cb6}{INF},   0\},   \textcolor{comment}{/* E    replaced */}
+00344 \(\backslash\)endverbatim
+00345 
+00346 The lower matrix uses the costs given in \(\backslash\)cite shapiro:1990.
+00347 All distance functions use the following global variables:
+00348 
+00349 \(\backslash\)verbatim
+00350 \textcolor{keywordtype}{int}  \hyperlink{dist__vars_8h_ab65d8ff14c6937612212526a60f59b3c}{cost\_matrix};
+00351 \(\backslash\)endverbatim
+00352 \(\backslash\)copybrief cost\_matrix
+00353 
+00354 \(\backslash\)verbatim
+00355 \textcolor{keywordtype}{int}   \hyperlink{dist__vars_8h_aa03194c513af6b860e7b33e370b82bdb}{edit\_backtrack};
+00356 \(\backslash\)endverbatim
+00357 \(\backslash\)copybrief edit\_backtrack
+00358 
+00359 \(\backslash\)verbatim
+00360 \textcolor{keywordtype}{char} *\hyperlink{dist__vars_8h_ac1605fe3448ad0a0b809c4fb8f6a854a}{aligned\_line}[4];
+00361 \(\backslash\)endverbatim
+00362 \(\backslash\)copybrief aligned\_line
+00363 
+00364 \(\backslash\)see utils.h, dist\_vars.h and stringdist.h \textcolor{keywordflow}{for} more details
+00365 
+00366 <h3>Functions \textcolor{keywordflow}{for} \hyperlink{structTree}{Tree} Edit Distances</h3>
+00367 
+00368 \(\backslash\)verbatim
+00369 \hyperlink{structTree}{Tree}   *\hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make\_tree} (\textcolor{keywordtype}{char} *struc)
+00370 \(\backslash\)endverbatim
+00371 \(\backslash\)copybrief \hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make\_tree}()
+00372 
+00373 \(\backslash\)verbatim
+00374 \textcolor{keywordtype}{float}   \hyperlink{treedist_8h_a3b21f1925f7071f46d93431a835217bb}{tree\_edit\_distance} (\hyperlink{structTree}{Tree} *T1,
+00375                             \hyperlink{structTree}{Tree} *T2) 
+00376 \(\backslash\)endverbatim
+00377 \(\backslash\)copybrief \hyperlink{treedist_8h_a3b21f1925f7071f46d93431a835217bb}{tree\_edit\_distance}()
+00378 
+00379 \(\backslash\)verbatim
+00380 \textcolor{keywordtype}{void}    \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free\_tree}(\hyperlink{structTree}{Tree} *t)
+00381 \(\backslash\)endverbatim
+00382 \(\backslash\)copybrief \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free\_tree}()
+00383 
+00384 \(\backslash\)see dist\_vars.h and treedist.h \textcolor{keywordflow}{for} prototypes and more detailed descriptions
+00385 
+00386 <h3>Functions \textcolor{keywordflow}{for} String Alignment</h3>
+00387 
+00388 \(\backslash\)verbatim
+00389 \hyperlink{structswString}{swString} *\hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make\_swString} (\textcolor{keywordtype}{char} *\textcolor{keywordtype}{string})
+00390 \(\backslash\)endverbatim
+00391 \(\backslash\)copybrief \hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make\_swString}()
+00392 
+00393 \(\backslash\)verbatim
+00394 \textcolor{keywordtype}{float}     \hyperlink{stringdist_8h_a89e3c335ef17780576d7c0e713830db9}{string\_edit\_distance} (\hyperlink{structswString}{swString} *T1,
+00395                                 \hyperlink{structswString}{swString} *T2)
+00396 \(\backslash\)endverbatim
+00397 \(\backslash\)copybrief \hyperlink{stringdist_8h_a89e3c335ef17780576d7c0e713830db9}{string\_edit\_distance}()
+00398 
+00399 \(\backslash\)see dist\_vars.h and stringdist.h \textcolor{keywordflow}{for} prototypes and more detailed descriptions
+00400 
+00401 <h3>Functions \textcolor{keywordflow}{for} Comparison of Base Pair Probabilities</h3>
+00402 
+00403 For comparison of base pair probability matrices, the matrices are first
+00404 condensed into probability profiles which are the compared by alignment.
+00405 
+00406 \(\backslash\)verbatim
+00407 \textcolor{keywordtype}{float} *\hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make\_bp\_profile\_bppm} ( \textcolor{keywordtype}{double} *bppm,
+00408                               \textcolor{keywordtype}{int} length)
+00409 \(\backslash\)endverbatim
+00410 \(\backslash\)copybrief \hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make\_bp\_profile\_bppm}()
+00411 
+00412 \(\backslash\)verbatim
+00413 \textcolor{keywordtype}{float} \hyperlink{profiledist_8h_abe75e90e00a1e5dd8862944ed53dad5d}{profile\_edit\_distance} ( \textcolor{keyword}{const} \textcolor{keywordtype}{float} *T1,
+00414                               \textcolor{keyword}{const} \textcolor{keywordtype}{float} *T2)
+00415 \(\backslash\)endverbatim
+00416 \(\backslash\)copybrief \hyperlink{profiledist_8h_abe75e90e00a1e5dd8862944ed53dad5d}{profile\_edit\_distance}()
+00417 
+00418 \(\backslash\)see ProfileDist.h \textcolor{keywordflow}{for} prototypes and more details of the above functions
+00419 
+00420 \(\backslash\)ref mp\_utils \textcolor{stringliteral}{"Next Page: Utilities"}
+00421 
+00422 \(\backslash\)page  mp\_utils     Utilities - Odds and Ends
+00423 
+00424 \(\backslash\)anchor toc
+00425 
+00426 <h3>Table of Contents</h3>
+00427 <hr>
+00428 
+00429 \(\backslash\)li \(\backslash\)ref  utils\_ss
+00430 \(\backslash\)li \(\backslash\)ref  utils\_dot
+00431 \(\backslash\)li \(\backslash\)ref  utils\_aln
+00432 \(\backslash\)li \(\backslash\)ref  utils\_seq
+00433 \(\backslash\)li \(\backslash\)ref  utils\_struc
+00434 \(\backslash\)li \(\backslash\)ref  utils\_misc
+00435 
+00436 <hr>
+00437 
+00438 \(\backslash\)section utils\_ss Producing secondary structure graphs
+00439 
+00440 \(\backslash\)verbatim
+00441 \textcolor{keywordtype}{int} \hyperlink{PS__dot_8h_a0873c7cc4cd7a11c9a2cea19dde7e9c9}{PS\_rna\_plot} ( \textcolor{keywordtype}{char} *\textcolor{keywordtype}{string},
+00442                   \textcolor{keywordtype}{char} *structure,
+00443                   \textcolor{keywordtype}{char} *file)
+00444 \(\backslash\)endverbatim
+00445 \(\backslash\)copybrief \hyperlink{PS__dot_8h_a0873c7cc4cd7a11c9a2cea19dde7e9c9}{PS\_rna\_plot}()
+00446 
+00447 \(\backslash\)verbatim
+00448 \textcolor{keywordtype}{int} \hyperlink{PS__dot_8h_a47856b2504b566588785597b6ebb8271}{PS\_rna\_plot\_a} (
+00449             \textcolor{keywordtype}{char} *\textcolor{keywordtype}{string},
+00450             \textcolor{keywordtype}{char} *structure,
+00451             \textcolor{keywordtype}{char} *file,
+00452             \textcolor{keywordtype}{char} *pre,
+00453             \textcolor{keywordtype}{char} *post)
+00454 \(\backslash\)endverbatim
+00455 \(\backslash\)copybrief \hyperlink{PS__dot_8h_a47856b2504b566588785597b6ebb8271}{PS\_rna\_plot\_a}()
+00456 
+00457 \(\backslash\)verbatim
+00458 \textcolor{keywordtype}{int} \hyperlink{PS__dot_8h_a70834bc8c0aad4fe6824ff76ccb8f329}{gmlRNA} (\textcolor{keywordtype}{char} *\textcolor{keywordtype}{string},
+00459             \textcolor{keywordtype}{char} *structure,
+00460             \textcolor{keywordtype}{char} *ssfile,
+00461             \textcolor{keywordtype}{char} option)
+00462 \(\backslash\)endverbatim
+00463 \(\backslash\)copybrief \hyperlink{PS__dot_8h_a70834bc8c0aad4fe6824ff76ccb8f329}{gmlRNA}()
+00464 
+00465 \(\backslash\)verbatim
+00466 \textcolor{keywordtype}{int} \hyperlink{PS__dot_8h_add368528755f9a830727b680243541df}{ssv\_rna\_plot} (\textcolor{keywordtype}{char} *\textcolor{keywordtype}{string},
+00467                   \textcolor{keywordtype}{char} *structure,
+00468                   \textcolor{keywordtype}{char} *ssfile)
+00469 \(\backslash\)endverbatim
+00470 \(\backslash\)copybrief \hyperlink{PS__dot_8h_add368528755f9a830727b680243541df}{ssv\_rna\_plot}()
+00471 
+00472 \(\backslash\)verbatim
+00473 \textcolor{keywordtype}{int} \hyperlink{PS__dot_8h_ae7853539b5df98f294b4af434e979304}{svg\_rna\_plot} (\textcolor{keywordtype}{char} *\textcolor{keywordtype}{string},
+00474                   \textcolor{keywordtype}{char} *structure,
+00475                   \textcolor{keywordtype}{char} *ssfile)
+00476 \(\backslash\)endverbatim
+00477 \(\backslash\)copybrief \hyperlink{PS__dot_8h_ae7853539b5df98f294b4af434e979304}{svg\_rna\_plot}()
+00478 
+00479 \(\backslash\)verbatim
+00480 \textcolor{keywordtype}{int} \hyperlink{PS__dot_8h_a2f6d5953e6a323df898896b8d6614483}{xrna\_plot} ( \textcolor{keywordtype}{char} *\textcolor{keywordtype}{string},
+00481                 \textcolor{keywordtype}{char} *structure,
+00482                 \textcolor{keywordtype}{char} *ssfile)
+00483 \(\backslash\)endverbatim
+00484 \(\backslash\)copybrief \hyperlink{PS__dot_8h_a2f6d5953e6a323df898896b8d6614483}{xrna\_plot}()
+00485 
+00486 \(\backslash\)verbatim
+00487 \textcolor{keywordtype}{int} rna\_plot\_type
+00488 \(\backslash\)endverbatim
+00489 \(\backslash\)copybrief \hyperlink{plot__layouts_8h_a5964c4581431b098b80027d6e14dcdd4}{rna\_plot\_type}
+00490 
+00491 Two low-level functions provide direct access to the graph lauyouting
+00492 algorithms:
+00493 
+00494 \(\backslash\)verbatim
+00495 \textcolor{keywordtype}{int} \hyperlink{plot__layouts_8h_af4b9173e7d3fd361c3c85e6def194123}{simple\_xy\_coordinates} ( \textcolor{keywordtype}{short} *pair\_table,
+00496                             \textcolor{keywordtype}{float} *X,
+00497                             \textcolor{keywordtype}{float} *Y)
+00498 \(\backslash\)endverbatim
+00499 \(\backslash\)copybrief \hyperlink{plot__layouts_8h_af4b9173e7d3fd361c3c85e6def194123}{simple\_xy\_coordinates}()
+00500 
+00501 \(\backslash\)verbatim
+00502 \textcolor{keywordtype}{int} naview\_xy\_coordinates ( \textcolor{keywordtype}{short} *pair\_table,
+00503                             \textcolor{keywordtype}{float} *X,
+00504                             \textcolor{keywordtype}{float} *Y)
+00505 \(\backslash\)endverbatim
+00506 \(\backslash\)copybrief naview\_xy\_coordinates()
+00507 
+00508 \(\backslash\)see PS\_dot.h and naview.h \textcolor{keywordflow}{for} more detailed descriptions.
+00509 
+00510 \(\backslash\)htmlonly
+00511 <hr>
+00512 <a href=\textcolor{stringliteral}{"#toc"}>Table of Contents</a>
+00513 <hr>
+00514 \(\backslash\)endhtmlonly
+00515 
+00516 \(\backslash\)section utils\_dot Producing (colored) dot plots for base pair probabilities
+00517 
+00518 \(\backslash\)verbatim
+00519 \textcolor{keywordtype}{int} PS\_color\_dot\_plot ( \textcolor{keywordtype}{char} *\textcolor{keywordtype}{string},
+00520                         \hyperlink{structcpair}{cpair} *pi,
+00521                         \textcolor{keywordtype}{char} *filename)
+00522 \(\backslash\)endverbatim
+00523 \(\backslash\)copybrief PS\_color\_dot\_plot()
+00524 
+00525 \(\backslash\)verbatim
+00526 \textcolor{keywordtype}{int} PS\_color\_dot\_plot\_turn (\textcolor{keywordtype}{char} *seq,
+00527                             \hyperlink{structcpair}{cpair} *pi,
+00528                             \textcolor{keywordtype}{char} *filename,
+00529                             \textcolor{keywordtype}{int} winSize)
+00530 \(\backslash\)endverbatim
+00531 \(\backslash\)copybrief PS\_color\_dot\_plot\_turn()
+00532 
+00533 \(\backslash\)verbatim
+00534 \textcolor{keywordtype}{int} \hyperlink{PS__dot_8h_a00ea223b5cf02eb2faae5ff29f0d5e12}{PS\_dot\_plot\_list} (\textcolor{keywordtype}{char} *seq,
+00535                       \textcolor{keywordtype}{char} *filename,
+00536                       \hyperlink{structplist}{plist} *pl,
+00537                       \hyperlink{structplist}{plist} *mf,
+00538                       \textcolor{keywordtype}{char} *comment)
+00539 \(\backslash\)endverbatim
+00540 \(\backslash\)copybrief \hyperlink{PS__dot_8h_a00ea223b5cf02eb2faae5ff29f0d5e12}{PS\_dot\_plot\_list}()
+00541 
+00542 \(\backslash\)verbatim
+00543 \textcolor{keywordtype}{int} PS\_dot\_plot\_turn (\textcolor{keywordtype}{char} *seq,
+00544                       struct \hyperlink{structplist}{plist} *pl,
+00545                       \textcolor{keywordtype}{char} *filename,
+00546                       \textcolor{keywordtype}{int} winSize)
+00547 \(\backslash\)endverbatim
+00548 \(\backslash\)copybrief PS\_dot\_plot\_turn()
+00549 
+00550 \(\backslash\)see PS\_dot.h for more detailed descriptions.
+00551 
+00552 \(\backslash\)section utils\_aln Producing (colored) alignments
+00553 
+00554 \(\backslash\)verbatim
+00555 \textcolor{keywordtype}{int} PS\_color\_aln (
+00556             const \textcolor{keywordtype}{char} *structure,
+00557             const \textcolor{keywordtype}{char} *filename,
+00558             const \textcolor{keywordtype}{char} *seqs[],
+00559             const \textcolor{keywordtype}{char} *names[])
+00560 \(\backslash\)endverbatim
+00561 \(\backslash\)copybrief PS\_color\_aln()
+00562 
+00563 \(\backslash\)htmlonly
+00564 <hr>
+00565 <a href="\textcolor{preprocessor}{#toc">Table of Contents</a>}
+00566 \textcolor{preprocessor}{}<hr>
+00567 \(\backslash\)endhtmlonly
+00568 
+00569 \(\backslash\)section  utils\_seq   RNA sequence related utilities
+00570 
+00571 Several functions provide useful applications to RNA sequences
+00572 
+00573 \(\backslash\)verbatim
+00574 \textcolor{keywordtype}{char}  *\hyperlink{utils_8h_a1b95eac365a021572e1c37e5993a89be}{random\_string} (\textcolor{keywordtype}{int} l,
+00575                       \textcolor{keyword}{const} \textcolor{keywordtype}{char} symbols[])
+00576 \(\backslash\)endverbatim
+00577 \(\backslash\)copybrief \hyperlink{utils_8h_a1b95eac365a021572e1c37e5993a89be}{random\_string}()
+00578 
+00579 \(\backslash\)verbatim
+00580 \textcolor{keywordtype}{int}   \hyperlink{utils_8h_ad9dc7bfc9aa664dc6698f17ce07fc7e7}{hamming} ( \textcolor{keyword}{const} \textcolor{keywordtype}{char} *s1,
+00581                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *s2)
+00582 \(\backslash\)endverbatim
+00583 \(\backslash\)copybrief \hyperlink{utils_8h_ad9dc7bfc9aa664dc6698f17ce07fc7e7}{hamming}()
+00584 
+00585 \(\backslash\)verbatim
+00586 \textcolor{keywordtype}{void} \hyperlink{utils_8h_ad3f18dd83f958f18b2f26ecb99305208}{str\_DNA2RNA}(\textcolor{keywordtype}{char} *sequence);
+00587 \(\backslash\)endverbatim
+00588 \(\backslash\)copybrief \hyperlink{utils_8h_ad3f18dd83f958f18b2f26ecb99305208}{str\_DNA2RNA}()
+00589 
+00590 \(\backslash\)verbatim
+00591 \textcolor{keywordtype}{void} \hyperlink{utils_8h_a17b796b806f96b70382077fb5bc519bb}{str\_uppercase}(\textcolor{keywordtype}{char} *sequence);
+00592 \(\backslash\)endverbatim
+00593 \(\backslash\)copybrief \hyperlink{utils_8h_a17b796b806f96b70382077fb5bc519bb}{str\_uppercase}()
+00594 
+00595 \(\backslash\)htmlonly
+00596 <hr>
+00597 <a href=\textcolor{stringliteral}{"#toc"}>Table of Contents</a>
+00598 <hr>
+00599 \(\backslash\)endhtmlonly
+00600 
+00601 \(\backslash\)section utils\_struc  RNA secondary structure related utilities
+00602 
+00603 \(\backslash\)verbatim
+00604 \textcolor{keywordtype}{char} *\hyperlink{utils_8h_ac6dfa5e22928c087c6e09ff0054a7ced}{pack\_structure} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *struc)
+00605 \(\backslash\)endverbatim
+00606 \(\backslash\)copybrief \hyperlink{utils_8h_ac6dfa5e22928c087c6e09ff0054a7ced}{pack\_structure}()
+00607 
+00608 \(\backslash\)verbatim
+00609 \textcolor{keywordtype}{char} *\hyperlink{utils_8h_a071c6921efe1eb974f115ee6fefa3c39}{unpack\_structure} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *packed)
+00610 \(\backslash\)endverbatim
+00611 \(\backslash\)copybrief \hyperlink{utils_8h_a071c6921efe1eb974f115ee6fefa3c39}{unpack\_structure}()
+00612 
+00613 \(\backslash\)verbatim
+00614 \textcolor{keywordtype}{short} *\hyperlink{utils_8h_a89c32307ee50a0026f4a3131fac0845a}{make\_pair\_table} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} *structure)
+00615 \(\backslash\)endverbatim
+00616 \(\backslash\)copybrief \hyperlink{utils_8h_a89c32307ee50a0026f4a3131fac0845a}{make\_pair\_table}()
+00617 
+00618 \(\backslash\)verbatim
+00619 \textcolor{keywordtype}{short} *\hyperlink{utils_8h_afeaa6d68eef3a99d0a7aa08aa91c6601}{copy\_pair\_table} (\textcolor{keyword}{const} \textcolor{keywordtype}{short} *pt)
+00620 \(\backslash\)endverbatim
+00621 \(\backslash\)copybrief \hyperlink{utils_8h_afeaa6d68eef3a99d0a7aa08aa91c6601}{copy\_pair\_table}()
+00622 
+00623 \(\backslash\)htmlonly
+00624 <hr>
+00625 <a href=\textcolor{stringliteral}{"#toc"}>Table of Contents</a>
+00626 <hr>
+00627 \(\backslash\)endhtmlonly
+00628 
+00629 \(\backslash\)section  utils\_misc  Miscellaneous Utilities
+00630 
+00631 \(\backslash\)verbatim
+00632 \textcolor{keywordtype}{void} \hyperlink{utils_8h_a6bf778117d31b7fd90db435323f4ef74}{print\_tty\_input\_seq} (\textcolor{keywordtype}{void})
+00633 \(\backslash\)endverbatim
+00634 \(\backslash\)copybrief \hyperlink{utils_8h_a6bf778117d31b7fd90db435323f4ef74}{print\_tty\_input\_seq}()
+00635 
+00636 \(\backslash\)verbatim
+00637 \textcolor{keywordtype}{void} \hyperlink{utils_8h_ae8ae8a34962b9959be3f6c40f0a80ac1}{print\_tty\_constraint\_full} (\textcolor{keywordtype}{void})
+00638 \(\backslash\)endverbatim
+00639 \(\backslash\)copybrief \hyperlink{utils_8h_ae8ae8a34962b9959be3f6c40f0a80ac1}{print\_tty\_constraint\_full}()
+00640 
+00641 \(\backslash\)verbatim
+00642 \textcolor{keywordtype}{void} \hyperlink{utils_8h_a4d167deb70bb51723e44374dc981deb2}{print\_tty\_constraint} (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} option)
+00643 \(\backslash\)endverbatim
+00644 \(\backslash\)copybrief \hyperlink{utils_8h_a4d167deb70bb51723e44374dc981deb2}{print\_tty\_constraint}()
+00645 
+00646 \(\backslash\)verbatim
+00647 \textcolor{keywordtype}{int}   *\hyperlink{utils_8h_a55c0f6b3b07b6adf2ee235ba901fe397}{get\_iindx} (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} length)
+00648 \(\backslash\)endverbatim
+00649 \(\backslash\)copybrief \hyperlink{utils_8h_a55c0f6b3b07b6adf2ee235ba901fe397}{get\_iindx}()
+00650 
+00651 \(\backslash\)verbatim
+00652 \textcolor{keywordtype}{int}   *\hyperlink{utils_8h_a4d9ee1572c1bfcd02d3d3f2db8a6530f}{get\_indx} (\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} length)
+00653 \(\backslash\)endverbatim
+00654 \(\backslash\)copybrief \hyperlink{utils_8h_a4d9ee1572c1bfcd02d3d3f2db8a6530f}{get\_indx}()
+00655 
+00656 \(\backslash\)verbatim
+00657 \textcolor{keywordtype}{void} \hyperlink{utils_8h_a36c3a6c3218b041f992052767bc74549}{constrain\_ptypes} (
+00658                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *constraint,
+00659                 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} length,
+00660                 \textcolor{keywordtype}{char} *ptype,
+00661                 \textcolor{keywordtype}{int} *BP,
+00662                 \textcolor{keywordtype}{int} min\_loop\_size,
+00663                 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} idx\_type)
+00664 \(\backslash\)endverbatim
+00665 \(\backslash\)copybrief \hyperlink{utils_8h_a36c3a6c3218b041f992052767bc74549}{constrain\_ptypes}()
+00666 
+00667 \(\backslash\)verbatim
+00668 \textcolor{keywordtype}{char}  *\hyperlink{utils_8h_abe51806d14cff0789a8c1df7dbc45b71}{get\_line}(FILE *fp);
+00669 \(\backslash\)endverbatim
+00670 \(\backslash\)copybrief \hyperlink{utils_8h_abe51806d14cff0789a8c1df7dbc45b71}{get\_line}()
+00671 
+00672 \(\backslash\)verbatim
+00673 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} \hyperlink{utils_8h_afd194a69af9d92b5b0412a7627ac1595}{read\_record}(
+00674                 \textcolor{keywordtype}{char} **header,
+00675                 \textcolor{keywordtype}{char} **sequence,
+00676                 \textcolor{keywordtype}{char} ***rest,
+00677                 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} options);
+00678 \(\backslash\)endverbatim
+00679 \(\backslash\)copybrief \hyperlink{utils_8h_afd194a69af9d92b5b0412a7627ac1595}{read\_record}()
+00680 
+00681 \(\backslash\)verbatim
+00682 \textcolor{keywordtype}{char}  *\hyperlink{utils_8h_a7afeb906cb36e9d77379eabc6907ac46}{time\_stamp} (\textcolor{keywordtype}{void})
+00683 \(\backslash\)endverbatim
+00684 \(\backslash\)copybrief \hyperlink{utils_8h_a7afeb906cb36e9d77379eabc6907ac46}{time\_stamp}()
+00685 
+00686 \(\backslash\)verbatim
+00687 \textcolor{keywordtype}{void} \hyperlink{utils_8h_af2355fa8746f2f30fbe71db65dea3d51}{warn\_user} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} message[])
+00688 \(\backslash\)endverbatim
+00689 \(\backslash\)copybrief \hyperlink{utils_8h_af2355fa8746f2f30fbe71db65dea3d51}{warn\_user}()
+00690 
+00691 \(\backslash\)verbatim
+00692 \textcolor{keywordtype}{void} \hyperlink{utils_8h_a127ce946e56b5a5773781cabe68e38c5}{nrerror} (\textcolor{keyword}{const} \textcolor{keywordtype}{char} message[])
+00693 \(\backslash\)endverbatim
+00694 \(\backslash\)copybrief \hyperlink{utils_8h_a127ce946e56b5a5773781cabe68e38c5}{nrerror}()
+00695 
+00696 \(\backslash\)verbatim
+00697 \textcolor{keywordtype}{void}   \hyperlink{utils_8h_a8aaa6d9be6f803f496d9b97375c371f3}{init\_rand} (\textcolor{keywordtype}{void})
+00698 \(\backslash\)endverbatim
+00699 \(\backslash\)copybrief \hyperlink{utils_8h_a8aaa6d9be6f803f496d9b97375c371f3}{init\_rand}()
+00700 
+00701 \(\backslash\)verbatim
+00702 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{short} \hyperlink{utils_8h_af9a866c8417afda7368bbac939ab3c47}{xsubi}[3];
+00703 \(\backslash\)endverbatim
+00704 \(\backslash\)copybrief xsubi
+00705 
+00706 \(\backslash\)verbatim
+00707 \textcolor{keywordtype}{double} \hyperlink{utils_8h_aaa328491c84996e445d027fde9800f2e}{urn} (\textcolor{keywordtype}{void})
+00708 \(\backslash\)endverbatim
+00709 \(\backslash\)copybrief \hyperlink{utils_8h_aaa328491c84996e445d027fde9800f2e}{urn}()
+00710 
+00711 \(\backslash\)verbatim
+00712 \textcolor{keywordtype}{int}    \hyperlink{utils_8h_a68ff0849d44f62fe491800378a5ffcb4}{int\_urn} (\textcolor{keywordtype}{int} from, \textcolor{keywordtype}{int} to)
+00713 \(\backslash\)endverbatim
+00714 \(\backslash\)copybrief \hyperlink{utils_8h_a68ff0849d44f62fe491800378a5ffcb4}{int\_urn}()
+00715 
+00716 \(\backslash\)verbatim
+00717 \textcolor{keywordtype}{void}  *\hyperlink{utils_8h_ad7e1e137b3bf1f7108933d302a7f0177}{space} (\textcolor{keywordtype}{unsigned} size)
+00718 \(\backslash\)endverbatim
+00719 \(\backslash\)copybrief \hyperlink{utils_8h_ad7e1e137b3bf1f7108933d302a7f0177}{space}()
+00720 
+00721 \(\backslash\)verbatim
+00722 \textcolor{keywordtype}{void}  *\hyperlink{utils_8h_a9037ada838835b1b9db41581a021b0c8}{xrealloc} ( \textcolor{keywordtype}{void} *p,
+00723                   \textcolor{keywordtype}{unsigned} size)
+00724 \(\backslash\)endverbatim
+00725 \(\backslash\)copybrief \hyperlink{utils_8h_a9037ada838835b1b9db41581a021b0c8}{xrealloc}()
+00726 
+00727 \(\backslash\)see  utils.h \textcolor{keywordflow}{for} a complete overview and detailed description of the utility functions
+00728 
+00729 \(\backslash\)htmlonly
+00730 <hr>
+00731 <a href=\textcolor{stringliteral}{"#toc"}>Table of Contents</a>
+00732 <hr>
+00733 \(\backslash\)endhtmlonly
+00734 
+00735 \(\backslash\)ref mp\_example \textcolor{stringliteral}{"Next Page: Examples"}
+00736 
+00737 \(\backslash\)page  mp\_example   Example - A Small Example Program
+00738 
+00739 The following program exercises most commonly used functions of the library.
+00740 The program folds two sequences \textcolor{keyword}{using} both the mfe and partition \textcolor{keyword}{function}
+00741 algorithms and calculates the tree edit and profile distance of the
+00742 resulting structures and base pairing probabilities.
+00743 
+00744 \(\backslash\)code\{.c\}
+00745 \textcolor{preprocessor}{#include  <stdio.h>}
+00746 \textcolor{preprocessor}{#include  <stdlib.h>}
+00747 \textcolor{preprocessor}{#include  <math.h>}
+00748 \textcolor{preprocessor}{#include  <string.h>}
+00749 \textcolor{preprocessor}{#include  "\hyperlink{utils_8h}{utils.h}"}
+00750 \textcolor{preprocessor}{#include  "\hyperlink{fold__vars_8h}{fold\_vars.h}"}
+00751 \textcolor{preprocessor}{#include  "\hyperlink{fold_8h}{fold.h}"}
+00752 \textcolor{preprocessor}{#include  "\hyperlink{part__func_8h}{part\_func.h}"}
+00753 \textcolor{preprocessor}{#include  "\hyperlink{inverse_8h}{inverse.h}"}
+00754 \textcolor{preprocessor}{#include  "\hyperlink{RNAstruct_8h}{RNAstruct.h}"}
+00755 \textcolor{preprocessor}{#include  "\hyperlink{treedist_8h}{treedist.h}"}
+00756 \textcolor{preprocessor}{#include  "\hyperlink{stringdist_8h}{stringdist.h}"}
+00757 \textcolor{preprocessor}{#include  "\hyperlink{profiledist_8h}{profiledist.h}"}
+00758 
+00759 \textcolor{keywordtype}{void} main()
+00760 \{
+00761    \textcolor{keywordtype}{char} *seq1=\textcolor{stringliteral}{"CGCAGGGAUACCCGCG"}, *seq2=\textcolor{stringliteral}{"GCGCCCAUAGGGACGC"},
+00762         *struct1,* struct2,* xstruc;
+00763    \textcolor{keywordtype}{float} e1, e2, tree\_dist, string\_dist, profile\_dist, kT;
+00764    \hyperlink{structTree}{Tree} *T1, *T2;
+00765    \hyperlink{structswString}{swString} *S1, *S2;
+00766    \textcolor{keywordtype}{float} *pf1, *pf2;
+00767    FLT\_OR\_DBL *bppm;
+00768    \textcolor{comment}{/* fold at 30C instead of the default 37C */}
+00769    \hyperlink{fold__vars_8h_ab4b11c8d9c758430960896bc3fe82ead}{temperature} = 30.;      \textcolor{comment}{/* must be set *before* initializing  */}
+00770 
+00771    \textcolor{comment}{/* allocate memory for structure and fold */}
+00772    struct1 = (\textcolor{keywordtype}{char}* ) \hyperlink{utils_8h_ad7e1e137b3bf1f7108933d302a7f0177}{space}(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{char})*(strlen(seq1)+1));
+00773    e1 =  \hyperlink{group__mfe__fold_gaadafcb0f140795ae62e5ca027e335a9b}{fold}(seq1, struct1);
+00774 
+00775    struct2 = (\textcolor{keywordtype}{char}* ) \hyperlink{utils_8h_ad7e1e137b3bf1f7108933d302a7f0177}{space}(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{char})*(strlen(seq2)+1));
+00776    e2 =  \hyperlink{group__mfe__fold_gaadafcb0f140795ae62e5ca027e335a9b}{fold}(seq2, struct2);
+00777 
+00778    \hyperlink{group__mfe__fold_ga107fdfe5fd641868156bfd849f6866c7}{free\_arrays}();     \textcolor{comment}{/* free arrays used in fold() */}
+00779 
+00780    \textcolor{comment}{/* produce tree and string representations for comparison */}
+00781    xstruc = \hyperlink{RNAstruct_8h_a78d73cd54a068ef2812812771cdddc6f}{expand\_Full}(struct1);
+00782    T1 = \hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make\_tree}(xstruc);
+00783    S1 = \hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make\_swString}(xstruc);
+00784    free(xstruc);
+00785 
+00786    xstruc = \hyperlink{RNAstruct_8h_a78d73cd54a068ef2812812771cdddc6f}{expand\_Full}(struct2);
+00787    T2 = \hyperlink{treedist_8h_a08fe4d5afd385dce593b86eaf010c6e3}{make\_tree}(xstruc);
+00788    S2 = \hyperlink{stringdist_8h_a3125991b3a403b3f89230474deb3f22e}{Make\_swString}(xstruc);
+00789    free(xstruc);
+00790 
+00791    \textcolor{comment}{/* calculate tree edit distance and aligned structures with gaps */}
+00792    \hyperlink{dist__vars_8h_aa03194c513af6b860e7b33e370b82bdb}{edit\_backtrack} = 1;
+00793    tree\_dist = \hyperlink{treedist_8h_a3b21f1925f7071f46d93431a835217bb}{tree\_edit\_distance}(T1, T2);
+00794    \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free\_tree}(T1); \hyperlink{treedist_8h_acbc1cb9bce582ea945e4a467c76a57aa}{free\_tree}(T2);
+00795    \hyperlink{RNAstruct_8h_a1054c4477d53b31d79d4cb132100e87a}{unexpand\_aligned\_F}(aligned\_line);
+00796    printf(\textcolor{stringliteral}{"%s\(\backslash\)n%s  %3.2f\(\backslash\)n"}, aligned\_line[0], aligned\_line[1], tree\_dist);
+00797 
+00798    \textcolor{comment}{/* same thing using string edit (alignment) distance */}
+00799    string\_dist = \hyperlink{stringdist_8h_a89e3c335ef17780576d7c0e713830db9}{string\_edit\_distance}(S1, S2);
+00800    free(S1); free(S2);
+00801    printf(\textcolor{stringliteral}{"%s  mfe=%5.2f\(\backslash\)n%s  mfe=%5.2f  dist=%3.2f\(\backslash\)n"},
+00802           aligned\_line[0], e1, aligned\_line[1], e2, string\_dist);
+00803 
+00804    \textcolor{comment}{/* for longer sequences one should also set a scaling factor for}
+00805 \textcolor{comment}{      partition function folding, e.g: */}
+00806    kT = (\hyperlink{fold__vars_8h_ab4b11c8d9c758430960896bc3fe82ead}{temperature}+273.15)*1.98717/1000.;  \textcolor{comment}{/* kT in kcal/mol */}
+00807    \hyperlink{fold__vars_8h_ad3b22044065acc6dee0af68931b52cfd}{pf\_scale} = exp(-e1/kT/strlen(seq1));
+00808 
+00809    \textcolor{comment}{/* calculate partition function and base pair probabilities */}
+00810    e1 = \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf\_fold}(seq1, struct1);
+00811    \textcolor{comment}{/* get the base pair probability matrix for the previous run of pf\_fold() */}
+00812    bppm = \hyperlink{group__pf__fold_ga6d463707d5f64bdc4d21515b7dd9b115}{export\_bppm}();
+00813    pf1 = \hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make\_bp\_profile\_bppm}(bppm, strlen(seq1));
+00814 
+00815    e2 = \hyperlink{group__pf__fold_gadc3db3d98742427e7001a7fd36ef28c2}{pf\_fold}(seq2, struct2);
+00816    \textcolor{comment}{/* get the base pair probability matrix for the previous run of pf\_fold() */}
+00817    bppm = \hyperlink{group__pf__fold_ga6d463707d5f64bdc4d21515b7dd9b115}{export\_bppm}();
+00818    pf2 = \hyperlink{profiledist_8h_a8822fd5268be115c6e6cdc92009436cc}{Make\_bp\_profile\_bppm}(bppm, strlen(seq2));
+00819 
+00820    \hyperlink{group__pf__fold_gae73db3f49a94f0f72e067ecd12681dbd}{free\_pf\_arrays}();  \textcolor{comment}{/* free space allocated for pf\_fold() */}
+00821 
+00822    profile\_dist = \hyperlink{profiledist_8h_abe75e90e00a1e5dd8862944ed53dad5d}{profile\_edit\_distance}(pf1, pf2);
+00823    printf(\textcolor{stringliteral}{"%s  free energy=%5.2f\(\backslash\)n%s  free energy=%5.2f  dist=%3.2f\(\backslash\)n"},
+00824           aligned\_line[0], e1, aligned\_line[1], e2, profile\_dist);
+00825 
+00826    \hyperlink{profiledist_8h_a9b0b84a5a45761bf42d7c835dcdb3b85}{free\_profile}(pf1); \hyperlink{profiledist_8h_a9b0b84a5a45761bf42d7c835dcdb3b85}{free\_profile}(pf2);
+00827 \}
+00828 \(\backslash\)endcode
+00829 
+00830 In a typical Unix environment you would compile \textcolor{keyword}{this} program \textcolor{keyword}{using}:
+00831 \(\backslash\)verbatim
+00832 cc $\{OPENMP\_CFLAGS\} -c example.c -I$\{hpath\}
+00833 \(\backslash\)endverbatim
+00834 and link using
+00835 \(\backslash\)verbatim
+00836 cc $\{OPENMP\_CFLAGS\} -o example -L$\{lpath\} -lRNA -lm
+00837 \(\backslash\)endverbatim
+00838 where \(\backslash\)e $\{hpath\} and \(\backslash\)e $\{lpath\} point to the location of the header
+00839 files and library, respectively.
+00840 \(\backslash\)note As \textcolor{keywordflow}{default}, the RNAlib is compiled with build-in \(\backslash\)e OpenMP multithreading
+00841 support. Thus, when linking your own \textcolor{keywordtype}{object} files to the library you have to pass
+00842 the compiler specific \(\backslash\)e $\{OPENMP\_CFLAGS\} (e.g. \textcolor{stringliteral}{'-fopenmp'} for \(\backslash\)b gcc) even \textcolor{keywordflow}{if} your code does not
+00843 use openmp specific code. However, in that \textcolor{keywordflow}{case} the \(\backslash\)e OpenMP flags may be ommited when compiling
+00844 example.c
+00845 
+00846 
+00847 **/
+00848 
+\end{DoxyCode}