Biskit :: ChainSeparator :: ChainSeparator :: Class ChainSeparator
[hide private]
[frames] | no frames]

Class ChainSeparator

source code

Open PDB file; give back one chain whenever next() is called. This class is used by the pdb2xplor script.

This class constitutes vintage code. See Biskit.PDBCleaner and Biskit.Mod.TemplateCleaner for a more recent implementation of PDB cleaning.


To Do: The removal of duplicate chains should be transferred to the PDBCleaner so that this class can be retired

Instance Methods [hide private]
  __init__(self, fname, outPath='', chainIdOffset=0, capBreaks=0, chainMask=0, log=None)
str pdbname(self)
Extract pdb code from file name.
  _expressionCheck(self, findExpression, findClean)
Check and report if the regular expression 'findExpression' exists in the PDB-file.
  _hetatomCheck(self)
Check and report if there are any none-water HETATMs in the PDB-file
  _compareSequences(self, seq1, seq2)
Returns identity (0.0 - 1.0) between the two sequences @rtype : float
int _removeDuplicateChains(self, chainMask=None)
Get rid of identical chains by comparing all chains with Blast2seq.
  _assign_seg_ids(self)
Assign new segment id to each chain.
list of int _sequentialDist(self, chain, cutoff, atom)
Calculate sequential atom-atom distance, report residues with longer distance than cutoff (chain break positions).
  _separateChainBreaks(self)
Separate chains with breaks into 2 chains.
  __nCap(self, pep_chain)
Add acetyl capping to N-terminal of peptide chain
  __cCap(self, pep_chain)
Add methyle amine capping to C-terminal of peptide chain
  extractWaters(self)
Write waters into separate pdb file, called |pdbCode|_waters.pdb.
chain object OR None next(self)
Return next 'clean', non-redundant, non-broken chain from PDB

Method Details [hide private]

__init__(self, fname, outPath='', chainIdOffset=0, capBreaks=0, chainMask=0, log=None)
(Constructor)

source code 
Parameters:
  • fname (str) - pdb filename
  • outPath (str) - path for log file
  • chainIdOffset (int) - start chain numbering at this offset
  • capBreaks (0|1) - add ACE and NME to N- and C-term. of chain breaks [0]
  • chainMask ([1|0]) - chain mask for overriding the default sequence identity [None]
  • log (object) - LogFile object

pdbname(self)

source code 

Extract pdb code from file name.
Returns: str
(assumed) pdb code

_expressionCheck(self, findExpression, findClean)

source code 

Check and report if the regular expression 'findExpression' exists in the PDB-file. Use this to locate data in the REMARK section of a pdb file. Prints a warning to stdOut if the regular expression is found.
Parameters:
  • findExpression (str) - regular expression
  • findClean (str) - clean name of regular expression

_hetatomCheck(self)

source code 

Check and report if there are any none-water HETATMs in the PDB-file

_compareSequences(self, seq1, seq2)

source code 
Parameters:
  • seq1 (str) - sequence 1 to compare
  • seq2 (str) - sequence 1 to compare
Returns:
identity (0.0 - 1.0) between the two sequences @rtype : float

_removeDuplicateChains(self, chainMask=None)

source code 

Get rid of identical chains by comparing all chains with Blast2seq.
Parameters:
  • chainMask ([int]) - chain mask for overriding the chain identity checking (default: None)
Returns: int
number of chains removed

_assign_seg_ids(self)

source code 

Assign new segment id to each chain.

_sequentialDist(self, chain, cutoff, atom)

source code 

Calculate sequential atom-atom distance, report residues with longer distance than cutoff (chain break positions).
Parameters:
  • chain (object) - Scientific.IO.PDB.PeptideChain object
  • cutoff (float) - threshold for reporting gap (chain break)
  • atom (str) - type of atoms to check (i.e. 'CA')
Returns: list of int
list of chain break positions (residue index for each first residue of two that are too distant)

_separateChainBreaks(self)

source code 

Separate chains with breaks into 2 chains. The new chain(s) is/are added to the internal PDB instance (self.chains).

__nCap(self, pep_chain)

source code 

Add acetyl capping to N-terminal of peptide chain

__cCap(self, pep_chain)

source code 

Add methyle amine capping to C-terminal of peptide chain

extractWaters(self)

source code 

Write waters into separate pdb file, called |pdbCode|_waters.pdb.

next(self)

source code 

Return next 'clean', non-redundant, non-broken chain from PDB
Returns: chain object OR None
Scientific.IO.PDB.PeptideChain, completed chain OR if no chain is left