-
Notifications
You must be signed in to change notification settings - Fork 5
/
process_vcf_cbs.h
57 lines (45 loc) · 1.58 KB
/
process_vcf_cbs.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
//
// process_vcf_cbs.h
// process_vcf
//
// Created by Milan Malinsky on 22/11/2013.
// Copyright (c) 2013 Milan Malinsky. All rights reserved.
//
#ifndef __process_vcf__process_vcf_cbs__
#define __process_vcf__process_vcf_cbs__
#include "process_vcf_utils.h"
#include "process_vcf_seq_utils.h"
#include "process_vcf_stats_utils.h"
#include "process_vcf_annotation_tools.h"
#include <unordered_set>
int cbsMain(int argc, char** argv);
void parseCbsOptions(int argc, char** argv);
class cbsSets {
public:
cbsSets() : set1vsSet2pN(0), sets1and2vsSet3pN(0), withinSet1pN(0), withinSet2pN(0), initialised(false) {};
cbsSets(std::ifstream*& setsFile) {
string line;
string set1String; string set2String; string set3String;
getline(*setsFile, set1String);
getline(*setsFile, set2String);
std::vector<string> set1 = split(set1String, ',');
std::vector<string> set2 = split(set2String, ',');
for (int i = 0; i < set1.size(); i++) {
set1Loci.insert(atoi(set1[i].c_str()));
}
for (int i = 0; i < set2.size(); i++) {
set2Loci.insert(atoi(set2[i].c_str()));
}
std::cerr << "set 1: "; print_vector(set1, std::cerr);
std::cerr << "set 2: "; print_vector(set2, std::cerr);
initialised = true;
}
std::unordered_set<size_t> set1Loci;
std::unordered_set<size_t> set2Loci;
double withinSet1pN;
double withinSet2pN;
double set1vsSet2pN;
double sets1and2vsSet3pN;
bool initialised;
};
#endif /* defined(__process_vcf__process_vcf_cbs__) */