Victor
 All Data Structures Functions Variables Friends Pages
AtchleyDistance.h
1 /* This file is part of Victor.
2 
3  Victor is free software: you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation, either version 3 of the License, or
6  (at your option) any later version.
7 
8  Victor is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with Victor. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 
18 #ifndef __AtchleyDistance_H__
19 #define __AtchleyDistance_H__
20 
21 #include <Profile.h>
22 #include <ScoringFunction.h>
23 #include <iostream>
24 
25 namespace Victor { namespace Align2{
26 
39  public:
40 
41  // CONSTRUCTORS:
42 
44  AtchleyDistance(Profile *pro1, Profile *pro2);
45 
47  AtchleyDistance(Profile *pro1, Profile *pro2, double offset);
48 
50  AtchleyDistance(const AtchleyDistance &orig);
51 
53  virtual ~AtchleyDistance();
54 
55 
56  // OPERATORS:
57 
60 
61 
62  // PREDICATES:
63 
65  virtual double scoringSeq(int i, int j);
66 
68  virtual double getOffset();
69 
70 
71  // MODIFIERS:
72 
74  virtual void copy(const AtchleyDistance &orig);
75 
77  virtual AtchleyDistance* newCopy();
78 
80  virtual void setOffset(double off);
81 
82 
83  // HELPERS:
84 
86  virtual void pLoadFactor();
87 
88 
89  protected:
90 
91 
92  private:
93 
94  // ATTRIBUTES:
95 
96  Profile *pro1;
97  Profile *pro2;
98  double offset;
99  double factor[20][5];
100 
101  };
102 
103  // -----------------------------------------------------------------------------
104  // AtchleyDistance
105  // -----------------------------------------------------------------------------
106 
107  // PREDICATES:
108 
109  inline double AtchleyDistance::getOffset() {
110  return offset;
111  }
112 
113 
114  // MODIFIERS:
115 
116  inline void AtchleyDistance::setOffset(double off) {
117  offset = off;
118  }
119 
120 }} // namespace
121 
122 #endif
AtchleyDistance(Profile *pro1, Profile *pro2)
Default constructor.
Definition: AtchleyDistance.cc:38
virtual void copy(const AtchleyDistance &orig)
Copy orig object to this object ("deep copy").
Definition: AtchleyDistance.cc:133
AtchleyDistance & operator=(const AtchleyDistance &orig)
Assignment operator.
Definition: AtchleyDistance.cc:72
virtual double scoringSeq(int i, int j)
Calculate scores to create matrix values.
Definition: AtchleyDistance.cc:88
virtual AtchleyDistance * newCopy()
Construct a new "deep copy" of this object.
Definition: AtchleyDistance.cc:151
Calculate a frequency profile or PSSM.
Definition: Profile.h:35
virtual void pLoadFactor()
Helper function used to load Atchley metric factor.
Definition: AtchleyDistance.cc:162
virtual void setOffset(double off)
Set offset.
Definition: AtchleyDistance.h:116
Base class for scoring functions.
Definition: ScoringFunction.h:31
virtual ~AtchleyDistance()
Destructor.
Definition: AtchleyDistance.cc:61
virtual double getOffset()
Return offset.
Definition: AtchleyDistance.h:109
Calculate scores for profile to profile alignment using sequence metric factor.
Definition: AtchleyDistance.h:38