OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
ContactScorer Class Reference

Public Member Functions

def __init__
 
def cent1
 
def chem_groups
 
def cent2
 
def alns
 
def ScoreICS
 
def ScoreICSInterface
 
def ICSFromFlatMapping
 
def ScoreIPS
 
def ScoreIPSInterface
 
def IPSFromFlatMapping
 

Static Public Member Functions

def FromMappingResult
 

Detailed Description

Helper object to compute Contact scores

Tightly integrated into the mechanisms from the chain_mapping module.
The prefered way to derive an object of type :class:`ContactScorer` is
through the static constructor: :func:`~FromMappingResult`.

Usage is the same as for :class:`ost.mol.alg.QSScorer`

Definition at line 379 of file contact_score.py.

Constructor & Destructor Documentation

def __init__ (   self,
  target,
  chem_groups,
  model,
  alns,
  contact_mode = "aa",
  contact_d = 5.0 
)

Definition at line 390 of file contact_score.py.

Member Function Documentation

def alns (   self)
Alignments between chains in :attr:`~cent1` and :attr:`~cent2`

Provided at object construction. Each alignment is accessible with
``alns[(t_chain,m_chain)]``. First sequence is the sequence of the
respective chain in :attr:`~cent1`, second sequence the one from
:attr:`~cent2`.

:type: :class:`dict` with key: :class:`tuple` of :class:`str`, value:
       :class:`ost.seq.AlignmentHandle`

Definition at line 473 of file contact_score.py.

def cent1 (   self)
Represents *target*

:type: :class:`ContactEntity`

Definition at line 447 of file contact_score.py.

def cent2 (   self)
Represents *model*

:type: :class:`ContactEntity`

Definition at line 465 of file contact_score.py.

def chem_groups (   self)
Groups of chemically equivalent chains in *target*

Provided at object construction

:type: :class:`list` of :class:`list` of :class:`str`

Definition at line 455 of file contact_score.py.

def FromMappingResult (   mapping_result,
  contact_mode = "aa",
  contact_d = 5.0 
)
static
The preferred way to get a :class:`ContactScorer`

Static constructor that derives an object of type :class:`ContactScorer`
using a :class:`ost.mol.alg.chain_mapping.MappingResult`

:param mapping_result: Data source
:type mapping_result: :class:`ost.mol.alg.chain_mapping.MappingResult`

Definition at line 429 of file contact_score.py.

def ICSFromFlatMapping (   self,
  flat_mapping 
)
Same as :func:`ScoreICS` but with flat mapping

:param flat_mapping: Dictionary with target chain names as keys and
             the mapped model chain names as value
:type flat_mapping: :class:`dict` with :class:`str` as key and value
:returns: Result object of type :class:`ContactScorerResultICS`

Definition at line 575 of file contact_score.py.

def IPSFromFlatMapping (   self,
  flat_mapping 
)
Same as :func:`ScoreIPS` but with flat mapping

:param flat_mapping: Dictionary with target chain names as keys and
             the mapped model chain names as value
:type flat_mapping: :class:`dict` with :class:`str` as key and value
:returns: Result object of type :class:`ContactScorerResultIPS`

Definition at line 700 of file contact_score.py.

def ScoreICS (   self,
  mapping,
  check = True 
)
Computes ICS given chain mapping

Again, the preferred way is to get *mapping* is from an object
of type :class:`ost.mol.alg.chain_mapping.MappingResult`.

:param mapping: see 
        :attr:`ost.mol.alg.chain_mapping.MappingResult.mapping`
:type mapping: :class:`list` of :class:`list` of :class:`str`
:param check: Perform input checks, can be disabled for speed purposes
      if you know what you're doing.
:type check: :class:`bool`
:returns: Result object of type :class:`ContactScorerResultICS`

Definition at line 486 of file contact_score.py.

def ScoreICSInterface (   self,
  trg_ch1,
  trg_ch2,
  mdl_ch1,
  mdl_ch2 
)
Computes ICS scores only considering one interface

This only works for interfaces that are computed in :func:`Score`, i.e.
interfaces for which the alignments are set up correctly.

:param trg_ch1: Name of first interface chain in target
:type trg_ch1: :class:`str`
:param trg_ch2: Name of second interface chain in target
:type trg_ch2: :class:`str`
:param mdl_ch1: Name of first interface chain in model
:type mdl_ch1: :class:`str`
:param mdl_ch2: Name of second interface chain in model
:type mdl_ch2: :class:`str`
:returns: Result object of type :class:`ContactScorerResultICS`
:raises: :class:`RuntimeError` if no aln for trg_ch1/mdl_ch1 or
 trg_ch2/mdl_ch2 is available.

Definition at line 523 of file contact_score.py.

def ScoreIPS (   self,
  mapping,
  check = True 
)
Computes IPS given chain mapping

Again, the preferred way is to get *mapping* is from an object
of type :class:`ost.mol.alg.chain_mapping.MappingResult`.

:param mapping: see 
        :attr:`ost.mol.alg.chain_mapping.MappingResult.mapping`
:type mapping: :class:`list` of :class:`list` of :class:`str`
:param check: Perform input checks, can be disabled for speed purposes
      if you know what you're doing.
:type check: :class:`bool`
:returns: Result object of type :class:`ContactScorerResultIPS`

Definition at line 610 of file contact_score.py.

def ScoreIPSInterface (   self,
  trg_ch1,
  trg_ch2,
  mdl_ch1,
  mdl_ch2 
)
Computes IPS scores only considering one interface

This only works for interfaces that are computed in :func:`Score`, i.e.
interfaces for which the alignments are set up correctly.

:param trg_ch1: Name of first interface chain in target
:type trg_ch1: :class:`str`
:param trg_ch2: Name of second interface chain in target
:type trg_ch2: :class:`str`
:param mdl_ch1: Name of first interface chain in model
:type mdl_ch1: :class:`str`
:param mdl_ch2: Name of second interface chain in model
:type mdl_ch2: :class:`str`
:returns: Result object of type :class:`ContactScorerResultIPS`
:raises: :class:`RuntimeError` if no aln for trg_ch1/mdl_ch1 or
 trg_ch2/mdl_ch2 is available.

Definition at line 647 of file contact_score.py.


The documentation for this class was generated from the following file: