-
Notifications
You must be signed in to change notification settings - Fork 0
/
scaffold.h
102 lines (84 loc) · 2.86 KB
/
scaffold.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#ifndef SCAFFOLD_H
#define SCAFFOLD_H
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "robin_hood.h"
struct Mapping{
int length_of_read;
std::string read;
//contig on the left of the mapping
std::string contig1;
int position_on_contig1;
bool orientation_on_contig1;
int pos_on_read1;
bool orientation_on_read1;
bool breakpoint1;
//contig on the right of the mapping
std::string contig2;
int position_on_contig2;
bool orientation_on_contig2;
int pos_on_read2;
bool orientation_on_read2;
bool breakpoint2;
};
struct Bridge{ //a bridge is a bridge between two contigs defined by a read
std::string contig1;
std::string contig2;
int position1;
int position2;
bool strand1; //true if bridge toward the right of contig1, false if bridge toward the left
bool strand2; //true if bridge toward the right of contig2, false if bridge toward the left
std::string read_name;
int pos_read_on_contig1;
int pos_read_on_contig2;
};
struct Pier{ // a pier happens when a read is mapped on a contig and finishes brutally
std::string contig;
int position;
bool strand; //if unknown points toward the right of the contig
std::string read_name;
int pos_read_on_contig;
bool strand_read; //if unknown points toward the right of the read
};
struct SolidBridge{ //a bridge is a bridge between two contigs defined by several read, e.g. by agregating Bridge
std::string contig1;
std::string contig2;
int position1;
int position2;
bool strand1; //true if bridge toward the right of contig1, false if bridge toward the left
bool strand2; //true if bridge toward the right of contig2, false if bridge toward the left
std::vector<std::string> read_names;
std::vector<int> pos_read_on_contig1;
std::vector<int> pos_read_on_contig2;
std::vector<bool> strand;
};
struct SolidPier{ // a pier happens when several reads are mapped on a contig and finish brutally at the same position
std::string contig;
int position;
bool strand;
std::vector<std::string> read_names;
std::vector<int> pos_read_on_contig;
std::vector<bool> strands_read;
};
struct Link{ //a link is a link between two contigs, containing a CIGAR and optionnaly an extra sequence to insert between the two contigs
std::string contig1;
std::string contig2;
int position1;
int position2;
bool strand1; //true if bridge toward the right of contig1, false if bridge toward the left
bool strand2; //true if bridge toward the right of contig2, false if bridge toward the left
std::string cigar;
std::string extra_sequence;
int coverage;
};
struct End_contig{
std::string contig;
int position;
bool strand; //strand on the contig
std::string extra_sequence;
int coverage;
bool strand_read;
};
#endif