Victor
 All Data Structures Functions Variables Friends Pages
SequenceData.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 __SequenceData_H__
19 #define __SequenceData_H__
20 
21 #include <AlignmentData.h>
22 
23 namespace Victor { namespace Align2{
24 
30  class SequenceData : public AlignmentData {
31  public:
32 
33  // CONSTRUCTORS:
34 
36  SequenceData(int n, const string &seq1, const string &seq2,
37  const string &name1 = "Seq1", const string &name2 = "Seq2");
38 
40  SequenceData(const SequenceData &orig);
41 
43  virtual ~SequenceData();
44 
45 
46  // OPERATORS:
47 
49  SequenceData& operator =(const SequenceData &orig);
50 
51 
52  // PREDICATES:
53 
55  virtual string getSequence(int n);
56 
58  virtual void calculateMatch(int i, int tbi, int j, int tbj);
59 
61  virtual void getMatch();
62 
64  virtual void outputMatch(ostream &os, bool fasta = false);
65 
67  virtual Alignment& generateMatch(double score = 0.00);
68 
69 
70  // MODIFIERS:
71 
73  virtual void copy(const SequenceData &orig);
74 
76  virtual SequenceData* newCopy();
77 
79  virtual void setSequence(string s, int n);
80 
81 
82  protected:
83 
84 
85  private:
86 
87  // ATTRIBUTES:
88 
89  string seq1;
90  string seq2;
91 
92  };
93 
94 }} // namespace
95 
96 #endif
virtual SequenceData * newCopy()
Construct a new "deep copy" of this object.
Definition: SequenceData.cc:187
SequenceData & operator=(const SequenceData &orig)
Assignment operator.
Definition: SequenceData.cc:60
virtual ~SequenceData()
Destructor.
Definition: SequenceData.cc:49
string name1
Name of target sequence.
Definition: AlignmentData.h:97
virtual Alignment & generateMatch(double score=0.00)
Generate and return an ensemble of suboptimal alignments.
Definition: SequenceData.cc:162
virtual void calculateMatch(int i, int tbi, int j, int tbj)
Calculate single match positions.
Definition: SequenceData.cc:89
Implement a simple alignment type.
Definition: Alignment.h:32
virtual void setSequence(string s, int n)
Set the sequence at position n of the vector.
Definition: SequenceData.cc:197
int n
Number of strings in the alignment.
Definition: AlignmentData.h:96
SequenceData(int n, const string &seq1, const string &seq2, const string &name1="Seq1", const string &name2="Seq2")
Default constructor.
Definition: SequenceData.cc:37
Print alignment of two sequences.
Definition: SequenceData.h:30
Base class for printing alignments.
Definition: AlignmentData.h:35
string name2
Name of template sequence.
Definition: AlignmentData.h:98
virtual string getSequence(int n)
Return the sequence at position n of the vector.
Definition: SequenceData.cc:75
virtual void outputMatch(ostream &os, bool fasta=false)
Control if the strings of the vector are similar and print them.
Definition: SequenceData.cc:123
virtual void getMatch()
Reverse the strings of the vector.
Definition: SequenceData.cc:110
virtual void copy(const SequenceData &orig)
Copy orig object to this object ("deep copy").
Definition: SequenceData.cc:177