OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
contact_prediction_score.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_SEQ_ALG_CONTACT_PREDICTION_SCORE_HH
20 #define OST_SEQ_ALG_CONTACT_PREDICTION_SCORE_HH
25 
26 /*
27  Authors: Niklaus Johner
28  Functions and objects used to calculate different scores for predicting contacts
29  from a multiple sequence alignment (MSA). Several scores are available:
30  1. Mutual information. The average product correction (apc_correction)
31  adds a correction term to account for common phylogenetic origin and inherent
32  entropy of each column. There is also a correction for small number of sequences
33  in the alignment and the possibility to use weighted mutual information.
34  2. ContactScore. For each residue pair, this score calculates the average interaction
35  energy for the amino-acid pairs in the corresponding columns of the MSA
36  3. ContactSubstitutionScore. For each residue pair, this score calculates
37  the average energy of the substitutions of amino-acid pairs in the corresponding
38  columns of the MSA.
39  */
40 namespace ost { namespace seq { namespace alg {
41 
43  std::vector <std::vector <Real> > matrix;
44  std::vector <std::pair <int,int> > sorted_indices;
45  void SetScore(int i, int j, Real score);
46  Real GetScore(int i, int j);
47  void RefreshSortedIndices();
48  ContactPredictionScoreResult(std::vector <std::vector <Real> >);
49 };
50 
54  bool zpx_transformation=true,float small_number_correction=0.05);
55 
56 }}}
57 #endif
ContactPredictionScoreResult DLLEXPORT_OST_SEQ_ALG CalculateMutualInformation(const AlignmentHandle &aln, ContactWeightMatrix w=LoadConstantContactWeightMatrix(), bool apc_correction=true, bool zpx_transformation=true, float small_number_correction=0.05)
float Real
Definition: base.hh:44
ContactPredictionScoreResult DLLEXPORT_OST_SEQ_ALG CalculateContactScore(const AlignmentHandle &aln, ContactWeightMatrix w=LoadDefaultContactWeightMatrix())
#define DLLEXPORT_OST_SEQ_ALG
std::vector< std::pair< int, int > > sorted_indices
PairSubstWeightMatrix DLLEXPORT_OST_SEQ_ALG LoadDefaultPairSubstWeightMatrix()
ContactPredictionScoreResult DLLEXPORT_OST_SEQ_ALG CalculateContactSubstitutionScore(const AlignmentHandle &aln, int ref_seq_index=0, PairSubstWeightMatrix w=LoadDefaultPairSubstWeightMatrix())
position-independet pair substitution weight matrix
ContactWeightMatrix DLLEXPORT_OST_SEQ_ALG LoadDefaultContactWeightMatrix()
statistical potential matrix containing interaction pseudo energies
representation of a multiple sequence alignemnt consisting of two or more sequences ...
matrix to weight pairs of amino-acids.
ContactWeightMatrix DLLEXPORT_OST_SEQ_ALG LoadConstantContactWeightMatrix()
weight of 1 for all amino-acid pairs and 0 for gaps.