swamp.search.searchjob module

class SearchJob(id, workdir, query, template_library, con_format='psicov', library_format='pdb', logger=None, query_pdb_benchmark=None, pdb_library=None, template_subset=None, algorithm='mapalign', python_interpreter='/empty/path/bin/ccp4-python')[source]

Bases: abc.ABC

Class that implements methods to search a library of templates using contact map alignment tools

The class is used to search a single query against the SWAMP library of templates. The CMO between the observed contacts for each member of the library and the predicted contacts of the query is computed.

Parameters:
  • id (str) – the id given to the MrRun and identifying this SearchJob instance
  • workdir (str) – working directory where the search will be executed and temporary files will be created
  • query (str) – file name of the query contact file
  • template_library (str) – the directory containing all the templates to be used in the search
  • con_format (str) – format of the contact prediction of the query (default ‘psicov’)
  • library_format (str) – format of the contact maps contained in the library of templates
  • query_pdb_benchmark (str) – file name of the pdb structure to be used for benchmarking (default None)
  • pdb_library (str) – directory with the pdb files of the templates used for benchmarking (default None)
  • template_subset (tuple) – a subset of templates to be used instead of the full library (default None)
  • logger (SwampLogger) – logging interface for the search (default None)
  • algorithm (str) – Indicate the alignment algorithm to be used in the search (default: ‘mapalign’)
Variables:

results (list) – a nested list with the results obtained in the search againts the library

eigen_template

A template for eigen vector file names

joblist

A list of Wrapper instances corresponding with the alignment between the query and each member of the template_list

pickle_fname

A pickle file where the results will be stored

run()[source]

Run each independent job contained at joblist

script

Instance of pyjob.Script that will be executed to complete the search

search_header

Header displayed when initiating SwampLogger

store_pickle()[source]

Store results into pickle_fname

template_list

The list of templates to be used in the search (considers template_subset)

tmp_eigen_query

A temporary file name to contain the eigen vectors of query