Package csb :: Package bio :: Package fragments :: Module isites :: Class Cluster
[frames] | no frames]

Class Cluster

source code

object --+
         |
        Cluster

Object representation of an I-Sites library peptide fragment.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
__lt__(self, other) source code
 
attach_structure(self, pdb_file)
Parse the paradigm's pdb_file and attach structural data to cluster.representative (source and structure attributes).
source code
float
city_block(self, profile, start=0)
Compute the similarity score of profile matching self's profile using the exponential city block metric (see Baker 1995).
source code
float
cross_entropy(self, profile, start=0)
Compute the similarity score of profile matching self's profile using the cross entropy method.
source code
function
fragment_comparer(self, mode=Bystroff)
Return a callable fragment comparer that implements the specified comparison mode.
source code
float
profile_similarity(self, profile, start=0)
Compute the similarity score of profile matching self's profile (see Bystroff 2001, 2008).
source code
float
sequence_similarity(self, sequence, start=0)
Compute the log-odds score of sequence matching self's profile.
source code
 
serialize(self, file)
Serialize the cluster to a file.
source code
list
slide_over(self, target, mode=Bystroff)
Find profile and structural matches by sliding the fragment over a specified target chain.
source code
list
slide_over_fast(self, target, mode=Bystroff)
Find profile matches only (do not compute RMSD) by sliding the fragment over a specified target chain.
source code
float
sum_of_odds(self, profile, start=0)
Compute the similarity score of profile matching self's profile using the log-sum-of-odds method (Soeding).
source code
hmm.ProfileHMM
to_hmm(self)
Convert this fragment into a profile HMM segment.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods
Cluster
deserialize(file)
Load a cluster from a serialized object.
source code
Cluster
from_hmm(source, id, start=None, end=None, rep_accession=None, rep_chain=None, alpha=0.2)
Build a fragment from a Profile HMM.
source code
Properties
  has_structure
  isite
  length

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

attach_structure(self, pdb_file)

source code 

Parse the paradigm's pdb_file and attach structural data to cluster.representative (source and structure attributes).

Parameters:
  • pdb_file (str) - source PDB file containing the structure of the paradigm
Raises:

city_block(self, profile, start=0)

source code 

Compute the similarity score of profile matching self's profile using the exponential city block metric (see Baker 1995).

Parameters:
  • profile (ProteinProfile) - subject profile
  • start (int) - do the comparison starting with this offset in the subject
Returns: float
the city block similarity between the profiles

cross_entropy(self, profile, start=0)

source code 

Compute the similarity score of profile matching self's profile using the cross entropy method.

Parameters:
  • profile (ProteinProfile) - subject profile
  • start (int) - do the comparison starting with this offset in the subject
Returns: float
the cross entropy between the profiles

deserialize(file)
Static Method

source code 

Load a cluster from a serialized object.

Parameters:
  • file (str) - source file name
Returns: Cluster
deserialized fragment object

fragment_comparer(self, mode=Bystroff)

source code 

Return a callable fragment comparer that implements the specified comparison mode.

Parameters:
Returns: function
the proper comparison function which implements fragment comparison with the mode method
Raises:
  • ValueError - on invalid mode specified

from_hmm(source, id, start=None, end=None, rep_accession=None, rep_chain=None, alpha=0.2)
Static Method

source code 

Build a fragment from a Profile HMM.

Parameters:
  • source (hmm.ProfileHMM, hmm.ProfileHMMSegment) - the HMM to convert
  • id (int) - ID of the new fragment
  • start (int) - start position (optional)
  • end (int) - end position (optional)
  • rep_accession (str) - accession number for cluster.representative
  • rep_chain (str) - chain ID for cluster.representative
  • alpha (float) - alpha pseudocount for cluster.profile.pssm
Returns: Cluster
an I-Sites cluster wrapper
Raises:
  • TypeError - when the HMM's structural data is missing or interrupted

profile_similarity(self, profile, start=0)

source code 

Compute the similarity score of profile matching self's profile (see Bystroff 2001, 2008).

Parameters:
  • profile (ProteinProfile) - subject profile, built with alpha=0.5
  • start (int) - do the comparison starting with this offset in the subject
Returns: float
similarity score calculated with Bystroff's metric
Raises:
  • ValueError - on mismatch in the amino acid content at a given column in both profiles; or when the subject has not been created with alpha=0.5

sequence_similarity(self, sequence, start=0)

source code 

Compute the log-odds score of sequence matching self's profile.

Parameters:
  • sequence (str) - subject sequence
  • start (int) - do the comparison starting with this offset in the sequence
Returns: float
log-odds score

serialize(self, file)

source code 

Serialize the cluster to a file.

Parameters:
  • file (str) - output file name

slide_over(self, target, mode=Bystroff)

source code 

Find profile and structural matches by sliding the fragment over a specified target chain.

Parameters:
Returns: list
a list of ProfileMatches

slide_over_fast(self, target, mode=Bystroff)

source code 

Find profile matches only (do not compute RMSD) by sliding the fragment over a specified target chain.

Parameters:
Returns: list
a list of ProfileMatches

sum_of_odds(self, profile, start=0)

source code 

Compute the similarity score of profile matching self's profile using the log-sum-of-odds method (Soeding).

Parameters:
  • profile (ProteinProfile) - subject profile
  • start (int) - do the comparison starting with this offset in the subject
Returns: float
the log-sum-of-odds similarity between the profiles

to_hmm(self)

source code 

Convert this fragment into a profile HMM segment. Each column in the fragment's profile becomes a Match state with equivalent emissions. However, all Match states are connected with a fixed transition probability of 100%.

Returns: hmm.ProfileHMM
an HMM wrapper around the cluster's profile

Property Details

has_structure

Get Method:
unreachable.has_structure(self)

isite

Get Method:
unreachable.isite(self)

length

Get Method:
unreachable.length(self)