1
2
3
4
5
6 """Martel regular expression for Intelligenetic format (DEPRECATED).
7
8 This is a huge regular regular expression for the IntelliGenetics/MASE format,
9 built using the 'regular expressions on steroids' capabilities of Martel.
10 """
11
12
13
14 import Martel
15
16
17 comment_line = Martel.Group( "comment_line", \
18 Martel.Str( ';' ) +
19 Martel.ToEol( "comment" ) )
20 comment_lines = Martel.Group( "comment_lines", Martel.Rep( comment_line ) )
21 title_line = Martel.Group( "title_line", \
22 Martel.Expression.Assert( Martel.Str( ';' ), 1 ) +
23 Martel.ToEol() )
24 residue_line = Martel.Group( "residue_line", \
25 Martel.Expression.Assert( Martel.Str( ';' ), 1 ) +
26 Martel.ToEol( "sequence" ) )
27 residue_lines = Martel.Group( "residue_lines", Martel.Rep1( residue_line ) )
28 intelligenetics_record = comment_lines + title_line + residue_lines
29