Victor
 All Data Structures Functions Variables Friends Pages
AtchleyCorrelation.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 __AtchleyCorrelation_H__
19 #define __AtchleyCorrelation_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  AtchleyCorrelation(Profile *pro1, Profile *pro2);
45 
47  AtchleyCorrelation(Profile *pro1, Profile *pro2, double offset);
48 
51 
53  virtual ~AtchleyCorrelation();
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 AtchleyCorrelation &orig);
75 
77  virtual AtchleyCorrelation* 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  // AtchleyCorrelation
105  // -----------------------------------------------------------------------------
106 
107  // PREDICATES:
108 
109  inline double
111  return offset;
112  }
113 
114 
115  // MODIFIERS:
116 
117  inline void
119  offset = off;
120  }
121 
122 }} // namespace
123 
124 #endif
virtual void setOffset(double off)
Set offset.
Definition: AtchleyCorrelation.h:118
virtual ~AtchleyCorrelation()
Destructor.
Definition: AtchleyCorrelation.cc:62
AtchleyCorrelation & operator=(const AtchleyCorrelation &orig)
Assignment operator.
Definition: AtchleyCorrelation.cc:73
Calculate a frequency profile or PSSM.
Definition: Profile.h:35
virtual void copy(const AtchleyCorrelation &orig)
Copy orig object to this object ("deep copy").
Definition: AtchleyCorrelation.cc:145
AtchleyCorrelation(Profile *pro1, Profile *pro2)
Default constructor.
Definition: AtchleyCorrelation.cc:39
virtual double scoringSeq(int i, int j)
Calculate scores to create matrix values.
Definition: AtchleyCorrelation.cc:89
virtual void pLoadFactor()
Helper function used to load Atchley metric factor.
Definition: AtchleyCorrelation.cc:174
virtual double getOffset()
Return offset.
Definition: AtchleyCorrelation.h:110
Base class for scoring functions.
Definition: ScoringFunction.h:31
Calculate scores for profile to profile alignment using sequence metric factor.
Definition: AtchleyCorrelation.h:38
virtual AtchleyCorrelation * newCopy()
Construct a new "deep copy" of this object.
Definition: AtchleyCorrelation.cc:163