Документ взят из кэша поисковой машины. Адрес оригинального документа : http://kodomo.fbb.msu.ru/hg/allpy/file/4a2341bc90b1/test/test.py
Дата изменения: Unknown
Дата индексирования: Sun Feb 3 18:03:26 2013
Кодировка:
allpy: 4a2341bc90b1 test/test.py

allpy

view test/test.py @ 275:4a2341bc90b1

base.Sequence major cleanup * moved base.Sequence.secstr_has to pdb (it appears that secondary structure it uses is from PDB, which is not a nice thing to do; secondary structure is an entity in itself and must have same names across different sources) * removed stupid base.Sequence.monomers, since base.Sequence is subclass of list * removed all methods that reimplement list behaviour * fixed headers of base.Sequence.from_slice
author Daniil Alexeyevsky <me.dendik@gmail.com>
date Wed, 15 Dec 2010 20:06:27 +0300
parents fb3164f03984
children faa7e19bffd9
line source
1 import sys
3 from allpy.alignment import Alignment
4 from allpy.block import Block
6 p = Alignment(open('test.fasta'))
7 print "alignment length: %i" % len(p)
8 print "sequence: %s" % str(p.sequences[0])
10 p.sequences[0].pdb_chain_add(open('1jcc.pdb'), '1jcc', 'B')
11 p.sequences[1].pdb_chain_add(open('1kfm.pdb'), '1kfm', 'A')
13 b = Block(p)
14 GCs = b.geometrical_cores(ac_new_atoms=0.00, ac_count=-1)
15 b.save_fasta(sys.stdout)
16 for i, GC in enumerate(GCs):
17 GC.save_xstring(sys.stdout, i)
19 #~ p.muscle_align()
20 #~ p.save_fasta(sys.stdout)