Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/rev/f85ca82c4965
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 00:28:34 2012
Кодировка:
allpy: f85ca82c4965

allpy

changeset 229:f85ca82c4965

repeats: fix +-1 problem (interval ends)
author boris <bnagaev@gmail.com>
date Sat, 27 Nov 2010 19:50:57 +0300
parents 0ed41390408f
children 684ff5579345
files repeats/repeat_joiner.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/repeats/repeat_joiner.py	Sat Nov 27 19:21:17 2010 +0300
     1.2 +++ b/repeats/repeat_joiner.py	Sat Nov 27 19:50:57 2010 +0300
     1.3 @@ -59,7 +59,7 @@
     1.4          if pos_start >= pos_end:
     1.5              return []
     1.6          return filter(lambda r: r != self, self.chromosome.find(pos_start, pos_end))
     1.7 -    
     1.8 +
     1.9      def thick_edge(self):
    1.10          """ return thick edge (paired repeat) """
    1.11          if self == self.repeat_pair[0]:
    1.12 @@ -137,11 +137,12 @@
    1.13              return "%s: [%i, %i)" % (self.chromosome, self.real_start, self.real_end)
    1.14  
    1.15      def __str__(self):
    1.16 +        """ returns string to put into table file. IMPORTANT: [start, end] """
    1.17          ori = 1 if self.ori else -1
    1.18          if self.group_real_start != None:
    1.19              group_ori = 1 if self.group_ori else -1
    1.20              return "%s %i %i %i %i %i %i" % (self.chromosome, self.start,
    1.21 -                    self.end, self.group_start, self.group_end, ori, group_ori)
    1.22 +                    self.end-1, self.group_start, self.group_end-1, ori, group_ori)
    1.23          else:
    1.24              return "%s %i %i %i" % (self.chromosome, self.start,
    1.25                      self.end, ori)