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
|
/**
* Author: Mark Larkin
*
* Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.
*/
/**
* This class contains the sequence information. It should also contain
* the sequence name, and the encoded version.
* A vector of Sequences is passed to the Alignment object to set it up.
* CHANGES:
* Mark 22-1-2007: Added a unique sequence identifier to help with correct output
* order of sequences.
*/
#ifndef SEQUENCE_H
#define SEQUENCE_H
#include <vector>
#include <string>
#include "../general/userparams.h"
#include "../general/utils.h"
namespace clustalw
{
class Sequence
{
public:
/* Functions */
Sequence(std::string& seq, std::string& name, std::string& title);
Sequence(std::string& seq, std::string& name, std::string& title,
unsigned long id);
Sequence(std::vector<int>* encodedSequence, std::string& name, std::string& title,
unsigned long id);
void encodeSequence();
void printSequence();
std::vector<int>* getSequence();
bool isEmpty();
std::string getName();
std::string getTitle();
bool checkDNAFlag();
unsigned long getIdentifier(){return identifier;}
/* Attributes */
private:
/* Functions */
void checkIntegrity();
void copyStringIntoVector(std::vector<char>* _vectorTo, std::string* _stringFrom);
/* Attributes */
std::vector<char> _sequence;
std::vector<int> _encodedSequence;
std::string _name;
std::string _title;
unsigned long identifier;
};
}
#endif
|