| Trees | Indices | Help |
|
|---|
|
|
Polypeptide-related classes (construction and representation).
Simple example with multiple chains,
>>> from Bio.PDB.PDBParser import PDBParser
>>> from Bio.PDB.Polypeptide import PPBuilder
>>> structure = PDBParser().get_structure('2BEG', 'PDB/2BEG.pdb')
>>> ppb=PPBuilder()
>>> for pp in ppb.build_peptides(structure):
... print pp.get_sequence()
LVFFAEDVGSNKGAIIGLMVGGVVIA
LVFFAEDVGSNKGAIIGLMVGGVVIA
LVFFAEDVGSNKGAIIGLMVGGVVIA
LVFFAEDVGSNKGAIIGLMVGGVVIA
LVFFAEDVGSNKGAIIGLMVGGVVIA
Example with non-standard amino acids using HETATM lines in the PDB file,
in this case selenomethionine (MSE):
>>> from Bio.PDB.PDBParser import PDBParser
>>> from Bio.PDB.Polypeptide import PPBuilder
>>> structure = PDBParser().get_structure('1A8O', 'PDB/1A8O.pdb')
>>> ppb=PPBuilder()
>>> for pp in ppb.build_peptides(structure):
... print pp.get_sequence()
DIRQGPKEPFRDYVDRFYKTLRAEQASQEVKNW
TETLLVQNANPDCKTILKALGPGATLEE
TACQG
If you want to, you can include non-standard amino acids in the peptides:
>>> for pp in ppb.build_peptides(structure, aa_only=False):
... print pp.get_sequence()
... print pp.get_sequence()[0], pp[0].get_resname()
... print pp.get_sequence()[-7], pp[-7].get_resname()
... print pp.get_sequence()[-6], pp[-6].get_resname()
MDIRQGPKEPFRDYVDRFYKTLRAEQASQEVKNWMTETLLVQNANPDCKTILKALGPGATLEEMMTACQG
M MSE
M MSE
M MSE
In this case the selenomethionines (the first and also seventh and sixth from
last residues) have been shown as M (methionine) by the get_sequence method.
|
|||
|
Polypeptide A polypeptide is simply a list of L{Residue} objects. |
|||
|
_PPBuilder Base class to extract polypeptides. |
|||
|
CaPPBuilder Use CA--CA distance to find polypeptides. |
|||
|
PPBuilder Use C--N distance to find polypeptides. |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
standard_aa_names =
|
|||
aa1 =
|
|||
aa3 =
|
|||
d1_to_index =
|
|||
dindex_to_1 =
|
|||
d3_to_index =
|
|||
dindex_to_3 =
|
|||
i = 19
|
|||
n1 =
|
|||
n3 =
|
|||
|
|||
Index to corresponding one letter amino acid name. >>> index_to_one(0) 'A' >>> index_to_one(19) 'Y' |
One letter code to index.
>>> one_to_index('A')
0
>>> one_to_index('Y')
19
|
Index to corresponding three letter amino acid name. >>> index_to_three(0) 'ALA' >>> index_to_three(19) 'TYR' |
Three letter code to index.
>>> three_to_index('ALA')
0
>>> three_to_index('TYR')
19
|
Three letter code to one letter code.
>>> three_to_one('ALA')
'A'
>>> three_to_one('TYR')
'Y'
For non-standard amino acids, you get a KeyError:
>>> three_to_one('MSE')
Traceback (most recent call last):
...
KeyError: 'MSE'
|
One letter code to three letter code.
>>> one_to_three('A')
'ALA'
>>> one_to_three('Y')
'TYR'
|
Return True if residue object/string is an amino acid.
@param residue: a L{Residue} object OR a three letter amino acid code
@type residue: L{Residue} or string
@param standard: flag to check for the 20 AA (default false)
@type standard: boolean
>>> is_aa('ALA')
True
Known three letter codes for modified amino acids are supported,
>>> is_aa('FME')
True
>>> is_aa('FME', standard=True)
False
|
|
|||
standard_aa_names
|
aa3
|
d1_to_index
|
dindex_to_1
|
d3_to_index
|
dindex_to_3
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Feb 5 17:59:46 2013 | http://epydoc.sourceforge.net |