\hypertarget{gquad_8h}{
\section{/homes/fmmarquesmadeira/Projects/jabaws/binaries/src/ViennaRNA/H/gquad.h File Reference}
\label{gquad_8h}\index{/homes/fmmarquesmadeira/Projects/jabaws/binaries/src/ViennaRNA/H/gquad.h@{/homes/fmmarquesmadeira/Projects/jabaws/binaries/src/ViennaRNA/H/gquad.h}}
}


Various functions related to G-\/quadruplex computations.  
Include dependency graph for gquad.h:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=209pt]{gquad_8h__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int $\ast$ \hyperlink{gquad_8h_a8b0784c14fa1208d0aebbebdc1318b7a}{get\_\-gquad\_\-matrix} (short $\ast$S, \hyperlink{structparamT}{paramT} $\ast$P)
\begin{DoxyCompactList}\small\item\em Get a triangular matrix prefilled with minimum free energy contributions of G-\/quadruplexes. \item\end{DoxyCompactList}\item 
int \hyperlink{gquad_8h_ae41763215b9c64d2a7b67f0df8a28078}{parse\_\-gquad} (const char $\ast$struc, int $\ast$L, int l\mbox{[}3\mbox{]})
\item 
PRIVATE int \hyperlink{gquad_8h_a54475a8eb898fa1e8af8ab5f5375f3be}{backtrack\_\-GQuad\_\-IntLoop} (int c, int i, int j, int type, short $\ast$S, int $\ast$ggg, int $\ast$index, int $\ast$p, int $\ast$q, \hyperlink{structparamT}{paramT} $\ast$P)
\item 
PRIVATE int \hyperlink{gquad_8h_a118ec7289f1936bd810be7fe50b98212}{backtrack\_\-GQuad\_\-IntLoop\_\-L} (int c, int i, int j, int type, short $\ast$S, int $\ast$$\ast$ggg, int maxdist, int $\ast$p, int $\ast$q, \hyperlink{structparamT}{paramT} $\ast$P)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Various functions related to G-\/quadruplex computations. 

\subsection{Function Documentation}
\hypertarget{gquad_8h_a8b0784c14fa1208d0aebbebdc1318b7a}{
\index{gquad.h@{gquad.h}!get\_\-gquad\_\-matrix@{get\_\-gquad\_\-matrix}}
\index{get\_\-gquad\_\-matrix@{get\_\-gquad\_\-matrix}!gquad.h@{gquad.h}}
\subsubsection[{get\_\-gquad\_\-matrix}]{\setlength{\rightskip}{0pt plus 5cm}int$\ast$ get\_\-gquad\_\-matrix (short $\ast$ {\em S}, \/  {\bf paramT} $\ast$ {\em P})}}
\label{gquad_8h_a8b0784c14fa1208d0aebbebdc1318b7a}


Get a triangular matrix prefilled with minimum free energy contributions of G-\/quadruplexes. At each position ij in the matrix, the minimum free energy of any G-\/quadruplex delimited by i and j is stored. If no G-\/quadruplex formation is possible, the matrix element is set to INF. Access the elements in the matrix via matrix\mbox{[}indx\mbox{[}j\mbox{]}+i\mbox{]}. To get the integer array indx see get\_\-jindx().

\begin{DoxySeeAlso}{See also}
get\_\-jindx(), encode\_\-sequence()
\end{DoxySeeAlso}

\begin{DoxyParams}{Parameters}
\item[{\em S}]The encoded sequence \item[{\em P}]A pointer to the data structure containing the precomputed energy contributions \end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the G-\/quadruplex contribution matrix 
\end{DoxyReturn}
\hypertarget{gquad_8h_ae41763215b9c64d2a7b67f0df8a28078}{
\index{gquad.h@{gquad.h}!parse\_\-gquad@{parse\_\-gquad}}
\index{parse\_\-gquad@{parse\_\-gquad}!gquad.h@{gquad.h}}
\subsubsection[{parse\_\-gquad}]{\setlength{\rightskip}{0pt plus 5cm}int parse\_\-gquad (const char $\ast$ {\em struc}, \/  int $\ast$ {\em L}, \/  int {\em l}\mbox{[}3\mbox{]})}}
\label{gquad_8h_ae41763215b9c64d2a7b67f0df8a28078}
given a dot-\/bracket structure (possibly) containing gquads encoded by '+' signs, find first gquad, return end position or 0 if none found Upon return L and l\mbox{[}\mbox{]} contain the number of stacked layers, as well as the lengths of the linker regions. To parse a string with many gquads, call parse\_\-gquad repeatedly e.g. end1 = parse\_\-gquad(struc, \&L, l); ... ; end2 = parse\_\-gquad(struc+end1, \&L, l); end2+=end1; ... ; end3 = parse\_\-gquad(struc+end2, \&L, l); end3+=end2; ... ; \hypertarget{gquad_8h_a54475a8eb898fa1e8af8ab5f5375f3be}{
\index{gquad.h@{gquad.h}!backtrack\_\-GQuad\_\-IntLoop@{backtrack\_\-GQuad\_\-IntLoop}}
\index{backtrack\_\-GQuad\_\-IntLoop@{backtrack\_\-GQuad\_\-IntLoop}!gquad.h@{gquad.h}}
\subsubsection[{backtrack\_\-GQuad\_\-IntLoop}]{\setlength{\rightskip}{0pt plus 5cm}PRIVATE int backtrack\_\-GQuad\_\-IntLoop (int {\em c}, \/  int {\em i}, \/  int {\em j}, \/  int {\em type}, \/  short $\ast$ {\em S}, \/  int $\ast$ {\em ggg}, \/  int $\ast$ {\em index}, \/  int $\ast$ {\em p}, \/  int $\ast$ {\em q}, \/  {\bf paramT} $\ast$ {\em P})}}
\label{gquad_8h_a54475a8eb898fa1e8af8ab5f5375f3be}
backtrack an interior loop like enclosed g-\/quadruplex with closing pair (i,j)


\begin{DoxyParams}{Parameters}
\item[{\em c}]The total contribution the loop should resemble \item[{\em i}]position i of enclosing pair \item[{\em j}]position j of enclosing pair \item[{\em type}]base pair type of enclosing pair (must be reverse type) \item[{\em S}]integer encoded sequence \item[{\em ggg}]triangular matrix containing g-\/quadruplex contributions \item[{\em index}]the index for accessing the triangular matrix \item[{\em p}]here the 5' position of the gquad is stored \item[{\em q}]here the 3' position of the gquad is stored \item[{\em P}]the datastructure containing the precalculated contibutions\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if no gquad found 
\end{DoxyReturn}
\hypertarget{gquad_8h_a118ec7289f1936bd810be7fe50b98212}{
\index{gquad.h@{gquad.h}!backtrack\_\-GQuad\_\-IntLoop\_\-L@{backtrack\_\-GQuad\_\-IntLoop\_\-L}}
\index{backtrack\_\-GQuad\_\-IntLoop\_\-L@{backtrack\_\-GQuad\_\-IntLoop\_\-L}!gquad.h@{gquad.h}}
\subsubsection[{backtrack\_\-GQuad\_\-IntLoop\_\-L}]{\setlength{\rightskip}{0pt plus 5cm}PRIVATE int backtrack\_\-GQuad\_\-IntLoop\_\-L (int {\em c}, \/  int {\em i}, \/  int {\em j}, \/  int {\em type}, \/  short $\ast$ {\em S}, \/  int $\ast$$\ast$ {\em ggg}, \/  int {\em maxdist}, \/  int $\ast$ {\em p}, \/  int $\ast$ {\em q}, \/  {\bf paramT} $\ast$ {\em P})}}
\label{gquad_8h_a118ec7289f1936bd810be7fe50b98212}
backtrack an interior loop like enclosed g-\/quadruplex with closing pair (i,j) with underlying Lfold matrix


\begin{DoxyParams}{Parameters}
\item[{\em c}]The total contribution the loop should resemble \item[{\em i}]position i of enclosing pair \item[{\em j}]position j of enclosing pair \item[{\em type}]base pair type of enclosing pair (must be reverse type) \item[{\em S}]integer encoded sequence \item[{\em ggg}]triangular matrix containing g-\/quadruplex contributions \item[{\em p}]here the 5' position of the gquad is stored \item[{\em q}]here the 3' position of the gquad is stored \item[{\em P}]the datastructure containing the precalculated contibutions\end{DoxyParams}
\begin{DoxyReturn}{Returns}
1 on success, 0 if no gquad found 
\end{DoxyReturn}
