-
Notifications
You must be signed in to change notification settings - Fork 2
/
GlacCompute.h
74 lines (62 loc) · 1.54 KB
/
GlacCompute.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
/*
* GlacCompute
* Date: Jul-30-2017
* Author : Gabriel Renaud gabriel.reno [at sign here] gmail.com
*
*/
#ifndef GlacCompute_h
#define GlacCompute_h
#include <string>
#include <climits>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <limits>
#include <queue>
#include <map>
#include <algorithm>
#include <unistd.h>
#include "libgab.h"
#include "ReadTabix.h"
#include "GlacWriter.h"
#include "GlacParser.h"
#include "AlleleRecords.h"
#include "GlactoolsOperations.h"
#include "SumStatAvgCoa.h"
#include "SumStatFst.h"
#include "SumStatD.h"
#include "SumStatDist.h"
#include "SumStatF3.h"
#include "SumStatF2.h"
using namespace std;
//! Chunk of code to check if a certain thread call failed
/*!
This block is calls by the pthread
*/
#define checkResults(string, val) { \
if (val) { \
cerr<<"Failed with "<<val<<" at "<<string<<endl; \
exit(1); \
} \
}
class GlacCompute{
private:
int numberOfThreads = 1;
int sizeBins = 1000000;
bool performBoot=true;
bool justBoot=false;
string program;
string dnaDistMode;
public:
GlacCompute();
GlacCompute(const GlacCompute & other);
~GlacCompute();
GlacCompute & operator= (const GlacCompute & other);
string usage() const;
int run(int argc, char *argv[]);
template <class STAT> //type
void bootFromResults( vector<string> * arguments,STAT * stattouse );
};
#endif