NCBI C++ ToolKit
cuDmAlignedOptimalScore.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef CU_DM_ALIGNED_OPTIMAL_SCORE__HPP
2 #define CU_DM_ALIGNED_OPTIMAL_SCORE__HPP
3 
4 /* $Id: cuDmAlignedOptimalScore.hpp 33815 2007-05-04 17:18:18Z kazimird $
5 * ===========================================================================
6 *
7 * PUBLIC DOMAIN NOTICE
8 * National Center for Biotechnology Information
9 *
10 * This software/database is a "United States Government Work" under the
11 * terms of the United States Copyright Act. It was written as part of
12 * the author's official duties as a United States Government employee and
13 * thus cannot be copyrighted. This software/database is freely available
14 * to the public for use. The National Library of Medicine and the U.S.
15 * Government have not placed any restriction on its use or reproduction.
16 *
17 * Although all reasonable efforts have been taken to ensure the accuracy
18 * and reliability of the software and data, the NLM and the U.S.
19 * Government do not and cannot warrant the performance or results that
20 * may be obtained by using this software or data. The NLM and the U.S.
21 * Government disclaim all warranties, express or implied, including
22 * warranties of performance, merchantability or fitness for any particular
23 * purpose.
24 *
25 * Please cite the author in any work or product based on this material.
26 *
27 * ===========================================================================
28 *
29 * Author: Chris Lanczycki
30 *
31 * File Description: cdt_dm_alignedscore.hpp
32 *
33 * Concrete distance matrix class.
34 * Distance is computed based on a scoring matrix, where the
35 * score is based on an existing alignment in a CD. A pair of parameters
36 * to extend an alignment at the N-terminal and C-terminal end can be specified.
37 * Different substitution matrices can be defined (see
38 * cdt_scoring_matrices.hpp for the supported scoring matrices).
39 *
40 */
41 
42 
46 
49 BEGIN_SCOPE(cd_utils)
50 
51 // The pairwise score between two rows in an alignment is the sum over the
52 // scores of each pair of aligned residues:
53 //
54 // d[i][j] = max_Score_for_CD - sum(k)( scoring_matrix(i_k, j_k))
55 //
56 // where x_k is the kth aligned residue of row x. The offset is to make
57 // high scores map to short distances. Although note that each row will
58 // in general have a different score for an exact match, making d=0 ambiguous.
59 
61 
62  static const EDistMethod DIST_METHOD;
63 
64 public:
66  void setBlockExtender(BlockExtender* be);
67  virtual bool ComputeMatrix(pProgressFunction pFunc);
68  virtual ~DMAlignedOptimalScore();
69 
70 private:
71  //the pair of block and sequence index
72  /* moved to algBlockExtender.hpp
73  typedef pair<Block, int> ScoringTerm;
74  double scoreBlockPair(const ScoringTerm& term1, const ScoringTerm& term, int** ppScores);
75  bool getScoringTerm(int row, int blockNum, int nExt, int cExt, ScoringTerm& st);
76  double optimizeBlockScore(int row1, int row2, int block, int** ppScores);
77  double scoreOneRowPair(int row1, int row2, int** ppScores); */
78  void convertScoreToDistance();
79  void initDMAlignedScore(EScoreMatrixType type, int nTermExt, int cTermExt);
80 
82 };
83 
84 END_SCOPE(cd_utils)
86 
87 #endif /* CU_DM_ALIGNED_OPTIMAL_SCORE__HPP */
static const EDistMethod DIST_METHOD
EDistMethod
Definition: cuDistmat.hpp:60
void(* pProgressFunction)(int Num, int Total)
Definition: cuDistmat.hpp:47
USING_SCOPE(objects)
const EScoreMatrixType GLOBAL_DEFAULT_SCORE_MATRIX
EScoreMatrixType
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define NCBI_CDUTILS_EXPORT
Definition: ncbi_export.h:376
Definition: type.c:6
Modified on Fri Sep 20 14:58:07 2024 by modify_doxy.py rev. 669887