File: ProfileBase.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 (78 lines) | stat: -rw-r--r-- 2,399 bytes parent folder | download | duplicates (11)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/**
 * Author: Mark Larkin
 * 
 * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
 */
/**
 * The reason why we have 2 different types of profiles is because one of them 
 * (ProfileWithSub) has the substitution matrix information already in it. This
 * increases the performance when aligning 2 profile columns.
 */
#ifndef PROFILEBASE_H
#define PROFILEBASE_H

#include "../alignment/Alignment.h"

namespace clustalw
{

class ProfileBase
{
    public:
        /* Functions */
        ProfileBase(int prfLen, int firstS, int lastS);
        void calcGapCoeff(SeqArray* seqArray, vector<int>* gaps,  bool useStructPenalties,
                          vector<char>* gapPenaltyMask, int gapCoef, int lenCoef);
        const SeqArray* getProfilePtr(){return &profile;};
        void resetProfile(){for(int i = 0; i < (int)profile.size();i++)
                            {
                                profile[i].clear();
                            }
                            profile.clear();
                            };
        /* Attributes */

    protected:
        /* Functions */
        void calcVPenalties(SeqArray* aln, vector<int>* weight); 
        void calcResidueSpecificPen(SeqArray* aln, vector<int>* weight); 
        void calcHydrophilicPen(SeqArray* aln, vector<int>* weight); 
        int localPenalty(int penalty, int n, vector<int>* resWeight, vector<int>* hydWeight,
                         vector<int>* vWeight);  
        float percentId(vector<int>* s1, vector<int>* s2);

        /* Attributes */
        vector<vector<int> > profile;

        /* number of residues used for a window for the variable zone
           penalties */
        int vwindow;
        /* vll is the lower limit for the variable zone penalties
           (vll < pen < 1.0) */
        int vll;

        /* "Pascarella and Argos" residue specific gap modification
           factors. See Table 1 in the ClustalW 1994 NAR paper
           http://www.ncbi.nlm.nih.gov/pubmed/7984417
        */
        string pascarellaRes;
        vector<int> pascarellaProb;

        vector<vector<int> > vlut;
        static const int numLetters = 26;
        float reducedGap;
        bool nVarPen;
        bool nHydPen;
        bool nPrefPen;
        int gdist;
        int prfLength;
        int firstSeq, lastSeq;
    private:
        /* Functions */

        /* Attributes */

};

}
#endif