forked from wyp1125/MCScanX
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdetect_syntenic_tandem_arrays.h
80 lines (71 loc) · 1.47 KB
/
detect_syntenic_tandem_arrays.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
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
using namespace std;
struct Blast_record
{
string gene1,gene2;
string mol1,mol2;
int id1,id2;
// int pair_id;
double score;
};
vector<Blast_record> match_list;
struct Gene_feat
{
string name;
string mol;
int mid;
int geneid;
bool operator < (const Gene_feat &g) const
{
return (mol == g.mol && mid < g.mid) || mol < g.mol;
}
};
struct geneCmp
{
bool operator() (const Gene_feat *a, const Gene_feat *b) const
{
return (a->mol == b->mol && a->mid < b->mid) || a->mol < b->mol;
}
};
struct tandem_pair
{
string gene1,gene2;
string sp;
string mol;
int id;
bool operator < (const tandem_pair &g) const
{
return (mol == g.mol && id < g.id) || mol < g.mol;
}
};
struct tandem_array
{
vector<string> gene;
string mol;
string sp;
};
struct tandem_cluster
{
string anchor1;
string anchor2;
int array_id1;
int array_id2;
};
vector <tandem_pair> alltandempair;
vector <tandem_array> alltandemarray;
vector <tandem_cluster> alltandemcluster;
vector <int> is_show;
map <string,int> tandemgeneid;
typedef set<Gene_feat *, geneCmp> geneSet;
map<string, Gene_feat> gene_map;
geneSet allg;