swamp.utils.targetsplit module

class TargetSplit(workdir, conpred, sspred, conformat='psicov', pdb_benchmark=None, logger=None)[source]

Bases: object

Class to split a given target protein into pairs of TM helices and store their interhelical contact information

Parameters:
  • workdir (str) – working directory for TargetSplit instance
  • conpred (str) – contact prediction file name for the target
  • sspred (str) – target’s secondary structure prediction file name (must be topcons format!)
  • conformat (str) – format of the contact prediction file (default: ‘psicov’)
  • pdb_benchmark (str) – target’s pdb file to be used for benchmarking purposes (default: None)
  • logger (SwampLogger) – logging interface for the instance (default None)
Variables:
  • subtargets (list) – a list of subtarget contact maps that the target has been splitted into
  • error (bool) – if True an error has occurred along the process
  • sspred (TopconsParser) – a topcons parser
  • conpred (conkit.core.ContactMap) – a contactmap
Example:
>>> from swamp.utils.targetsplit import TargetSplit
>>> splitter = TargetSplit('<workdir>', '<conpred>', '<sspred>')
>>> splitter.split()
extract_pdb_tmhelices(pdbfile)[source]

Extract gemmi.Structure hierarchies that correspond with each of the of swamp.utils.targetsplit.TargetSplit.sspred.tmhelices

Parameters:pdbfile (str) – location of the pdbfile of the target structure
get_helical_pair(helical_pair)[source]

Method to extract the residues spanning a given helical pair

Parameters:helical_pair (tuple) – pair of swamp.parsers.topconsparser.TopconsParser.tmhelices to process
Returns:a tuple where each element corresponds with the residue sequence numbers of the regions where the tm helices of the pair span (tuple)
get_interhelical_contacts(helical_pair, score_threshold=0.45)[source]

Get the interhelical contacts beyond certain score threshold of a helical pair

Parameters:
  • helical_pair (tuple) – pair of swamp.parsers.topconsparser.TopconsParser.tmhelices to process
  • score_threshold (float) – the conkit.core.Contact.raw_score threshold to include a contact in the resulting contact map
Returns:

a conkit.core.ContactMap instance with the interhelical contacts that met the score threshold (conkit.core.ContactMap)

ranked_subtargets

A list of the subtargets sorted according to the number of interhelical contacts

split()[source]

Split the target into its contacting helical pairs. It will probe all possible combinations of swamp.utils.targetsplit.TargetSplit.sspred.tmhelices

subtargets_pdb

List containing the gemmi.Structure hierarchies of the subtargets. Not None only if pdb_benchmark is not None