Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/diff/78dcad10165d/allpy/base.py
Дата изменения: Unknown
Дата индексирования: Sun Feb 3 20:16:25 2013
Кодировка:
allpy: allpy/base.py diff

allpy

diff allpy/base.py @ 364:78dcad10165d

Renamed Alignment.append_row -> Alignment.append_row_from_string. (see #25)
author Daniil Alexeyevsky <me.dendik@gmail.com>
date Wed, 26 Jan 2011 20:56:33 +0300
parents 5643facbe8e7
children 97e12fac5994
line diff
     1.1 --- a/allpy/base.py	Wed Jan 26 20:54:38 2011 +0300
     1.2 +++ b/allpy/base.py	Wed Jan 26 20:56:33 2011 +0300
     1.3 @@ -160,9 +160,9 @@
     1.4          for i, monomer in enumerate(sequence):
     1.5              self.column_at(i)[sequence] = monomer
     1.6  
     1.7 -    def append_row(self, string, name='', description='', source='',
     1.8 -            gaps=default_gaps):
     1.9 -        """Add row from a string of one-letter codes and gaps."""
    1.10 +    def append_row_from_string(self, string,
    1.11 +            name='', description='', source='', gaps=default_gaps):
    1.12 +        """Add row from a string of one-letter codes and gaps. Return self."""
    1.13          Sequence = self.sequence_type
    1.14          not_gap = lambda (i, char): char not in gaps
    1.15          without_gaps = util.remove_each(string, gaps)
    1.16 @@ -177,6 +177,7 @@
    1.17          for i, (j, char) in enumerate(filter(not_gap, enumerate(string))):
    1.18              self.column_at(j)[sequence] = sequence[i]
    1.19          self.sequences.append(sequence)
    1.20 +        return self
    1.21  
    1.22      def column_at(self, n):
    1.23          """Return column by index. Create required new columns if required.