allpy
view lib/block.py @ 5:76816df24fe2
dummy_pytale.py: file added
Can do: display an alignment, colour by identity.
Features: Both sequence names and sequences are TextCtrl. Extremely slow.
author | grishin@gorilla |
---|---|
date | Wed, 09 Jun 2010 14:46:02 +0400 |
parents | 757f2a1f8732 |
children | 217d83a617c3 |
line source
1 #!usr/bin/python
10 """
11 Mandatory data:
12 * self.project -- project object, which the block belongs to
13 * self.sequences - set of sequence objects that contain monomers
14 and/or gaps, that constitute the block
15 * self.positions -- list of positions of the project.alignment that
16 are included in the block
18 How to create a new block:
19 >>> import project
20 >>> import block
21 >>> proj = project.Project(open("test.fasta"))
22 >>> block1 = block.Block(proj, proj.sequences, range(len(proj.alignment[proj.sequences[0]])))
24 """
32 """writes the block as an alignment in fasta-format into the file.
34 No changes in the names, descriptions or order of the sequences
35 are made.
37 """