RNAlib-2.1.2
gquad.h File Reference

Various functions related to G-quadruplex computations. More...

+ Include dependency graph for gquad.h:

Go to the source code of this file.

Functions

int * get_gquad_matrix (short *S, paramT *P)
 Get a triangular matrix prefilled with minimum free energy contributions of G-quadruplexes.
int parse_gquad (const char *struc, int *L, int l[3])
PRIVATE int backtrack_GQuad_IntLoop (int c, int i, int j, int type, short *S, int *ggg, int *index, int *p, int *q, paramT *P)
PRIVATE int backtrack_GQuad_IntLoop_L (int c, int i, int j, int type, short *S, int **ggg, int maxdist, int *p, int *q, paramT *P)

Detailed Description

Various functions related to G-quadruplex computations.


Function Documentation

int* get_gquad_matrix ( short *  S,
paramT P 
)

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[indx[j]+i]. To get the integer array indx see get_jindx().

See also:
get_jindx(), encode_sequence()
Parameters:
SThe encoded sequence
PA pointer to the data structure containing the precomputed energy contributions
Returns:
A pointer to the G-quadruplex contribution matrix
int parse_gquad ( const char *  struc,
int *  L,
int  l[3] 
)

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[] 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; ... ;

PRIVATE int backtrack_GQuad_IntLoop ( int  c,
int  i,
int  j,
int  type,
short *  S,
int *  ggg,
int *  index,
int *  p,
int *  q,
paramT P 
)

backtrack an interior loop like enclosed g-quadruplex with closing pair (i,j)

Parameters:
cThe total contribution the loop should resemble
iposition i of enclosing pair
jposition j of enclosing pair
typebase pair type of enclosing pair (must be reverse type)
Sinteger encoded sequence
gggtriangular matrix containing g-quadruplex contributions
indexthe index for accessing the triangular matrix
phere the 5' position of the gquad is stored
qhere the 3' position of the gquad is stored
Pthe datastructure containing the precalculated contibutions
Returns:
1 on success, 0 if no gquad found
PRIVATE int backtrack_GQuad_IntLoop_L ( int  c,
int  i,
int  j,
int  type,
short *  S,
int **  ggg,
int  maxdist,
int *  p,
int *  q,
paramT P 
)

backtrack an interior loop like enclosed g-quadruplex with closing pair (i,j) with underlying Lfold matrix

Parameters:
cThe total contribution the loop should resemble
iposition i of enclosing pair
jposition j of enclosing pair
typebase pair type of enclosing pair (must be reverse type)
Sinteger encoded sequence
gggtriangular matrix containing g-quadruplex contributions
phere the 5' position of the gquad is stored
qhere the 3' position of the gquad is stored
Pthe datastructure containing the precalculated contibutions
Returns:
1 on success, 0 if no gquad found