allpy
view allpy/sequence.py @ 192:50633fcbbdc4
Removed old implementation of geometrical_core.
The proper place for obsolete implementations is either in
history in the repository, or in separate branches, not in
subdirectories within the current branch in the repository.
author | Daniil Alexeyevsky <me.dendik@gmail.com> |
---|---|
date | Thu, 18 Nov 2010 21:42:16 +0300 |
parents | a016cad5f5a0 |
children | 346a6cd4fc1d |
line source
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
18 """ Sequence of Monomers
20 Mandatory data:
21 * name -- str with the name of sequence
22 * description -- str with description of the sequence
23 * monomers -- list of monomer objects (aminoacids or nucleotides)
25 Optional (may be empty):
26 * pdb_chains -- list of Bio.PDB.Chain's
27 * pdb_files -- dictionary like {Bio.PDB.Chain: file_obj}
29 * pdb_residues -- dictionary like {Bio.PDB.Chain: {Monomer: Bio.PDB.Residue}}
30 * pdb_secstr -- dictionary like {Bio.PDB.Chain: {Monomer: 'Secondary structure'}}
31 Code Secondary structure
32 H alpha-helix
33 B Isolated beta-bridge residue
34 E Strand
35 G 3-10 helix
36 I pi-helix
37 T Turn
38 S Bend
39 - Other
42 ?TODO: global pdb_structures
43 """
59 """ Returns sequence in one-letter code """
63 """ Returns if all corresponding monomers of this sequences are equal
65 If lengths of sequences are not equal, returns False
66 """
74 """ Reads Pdb chain from file
76 and align each Monomer with PDB.Residue (TODO)
77 """
94 """ Delete all pdb-connected links """
95 #~ gc.get_referrers(self.pdb_chains[0])
101 @staticmethod
103 """ Import data from one-letter code
105 monomer_kind is class, inherited from MonomerType
106 """
110 @staticmethod
112 """ Returns Sequence with Monomers with link to Bio.PDB.Residue
114 chain is Bio.PDB.Chain
115 """
131 """ Adds pdb information to each monomer
133 Returns if information has been successfully added
134 TODO: conformity_file
136 id-format lava flow
137 """
161 """ Saves pdb_chain to out_file """
175 """ Add secondary structure data """
197 @staticmethod
198 def file_slice(file, n_from, n_to, fasta_name='', name='', description='', monomer_kind=AminoAcidType):
199 """ Build and return sequence, consisting of part of sequence from file
201 Does not control gaps
202 """