1 from obitools import NucSequence
2 from obitools.location import locationGenerator,extractExternalRefs
3
4
5
7 '''
8 Class used to represent a nucleic sequence issued mapped
9 on a genome by the tagMatcher software.
10 '''
11
13 NucSequence.__init__(self, seq, seq)
14 self['locations']=locs
15 self['conditions']=cd
16 self['dm']=dm
17 self['rm']=rm
18 self['tm']=dm+rm
19
21 result = [x for x in self['locations']
22 if (emin is None or x['error'] >=emin)
23 and (emax is None or x['error'] <=emax)]
24 self['locations']=result
25 dm=0
26 rm=0
27 for x in result:
28 if x.isDirect():
29 dm+=1
30 else:
31 rm+=1
32 self['dm']=dm
33 self['rm']=rm
34 self['tm']=dm+rm
35 return self
36