File: ObjectiveScore.h

package info (click to toggle)
clustalx 2.1%2Blgpl-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,320 kB
  • sloc: cpp: 40,050; sh: 163; xml: 102; makefile: 16
file content (51 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
 * Author: Mark Larkin
 * 
 * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
 */
/**
 * This ObjectiveScore class is used to provide an objective function to score 
 * an alignment.
 * It is used with iteration to improve an alignment.
 */
 
#ifndef OBJECTIVESCORE_H
#define OBJECTIVESCORE_H
#include "../general/clustalw.h"
#include "../substitutionMatrix/globalmatrix.h" 
namespace clustalw
{

class Alignment;
typedef struct
{
    int first;
    int second; 
} Pair;  

class ObjectiveScore
{   
    public:
        ObjectiveScore();
        long getScore(const Alignment* alnToScore);    
    private:
        
        float scoreLetters(int seq1, int seq2);
        float scoreGaps(int seq1, int seq2);
        void calcNormalisedSeqWeights(const vector<int>* seqWeight, 
                                      vector<float>* normSeqWeight);
        long score;
        int matrix[NUMRES][NUMRES];
        const Alignment* alignToScore;
        long scale;
        int weightScale;
        int sagaGapEx, sagaGapOp;
        int gapPos1, gapPos2;
        static const int BOTHGAPS = 0;
        static const int NOGAPS = -1;
        static const int GAPINSEQB = 1;
        static const int GAPINSEQA = 2;
};

}
#endif