Initial check in of c++ short read programming library. These classes give functional...
[htsworkflow.git] / htswanalysis / src / SRLib / read.h
1 /*
2  * Read.h:
3  * Class to handle short read data. For generalizty, the chromosome is represented as a string.
4  * It may make sense to save memeory to introduce a chromosome class, and using a pointer to reference it.
5  * 
6  * chr: name of the chromosome on which the read maps.
7  * pos: posiiton of hte read on the chromosome
8  * strand: diretionality of the read. 0 -> forward, 1 -> reverse.
9  */
10
11 #include <vector>
12 #include <string>
13 #include "loci.h"
14
15 #ifndef READ_H
16 #define READ_H
17
18 using namespace std;
19
20 class Read : public Loci {
21   public:
22     string seq;
23     bool strand;
24
25     Read(string chr, unsigned int pos, bool strand, string seq);
26     Read(const Read& r);
27     Read& operator=(const Read& r);
28
29     char operator[](size_t off) const;
30     unsigned int length() const;
31 };
32
33 typedef vector<Read> Reads;
34
35 #endif