-
Notifications
You must be signed in to change notification settings - Fork 1
/
SSRContigList.h
81 lines (61 loc) · 2.07 KB
/
SSRContigList.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
/*******************************************************************************
+
+ SSRContigList.h
+
+ Copyright (c) 2002 Genoscope, CEA, CNS, Evry, France
+ Author : Jean-Marc Aury, [email protected]
+
*******************************************************************************/
#ifndef JM_SSR_CONTIG_LIST_H
#define JM_SSR_CONTIG_LIST_H
#include "LocalType.h"
#include "SSRContig.h"
#include "NetEx.h"
#include <iostream>
#include <sstream>
#include <string>
#include <map>
#include <list>
using namespace std;
typedef list<SSRContig*> TSSRList;
typedef pair<s32,s32> Edge;
class SSRContigList {
friend ostream& operator<<(ostream&, const SSRContigList&);
protected:
TSSRList _contigs;
public:
static s32 MINOVERLAPJUNCTION;
static s32 NBNEIGHBOUR;
static s32 MINSIZEINTRON;
static s32 MAXSIZEINTRON;
static s32 MINCOVWORD2ORIENTATE;
// static s32 REDUCEEXONLIST;
// static s32 VERBOSE;
/* Constructors and Destructors*/
SSRContigList() {}
~SSRContigList() {
for(TSSRList::iterator itCtg = _contigs.begin();itCtg!=_contigs.end();++itCtg){
delete *itCtg;
}
}
void push_back(SSRContig* ctg) { return _contigs.push_back(ctg); }
s32 size() { return _contigs.size(); }
SSRContig* back() { return _contigs.back();}
void print(){//TODO delete, just for tests
for(TSSRList::iterator itCtg = _contigs.begin();itCtg!=_contigs.end();++itCtg){
cout << **itCtg <<endl;
}
}
void populateExons(SSRContig*, map<string, bool>&);
map<s32,list<SSRContig*> > mapCovtigs(TSSRList);
map<pair<string, s32>,list<string> > mapJunctions(map<string,s32> junction);
NetEx* buildGraph(map<string, s32>&);
// void extendCovtigs();
TSSRList* exons2vertices();
list<Edge>* junctions2edges(TSSRList*, map<string,s32>, map<Edge,s32>&);
void startposSort() { _contigs.sort(SSRContig::startposSort); }
void endposSort() { _contigs.sort(SSRContig::endposSort); }
};
std::vector<std::string> &split(const std::string &s, char delim, std::vector<std::string> &elems) ;
std::vector<std::string> split(const std::string &s, char delim);
#endif