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. More...
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

  S | The encoded sequence
  P | A 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

  c | The total contribution the loop should resemble
  i | position i of enclosing pair
  j | position j of enclosing pair
  type | base pair type of enclosing pair (must be reverse type)
  S | integer encoded sequence
  ggg | triangular matrix containing g-quadruplex contributions
  index | the index for accessing the triangular matrix
  p | here the 5' position of the gquad is stored
  q | here the 3' position of the gquad is stored
  P | the 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

  c | The total contribution the loop should resemble
  i | position i of enclosing pair
  j | position j of enclosing pair
  type | base pair type of enclosing pair (must be reverse type)
  S | integer encoded sequence
  ggg | triangular matrix containing g-quadruplex contributions
  p | here the 5' position of the gquad is stored
  q | here the 3' position of the gquad is stored
  P | the datastructure containing the precalculated contibutions

Returns
  1 on success, 0 if no gquad found