-
Notifications
You must be signed in to change notification settings - Fork 3
/
phaser.h
49 lines (43 loc) · 1.25 KB
/
phaser.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
//
// Created by yyh on 3/4/2019.
//
#ifndef SPECHAP_PHASER_H
#define SPECHAP_PHASER_H
#include "type.h"
#include "vcf_io.h"
#include "frag_io.h"
#include "optionparser.h"
#include "util.h"
extern int WINDOW_SIZE;
extern int WINDOW_OVERLAP;
extern int MAX_BARCODE_SPANNING;
extern bool HYBRID;
extern bool KEEP_PS;
extern int MAX_HIC_INSERTION;
extern int OPERATION;
extern int RECURSIVE_LIMIT;
class Phaser
{
public:
Phaser() = default;
explicit Phaser(const std::string & fnvcf, const std::string & fnout, std::vector<std::string> & fnfrags, const std::string &fnbed);
~Phaser();
void phasing();
private:
void sort_frag_file(std::string file_name);
double threshold;
VCFReader *frvcf;
VCFWriter *fwvcf;
std::vector<FragmentReader* > frfrags;
// FragmentReader *frfrag;
BEDReader *frbed;
Spectral *spectral;
int coverage;
void phasing_by_chrom(uint var_count, ChromoPhaser *chromo_phaser);
void phase_HiC_recursive(ChromoPhaser *chromo_phaser, std::set<uint> &connected_comp);
void phase_HiC_poss(ChromoPhaser *chromo_phaser);
void update_HiC_phasing_window();
int load_contig_records(ChromoPhaser *chromo_phaser);
int load_contig_blocks(ChromoPhaser *chromo_phaser);
};
#endif //SPECHAP_PHASER_H