-
Notifications
You must be signed in to change notification settings - Fork 5
/
nodangle.gap
101 lines (82 loc) · 6.28 KB
/
nodangle.gap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import rna
import "Extensions/singlefold.hh" //necessary to redefine the meaning of the filter "basepair". In singlefold this filter directly calles the build-in "basepairing" filter, in alignmentfold it gets hard codes parameters and returns true or false with dependance to the number of gaps in the rows
import "Extensions/mfesubopt.hh"
import "Extensions/probabilities.hh"
import "Extensions/shapes.hh"
import "Extensions/mea.hh"
import "Extensions/probing.hh"
import "Extensions/outside.hh"
input rna
type base_t = extern
type Rope = extern
type shape_t = shape
include "Signatures/sig_foldrna.gap"
include "Algebras/DotBracket/alg_dotBracket.gap"
include "Algebras/Shapes/alg_shapes.gap"
algebra alg_count auto count;
algebra alg_enum auto enum;
algebra alg_tikz auto tikz;
include "Algebras/MFE/alg_mfe.gap"
include "Algebras/MEA/alg_mea.gap"
include "Algebras/Pfunc/alg_pfunc.gap"
include "Algebras/Probing/alg_probing.gap" //an algebra for integrating structure probing data like SHAPE or DMS
include "Algebras/MFE/alg_mfe_SHAPE.gap"
include "Grammars/gra_nodangle.gap"
/*
example inputs: CACUGUAAAGCUAACUUAGCAUUAACCUUUUAAGUUAAAGAUUAAGAGAACCAACACCUCUUUACAGUGACCA
*/
//start: instances used in the FoldingSpaces paper
instance shape5pfx = gra_nodangle ((alg_shape5 * alg_pfunc) suchthat filterLowProbShapes);
instance shape4pfx = gra_nodangle ((alg_shape4 * alg_pfunc) suchthat filterLowProbShapes);
instance shape3pfx = gra_nodangle ((alg_shape3 * alg_pfunc) suchthat filterLowProbShapes);
instance shape2pfx = gra_nodangle ((alg_shape2 * alg_pfunc) suchthat filterLowProbShapes);
instance shape1pfx = gra_nodangle ((alg_shape1 * alg_pfunc) suchthat filterLowProbShapes);
instance shape5mfepfxpp = gra_nodangle (((alg_shape5 * (alg_mfe % alg_pfunc)) suchthat filterLowProbShapes) * alg_dotBracket); //must be compiled with --kbacktrace !
instance shape4mfepfxpp = gra_nodangle (((alg_shape4 * (alg_mfe % alg_pfunc)) suchthat filterLowProbShapes) * alg_dotBracket); //must be compiled with --kbacktrace !
instance shape3mfepfxpp = gra_nodangle (((alg_shape3 * (alg_mfe % alg_pfunc)) suchthat filterLowProbShapes) * alg_dotBracket); //must be compiled with --kbacktrace !
instance shape2mfepfxpp = gra_nodangle (((alg_shape2 * (alg_mfe % alg_pfunc)) suchthat filterLowProbShapes) * alg_dotBracket); //must be compiled with --kbacktrace !
instance shape1mfepfxpp = gra_nodangle (((alg_shape1 * (alg_mfe % alg_pfunc)) suchthat filterLowProbShapes) * alg_dotBracket); //must be compiled with --kbacktrace !
instance mfeshape5pp = gra_nodangle(alg_mfe * alg_shape5 * alg_dotBracket);
instance mfeshape4pp = gra_nodangle(alg_mfe * alg_shape4 * alg_dotBracket);
instance mfeshape3pp = gra_nodangle(alg_mfe * alg_shape3 * alg_dotBracket);
instance mfeshape2pp = gra_nodangle(alg_mfe * alg_shape2 * alg_dotBracket);
instance mfeshape1pp = gra_nodangle(alg_mfe * alg_shape1 * alg_dotBracket);
instance count = gra_nodangle (alg_count);
//stop: instances used in the FoldingSpaces paper
//start: instances used in for RapidShapes
instance pf = gra_nodangle ( alg_pfunc ) ;
instance pfsampleshape5all = gra_nodangle ( ( (alg_pfunc | alg_pfunc_id ) * alg_shape5 ) suchthat sample_filter ) ; //compile with --sample !
instance pfsampleshape4all = gra_nodangle ( ( (alg_pfunc | alg_pfunc_id ) * alg_shape4 ) suchthat sample_filter ) ; //compile with --sample !
instance pfsampleshape3all = gra_nodangle ( ( (alg_pfunc | alg_pfunc_id ) * alg_shape3 ) suchthat sample_filter ) ; //compile with --sample !
instance pfsampleshape2all = gra_nodangle ( ( (alg_pfunc | alg_pfunc_id ) * alg_shape2 ) suchthat sample_filter ) ; //compile with --sample !
instance pfsampleshape1all = gra_nodangle ( ( (alg_pfunc | alg_pfunc_id ) * alg_shape1 ) suchthat sample_filter ) ; //compile with --sample !
instance shape5mfe = gra_nodangle ( alg_shape5 * alg_mfe ) ; //for guessing shapes according to energetically kbest, thus compile with --kbest
instance shape4mfe = gra_nodangle ( alg_shape4 * alg_mfe ) ; //for guessing shapes according to energetically kbest, thus compile with --kbest
instance shape3mfe = gra_nodangle ( alg_shape3 * alg_mfe ) ; //for guessing shapes according to energetically kbest, thus compile with --kbest
instance shape2mfe = gra_nodangle ( alg_shape2 * alg_mfe ) ; //for guessing shapes according to energetically kbest, thus compile with --kbest
instance shape1mfe = gra_nodangle ( alg_shape1 * alg_mfe ) ; //for guessing shapes according to energetically kbest, thus compile with --kbest
//~ instance shape5pfx = gra_nodangle ((alg_shape5 * alg_pfunc) suchthat filterLowProbShapes);
//~ instance shape4pfx = gra_nodangle ((alg_shape4 * alg_pfunc) suchthat filterLowProbShapes);
//~ instance shape3pfx = gra_nodangle ((alg_shape3 * alg_pfunc) suchthat filterLowProbShapes);
//~ instance shape2pfx = gra_nodangle ((alg_shape2 * alg_pfunc) suchthat filterLowProbShapes);
//~ instance shape1pfx = gra_nodangle ((alg_shape1 * alg_pfunc) suchthat filterLowProbShapes);
//stop: instances used in for RapidShapes
instance enum = gra_nodangle (alg_enum);
//~ instance shape5pfxpp = gra_nodangle (((alg_shape5 * alg_pfunc) suchthat filterLowProbShapes) * alg_dotBracket);
instance shapemfepf = gra_nodangle(alg_shape5 * (alg_mfe % alg_pfunc) * alg_dotBracket);
instance shape5pf = gra_nodangle(alg_shape5 * alg_pfunc);
instance pfAll = gra_nodangle(alg_pfunc); //this instance is used for outside computation of base pair probabilities
instance mfe = gra_nodangle (alg_shape5 * alg_mfe) ;
instance shape2 = gra_nodangle(alg_shape2);
instance shape5 = gra_nodangle(alg_shape5);
instance shape5count = gra_nodangle(alg_shape5 * alg_count);
instance pretty = gra_nodangle(alg_dotBracket);
instance mfepp = gra_nodangle(alg_mfe * alg_dotBracket);
instance ppmfe = gra_nodangle(alg_dotBracket * alg_mfe);
//start: instances for unit tests
instance testmfeshape3pp = gra_nodangle(alg_mfe * alg_shapeX * alg_dotBracket);
instance testdbshape5mfe = gra_nodangle(alg_dotBracket * alg_shapeX * alg_mfe);
instance testshape4mfepfdb = gra_nodangle(alg_shapeX * (alg_mfe % alg_pfunc) * alg_dotBracket);
instance testsampleshape2mfedb = gra_nodangle( ( (alg_pfunc | alg_pfunc_id ) * (alg_shapeX * alg_mfe * alg_dotBracket) ) suchthat sample_filter ); //compile with --sample !
//stop: instances for unit tests
instance erangeshapeanalysis5 = gra_nodangle((alg_shape5 * (alg_mfe * alg_dotBracket)) suchthat range_shape_mfe_db);