AminoAcidScore

This class serves for a score calculation of sequence of amino acid pairs. The score can be based on the PAM250 or BLOSUM62 matrix or any other user defined score matrix.

[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

KEYWORD
AUTHORS
CHANGES LOG
USAGE

Class Summary

class AminoAcidScore

{
public:
class ScoreMatrix ;
float score(int i,int j)const ;
float minValue()const ;
float maxValue()const ;
void normDiagonal()
void reverseValueDiagonal()
class Hydrophobic;
class PAM250;
class BLOSUM62;
template< class TMolecule,class TMatch> float calcScore( const TMolecule& pdbModel, const TMolecule& pdbTarget, const Match& match, const ScoreMatrix& m_scoreMtrx)const
protected:
}; // AminoAcidScore

Back to the top of AminoAcidScore


KEYWORD

Atom, Match, ScoreMatrix

Back to the top of AminoAcidScore


AUTHORS

Yuval Inbar (inbaryuv@post.tau.ac.il) Maxim Shatsky (maxshats@post.tau.ac.il)

copyright: SAMBA Group , Tel-Aviv Univ. Israel, 1997, 2003.

Back to the top of AminoAcidScore


CHANGES LOG

Back to the top of AminoAcidScore


USAGE

Before calculating the score of two matched amino acid sequences,the user should define a score matrix.This is a 20x20 (more exact MAX_AA x MAX_AA, to allow GAP, OTHER) matrix M when M[i,j] which defines a value for AminoAcid_i against AminoAcid_j (0<=i,j<=19). The amino acids are indexed in the following way (see AminoAcid class for enum RESIDUE_INDEX): ARG,LYS,GLU,GLN,ASP,ASN,PRO,GLY,SER, THR,HIS,ALA,ILE,LEU,VAL,PHE,CYS,MET,TYR,TRP. (ARG=0,...,TRP=19) It means that M[3,0]=M[GLN,ARG] (to map amino acid to proper index see AminoAcid class) . There is a predefined PAM250 score matrix AminoAcidScore::PAM250 ,someone can use it as a template for creating another score matrix.

 
 vector<Atom> vModel;
 vector<Atom> vTarget;
 //...
 //fill atom information into vectors vModel,vTarget  
 //...
 vector<Match*> vMatches; 
 //..
 //find some matches 
 //...

 AminoAcidScore::PAM250 pam250; //define score matrix
 AminoAcidScore seqScore;

 //calculate and output PAM250 score for each found match. 
 for(int i=0;i < vMatches.size();i++){
  float score=seqScore.calcScore(vModel,
                          vTarget,
                          *vMatches[i],
                          pam250);
  score=score/vMatches[i].size(); //normolize the score
  cout<<score<<endl;
 }

Function calcScore is a template that is defined by 2 classes: ,class TMatch>. For example: TMolecule=vector<Atom>, TMatch=Match.

Class TMolecule should support the following:

 Molecule<Atom> pdbRec;
 pdbRec[int index].residueType(); //this function returns one-letter abbreviation of amino acid residue.

Class TMatch should support the following:

 Match match;
 match[i].model; //returns index in  pdbRec
 match[i].scene; //returns index in  pdbRec

If one wishes to create its own score matrix just see how PAM250 class is defined.

Back to the top of AminoAcidScore


class ScoreMatrix ;

ScoreMatrix class defines the score for each pair of amino acid residues

  class ScoreMatrix{
  protected:
    float m_fScore[MAX_AA][MAX_AA];
    float m_fMax;
    float m_fMin;

Back to the top of AminoAcidScore


float score(int i,int j)const ;

Returns the score

    float score(int i,int j)const                        
;

Function is currently defined inline.


Back to the top of AminoAcidScore


float minValue()const ;

Returns min score value

    float minValue()const                ;

Function is currently defined inline.


Back to the top of AminoAcidScore


float maxValue()const ;

Return max score value

    float maxValue()const                ;

Function is currently defined inline.


Back to the top of AminoAcidScore


void normDiagonal()

sets all diagonal elements to sum(a_ii)/20 usefull for computing conservation score.

    void normDiagonal()                                                              

Back to the top of AminoAcidScore


void reverseValueDiagonal()

reverses the value of diagonal elements, i.e. the higest value becomes the lowest value. usefull for computing conservation score.

    void reverseValueDiagonal()                                                                                                                                                                                                                                                           

Back to the top of AminoAcidScore


class Hydrophobic;

Extends ScoreMatrix. The score is defined in the following way: Hydrophobic matched with Hydrophobic receives 1. Hydrophilic matched with Hydrophilic receives 1. Otherwise -1.

  class Hydrophobic:public ScoreMatrix{
  public:
    ////Constructor. Complexity O(400).
    Hydrophobic();
  };

Function is currently defined inline.


Back to the top of AminoAcidScore


class PAM250;

Extends ScoreMatrix. The score is defined as in PAM250 matrix.

  class PAM250:public ScoreMatrix{
  public:
    ////Constructor. Complexity O(400).
    PAM250();
  };

Function is currently defined inline.


Back to the top of AminoAcidScore


class BLOSUM62;

Extends ScoreMatrix. The score is defined as in BLOSUM62 matrix.

  class BLOSUM62:public ScoreMatrix{
  public:
    ////Constructor. Complexity O(400).
    BLOSUM62();
  };

Function is currently defined inline.


Back to the top of AminoAcidScore


template< class TMolecule,class TMatch> float calcScore( const TMolecule& pdbModel, const TMolecule& pdbTarget, const Match& match, const ScoreMatrix& m_scoreMtrx)const

Returns the score of two matched sequences.Complexity O(match.size()).

  template< class TMolecule,class TMatch>
  float calcScore( const TMolecule& pdbModel,
                   const TMolecule& pdbTarget,
		   const Match& match,
                   const ScoreMatrix& m_scoreMtrx)const                    

Back to the top of AminoAcidScore


All Members

public:
class ScoreMatrix ;
float score(int i,int j)const ;
float minValue()const ;
float maxValue()const ;
void normDiagonal()
void reverseValueDiagonal()
class Hydrophobic;
class PAM250;
class BLOSUM62;
template< class TMolecule,class TMatch> float calcScore( const TMolecule& pdbModel, const TMolecule& pdbTarget, const Match& match, const ScoreMatrix& m_scoreMtrx)const
protected:

Back to the top of AminoAcidScore


Ancestors

Class does not inherit from any other class.

Back to the top of AminoAcidScore


Descendants

Class is not inherited by any others.

Back to the top of AminoAcidScore


Generated from source by the Cocoon utilities on Sun Nov 15 13:35:25 2009 .

Report problems to jkotula@unimax.com