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 ofswamp.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 processReturns: 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: 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 thesubtargets
. Not None only ifpdb_benchmark
is not None
- workdir (str) – working directory for