allpy
diff lib/block.py @ 113:90e2c77b69b7
fix
author | boris <bnagaev@gmail.com> |
---|---|
date | Sat, 23 Oct 2010 13:17:33 +0400 |
parents | b7b963287d31 |
children | 5a089847d42e |
line diff
1.1 --- a/lib/block.py Sat Oct 23 13:16:12 2010 +0400 1.2 +++ b/lib/block.py Sat Oct 23 13:17:33 2010 +0400 1.3 @@ -48,8 +48,9 @@ 1.4 """ 1.5 for sequence in self.sequences: 1.6 out_file.write(">%(name)s %(description)s \n" % sequence.__dict__) 1.7 - monomers = [self.project.alignment[i] for i in sorted(self.positions)] 1.8 - string = ''.join([m.type.code1 if m else '-' for m in monomers]) 1.9 + alignment_monomers = self.project.alignment[sequence] 1.10 + block_monomers = [alignment_monomers[i] for i in sorted(self.positions)] 1.11 + string = ''.join([m.type.code1 if m else '-' for m in block_monomers]) 1.12 if long_line: 1.13 for i in range(0, len(string) // long_line + 1): 1.14 out_file.write("%s \n" % string[i*long_line : i*long_line + long_line])