"Algebras/Shapes/alg_shapes.gap": Shapes are an abstraction of the concrete Vienna-Dot-Bracket string to the - as we think - most important features of an RNA structure. They come in five different levels, where 5 is the most abstract and 1 the most concrete level. All levels abstract from length and position. For a definition of the levels, see Faster computation of exact RNA shape probabilities
The file contains five algebras, one for each level. It starts with level 5 and uses the inheritance system of GAP-L to keep the effort of defining the other levels as small as possible. For efficiency reasons we use the special shape
(in the file shape_t
is a type synonym for shape
) data type with a very limited alphabet, i.e. just [
, ]
and _
. The advantage of a small alphabet becomes obvious if we have to use a hash of very many different shapes.
We also provide another algebra, called alg_shapeX
for convenience of applications. It is possible to give the desired level as a command line parameter (- u
). Thus, we only have to compile one program instead of five and we can still choose the level of abstraction.
We make heavy use of out-sourcing parts of the algebras into separate files, which can be re-used by several algebras. See sub-directory "Parts".