-
Notifications
You must be signed in to change notification settings - Fork 0
/
linplot2.h
44 lines (32 loc) · 1.27 KB
/
linplot2.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
#ifndef LINPLOT_H
#define LINPLOT_H
#include "vplot2.h"
#include "utils.h"
#include "readcontainer.h"
#include <memory>
#include <vector>
#include <map>
#include <unordered_set>
class LinearPlot : public vPlot {
public:
LinearPlot(int dx=40, int dy=40); // constructor with plot parameters
void fromRead ( p_read_t seed, Genome* genome ); // construct tree from seed element
void writeEps ( const std::string& fileName );
void addToSummary ( std::ostream & out, std::string title );
private:
void assignLayers (); // apply longest path algorithm
// void correctDepths (); // correct layer assignments from multisplits
void insertDummies (); // neccessary for layer-spanning nodes (see Sugiyama)
std::vector<std::vector<bool>> transitiveReduction (); // to avoid visual skew by duplicate links
void barycenterCoords (); // heuristic to place nodes nicely
void createPlotCoords (); // transform logical layer/barycenter to plottable x- and y- cordinates
std::map<chr_pos_t, std::vector<p_read_t>> layeredGraph;
std::vector<p_read_t> flatGraph;
std::shared_ptr<Rect> boundingRect();
Rect br;
int dx, dy;
// int minx, maxx, miny, maxy;
uint nFilter;
char nextID;
};
#endif // LINPLOT_H