1
2
3
4
5
6 """Martel based parser to read IntelliGenetics formatted files.
7
8 This is a huge regular regular expression for IntelliGenetics, built using
9 the 'regular expressiona on steroids' capabilities of Martel.
10
11 http://hiv-web.lanl.gov/ALIGN_97/HIV12SIV-index.html
12
13 Notes:
14 Just so I remember -- the new end of line syntax is:
15 New regexp syntax - \R
16 \R means "\n|\r\n?"
17 [\R] means "[\n\r]"
18
19 This helps us have endlines be consistent across platforms.
20
21 """
22
23 import string
24
25
26 from Bio.Seq import Seq
27 """Hold IntelliGenetics data in a straightforward format.
28
29 classes:
30 o Record - All of the information in an IntelliGenetics record.
31 """
32
34 """Hold IntelliGenetics information in a format similar to the original record.
35
36 The Record class is meant to make data easy to get to when you are
37 just interested in looking at GenBank data.
38
39 Attributes:
40 comments
41 title
42 sequence
43 """
48
55
57 output = ''
58 for j in range( 0, len( seq ), 80 ):
59 output = output + '%s\n' % seq[ j: j + 80 ]
60 output = output + '\n'
61 return output
62