/* -*-C-*- */ /* this file contains code for alifolding circular RNAs */ /* it's #include'd into alifold.c */ PRIVATE void fill_arrays_comparative_circ( vrna_fold_compound_t *vc, sect bt_stack[], int *bt){ /* variant of alifold() for circular RNAs */ /* auxiliarry arrays: fM2 = multiloop region with exactly two stems, extending to 3' end for stupid dangles=1 case we also need: fM_d3 = multiloop region with >= 2 stems, starting at pos 2 (a pair (k,n) will form 3' dangle with pos 1) fM_d5 = multiloop region with >= 2 stems, extending to pos n-1 (a pair (1,k) will form a 5' dangle with pos n) */ int Fc, FcH, FcI, FcM, Hi, Hj, Ii, Ij, Ip, Iq, ip, iq, Mi, FcMd3, FcMd5; int i, j, ij, u, length, new_c, fm, n_seq, s; int *indx, *c, *fML, *fM2; char *hard_constraints; unsigned short **a2s; vrna_param_t *P; vrna_hc_t *hc; vrna_sc_t **sc; a2s = vc->a2s; P = vc->params; indx = vc->jindx; /* index for moving in the triangle matrices c[] and fMl[]*/ c = vc->matrices->c; /* energy array, given that i-j pair */ fML = vc->matrices->fML; /* multi-loop auxiliary energy array */ fM2 = vc->matrices->fM2; hc = vc->hc; sc = vc->scs; hard_constraints = hc->matrix; n_seq = vc->n_seq; length = vc->length; /* extra arrays for circfold() */ FcH = FcI= FcM = FcMd3= FcMd5= INF; if(hc->up_ext[1] >= length){ Fc = 0; if(sc){ for(s = 0; s < n_seq; s++){ if(sc[s]->energy_up) Fc += sc[s]->energy_up[1][a2s[s][length] - 1]; } } } else { Fc = INF; } for (i=1; iMLclosing; if (fmmatrices->FcH = FcH; vc->matrices->FcI = FcI; vc->matrices->FcM = FcM; vc->matrices->Fc = Fc; }