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

allpy

diff lib/block.py @ 173:45573ee48844

Project.alignment --> Project.body
author boris <bnagaev@gmail.com>
date Wed, 03 Nov 2010 19:01:50 +0300
parents 854e33626cbe
children fb3164f03984
line diff
     1.1 --- a/lib/block.py	Tue Nov 02 20:44:18 2010 +0300
     1.2 +++ b/lib/block.py	Wed Nov 03 19:01:50 2010 +0300
     1.3 @@ -19,7 +19,7 @@
     1.4      *   self.project -- project object, which the block belongs to
     1.5      *   self.sequences - set of sequence objects that contain monomers
     1.6          and/or gaps, that constitute the block
     1.7 -    *   self.positions -- list of positions of the project.alignment that
     1.8 +    *   self.positions -- list of positions of the project.body that
     1.9          are included in the block; position[i+1] is always to the right from position[i]
    1.10      
    1.11      Don't change self.sequences -- it may be a link to other block.sequences
    1.12 @@ -52,7 +52,7 @@
    1.13          are made.
    1.14          """
    1.15          for sequence in self.sequences:
    1.16 -            alignment_monomers = self.project.alignment[sequence]
    1.17 +            alignment_monomers = self.project.body[sequence]
    1.18              block_monomers = [alignment_monomers[i] for i in self.positions]
    1.19              string = ''.join([m.type.code1 if m else '-' for m in block_monomers])
    1.20              save_fasta(out_file, string, sequence.name, sequence.description, long_line)
    1.21 @@ -84,8 +84,8 @@
    1.22                      distances = []
    1.23                      for sequence in self.sequences:
    1.24                          for chain in sequence.pdb_chains:
    1.25 -                            m1 = self.project.alignment[sequence][i]
    1.26 -                            m2 = self.project.alignment[sequence][j]
    1.27 +                            m1 = self.project.body[sequence][i]
    1.28 +                            m2 = self.project.body[sequence][j]
    1.29                              if m1 and m2:
    1.30                                  r1 = sequence.pdb_residues[chain][m1]
    1.31                                  r2 = sequence.pdb_residues[chain][m2]
    1.32 @@ -126,7 +126,7 @@
    1.33      
    1.34      def monomers(self, sequence):
    1.35          """ Iterates monomers of this sequence from this block """
    1.36 -        alignment_sequence = self.project.alignment[sequence]
    1.37 +        alignment_sequence = self.project.body[sequence]
    1.38          return (alignment_sequence[i] for i in self.positions)
    1.39      
    1.40      def ca_atoms(self, sequence, pdb_chain):