1 from obitools import utils
2 from obitools import NucSequence
3 from obitools.dnahash import hashCodeIterator
4
5
7 - def __init__(self,id,seq,definition=None,quality=None,**info):
11
13 if isinstance(self._quality, str):
14 self._quality=[int(x) for x in self._quality.split()]
15 return self._quality
16
17
19 if self._hash is None:
20 self._hash = hashCodeIterator(str(self), len(str(self)), 16, 0).next()[1].pop()
21 return self._hash
22
25 utils.ColumnFile.__init__(self,
26 stream, ':', True,
27 (str,
28 int,int,int,int,
29 str,
30 str), "#")
31
32
34 data = utils.ColumnFile.next(self)
35 seq = SolexaSequence('%d_%d_%d_%d'%(data[1],data[2],data[3],data[4]),
36 data[5],
37 quality=data[6])
38 seq['machine']=data[0]
39 seq['channel']=data[1]
40 seq['tile']=data[2]
41 seq['pos_x']=data[3]
42 seq['pos_y']=data[4]
43
44
45 return seq
46