allpy
view lib/block.py @ 79:65c3e3aad2e4
start integration with biopython.PDB
pdb.py -> allpy_pdb.py to prevent overloading standart python pdb.py
author | boris <bnagaev@gmail.com> |
---|---|
date | Wed, 29 Sep 2010 09:50:35 +0400 |
parents | bbf3a797cc67 |
children | b7b963287d31 |
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 """