Biskit :: Mod :: TemplateCleaner :: TemplateCleaner :: Class TemplateCleaner
[hide private]
[frames] | no frames]

Class TemplateCleaner

source code

Takes a list of PDB-files and chains identifiers.

Returns: Creates (folders and files):

Instance Methods [hide private]
  __init__(self, outFolder, log=None)
  prepareFolders(self)
Create folders needed by this class.
  logWrite(self, msg, force=1)
Write message to log.
PDBModel __chain_by_id(self, model, chainId)
Get a PDBModel with only requested chains.
str fasta_sequence(self, header, s)
Convert sequence to fasta format.
  write_tcoffee_pdb(self, model, fname)
Write CA trace PDB with SEQRES records for t_coffee.
  write_modeller_pdb(self, model, fname)
Write a PDB file for modeller.
  process_all(self, file_dic, keep_hetatoms=0)
Process PDB files in file_dic.

Class Variables [hide private]
  F_RESULT_FOLDER = '/templates'
  F_CLEANED = F_RESULT_FOLDER+ '/nr_cleaned/'
  F_MODELLER = F_RESULT_FOLDER+ '/modeller/'
  F_COFFEE = F_RESULT_FOLDER+ '/t_coffee/'
  F_FASTA = F_RESULT_FOLDER+ '/templates.fasta'

Method Details [hide private]

__init__(self, outFolder, log=None)
(Constructor)

source code 
Parameters:
  • outFolder (str) - output folder
  • log (LogFile instance or None) - None reports to STDOUT (drfault: None)

prepareFolders(self)

source code 

Create folders needed by this class.

logWrite(self, msg, force=1)

source code 

Write message to log.
Parameters:
  • msg (str) - message
  • force (1|0) - if no log, print message (default: 1)

__chain_by_id(self, model, chainId)

source code 

Get a PDBModel with only requested chains.
Parameters:
  • model (PDBModel) - original PDBModel
  • chainId (str) - chain identifier
Returns: PDBModel
PDBModel with only the specified chain

fasta_sequence(self, header, s)

source code 

Convert sequence to fasta format.
Parameters:
  • header (str) - fasta header
  • s (str) - sequence
Returns: str
fasta formated sequence

write_tcoffee_pdb(self, model, fname)

source code 

Write CA trace PDB with SEQRES records for t_coffee.
Parameters:
  • model (PDBModel) - PDBModel
  • fname (str) - filename of new PDB file

write_modeller_pdb(self, model, fname)

source code 

Write a PDB file for modeller.
Parameters:
  • model (PDBModel) - PDBModel
  • fname (str) - filename of new PDB file

process_all(self, file_dic, keep_hetatoms=0)

source code 

Process PDB files in file_dic. The PDB is read from:
  • TemplateSearcher.F_NR
and cleaned files are written to: If the file F_CLEANED already exists, this file is used to write modeller and t-coffee pdbs.
Parameters:
  • file_dic ({str:str}) - { fname : chain_id, }
  • keep_hetatoms (0|1) - keep hetatoms (default: 0)

Class Variable Details [hide private]

F_RESULT_FOLDER

Value:
'/templates'                                                           
      

F_CLEANED

Value:
F_RESULT_FOLDER+ '/nr_cleaned/'                                        
      

F_MODELLER

Value:
F_RESULT_FOLDER+ '/modeller/'                                          
      

F_COFFEE

Value:
F_RESULT_FOLDER+ '/t_coffee/'                                          
      

F_FASTA

Value:
F_RESULT_FOLDER+ '/templates.fasta'