allpy
view allpy/sequence.py @ 244:6507cd6808c7
allpy: monomers completed
_monomers.py -- provate module for monomers
other modules imports MonomerType's descendant from _monomer
and inherit from Monomer type
thre are some problems with Monomer -- MonomerType links
author | boris <bnagaev@gmail.com> |
---|---|
date | Fri, 03 Dec 2010 23:24:43 +0300 |
parents | 280a8069c206 |
children | deae8240d396 |
line source
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
18 """ Sequence of Monomers
20 list of monomer objects (aminoacids or nucleotides)
22 Mandatory data:
23 * name -- str with the name of sequence
24 * description -- str with description of the sequence
26 Optional (may be empty):
27 * source -- source of sequence
28 * pdb_chain -- Bio.PDB.Chain
29 * pdb_file -- file object
31 * pdb_residues -- {Monomer: Bio.PDB.Residue}
32 * pdb_secstr -- {Monomer: 'Secondary structure'}
33 Code Secondary structure
34 H alpha-helix
35 B Isolated beta-bridge residue
36 E Strand
37 G 3-10 helix
38 I pi-helix
39 T Turn
40 S Bend
41 - Other
44 ?TODO: global pdb_structures
45 """
61 """ Returns sequence in one-letter code """
65 """ Returns if all corresponding monomers of this sequences are equal
67 If lengths of sequences are not equal, returns False
68 """
76 """ Reads Pdb chain from file
78 and align each Monomer with PDB.Residue (TODO)
79 """
96 """ Delete all pdb-connected links """
97 #~ gc.get_referrers(self.pdb_chains[0])
103 @staticmethod
105 """ Import data from one-letter code
107 monomer_kind is class, inherited from MonomerType
108 """
112 @staticmethod
114 """ Returns Sequence with Monomers with link to Bio.PDB.Residue
116 chain is Bio.PDB.Chain
117 """
133 """ Adds pdb information to each monomer
135 Returns if information has been successfully added
136 TODO: conformity_file
138 id-format lava flow
139 """
163 """ Saves pdb_chain to out_file """
177 """ Add secondary structure data """
199 @staticmethod
200 def file_slice(file, n_from, n_to, fasta_name='', name='', description='', monomer_kind=AminoAcidType):
201 """ Build and return sequence, consisting of part of sequence from file
203 Does not control gaps
204 """
219 """ """
220 pass