allpy
diff allpy/base.py @ 317:c2ff3beb5821
Block is actually a mixing for Alignment
author | Daniil Alexeyevsky <me.dendik@gmail.com> |
---|---|
date | Fri, 17 Dec 2010 00:18:19 +0300 |
parents | 3a34b934435f |
children | 91cda062c6f6 |
line diff
1.1 --- a/allpy/base.py Thu Dec 16 23:45:57 2010 +0300 1.2 +++ b/allpy/base.py Fri Dec 17 00:18:19 2010 +0300 1.3 @@ -335,7 +335,7 @@ 1.4 """ 1.5 pass 1.6 1.7 -class Block(object): 1.8 +class Block(Alignment): 1.9 """Block of alignment. 1.10 1.11 Block is intersection of a set of columns & a set of rows. Most of blocks 1.12 @@ -352,7 +352,8 @@ 1.13 columns = () 1.14 """List of columns in block.""" 1.15 1.16 - def __init__(self, alignment, sequences=None, columns=None): 1.17 + @classmethod 1.18 + def from_alignment(cls, alignment, sequences=None, columns=None): 1.19 """Build new block from alignment. 1.20 1.21 If sequences are not given, the block uses all sequences in alignment.