allpy
annotate test/test.py @ 349:424f815b7515
Renamed methods of Alignment as discussed (refs #12)
author | Daniil Alexeyevsky <me.dendik@gmail.com> |
---|---|
date | Thu, 20 Jan 2011 22:31:37 +0300 |
parents | fb3164f03984 |
children | faa7e19bffd9 |
rev | line source |
---|---|
bnagaev@98 | 1 import sys |
bnagaev@83 | 2 |
me@191 | 3 from allpy.alignment import Alignment |
me@191 | 4 from allpy.block import Block |
bnagaev@83 | 5 |
bnagaev@175 | 6 p = Alignment(open('test.fasta')) |
bnagaev@83 | 7 print "alignment length: %i" % len(p) |
bnagaev@110 | 8 print "sequence: %s" % str(p.sequences[0]) |
bnagaev@83 | 9 |
bnagaev@120 | 10 p.sequences[0].pdb_chain_add(open('1jcc.pdb'), '1jcc', 'B') |
bnagaev@120 | 11 p.sequences[1].pdb_chain_add(open('1kfm.pdb'), '1kfm', 'A') |
bnagaev@120 | 12 |
bnagaev@121 | 13 b = Block(p) |
bnagaev@130 | 14 GCs = b.geometrical_cores(ac_new_atoms=0.00, ac_count=-1) |
bnagaev@128 | 15 b.save_fasta(sys.stdout) |
bnagaev@134 | 16 for i, GC in enumerate(GCs): |
bnagaev@134 | 17 GC.save_xstring(sys.stdout, i) |
bnagaev@121 | 18 |
bnagaev@110 | 19 #~ p.muscle_align() |
bnagaev@110 | 20 #~ p.save_fasta(sys.stdout) |