-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadcontainer.h
64 lines (50 loc) · 1.58 KB
/
readcontainer.h
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
60
61
62
63
64
#ifndef READCONTAINER_H
#define READCONTAINER_H
#include "genome.h"
#include <vector>
#include <string>
#include <map>
#include <unordered_map>
#include <memory>
// additional data required to construct visible plot elements and
// arrange them in the output
struct PlotInfo {
uint id;
int layer; // only for linear plots
// coordinates linear | circular
float c1; // left | start angle
int c2; // y | distance
float c3; // right | end angle
};
typedef std::shared_ptr<ReadContainer> p_read_t;
class ReadContainer : public std::enable_shared_from_this<ReadContainer> {
public:
// create empty container
ReadContainer ();
ReadContainer( const chr_num_t chromosome, const chr_pos_t p5, const short len );
~ReadContainer();
void addUpstreamRead( const Genome& genome, const chr_num_t chr, const chr_pos_t pos );
void addDownstreamRead( const Genome& genome, const chr_num_t chr, const chr_pos_t pos );
friend std::ostream& operator<<( std::ostream& output, ReadContainer& rc );
link_list_t* threePrimeRead;
link_list_t* fivePrimeRead;
std::vector<unsigned short>* threePrimeRefs;
chr_num_t chromosome;
chr_pos_t fivePrimeEnd;
chr_pos_t threePrimeEnd;
unsigned char flags;
short length() const;
// uint runID;
static enum {
REVERSE = 1,
CIRCULAR = 2,
SPLIT = 4,
MULTISTRAND = 8,
DUMMY = 64,
PROCESSED = 128
} FLAGS;
PlotInfo* moreData;
int findLink( p_read_t partner, const bool downstream = true );
};
bool operator == ( const ReadContainer& a, const ReadContainer& b );
#endif // READCONTAINER_H