-
Notifications
You must be signed in to change notification settings - Fork 1
/
myargparser.hpp
55 lines (51 loc) · 1.61 KB
/
myargparser.hpp
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
#pragma once
#include <string.h>
#include <string>
#include <vector>
#include <limits>
#include <fstream>
#include <cstdlib>
#include <iostream>
#include <unistd.h>
#include <sys/stat.h> // mkdir
#include <sstream> //stringstream
// #include "file_handling.hpp"
bool check_file_exists(std::string filename);
std::vector<std::string> parse_chrom_file(std::string & filename);
struct general_settings{
std::ofstream args_stream;
std::string buffer;
std::string analysis;
std::string bam_fn, reference_fn, chrom_temp;
std::string exclude_sites_fn, exclude_bed_fn, outbase, deamrates_filename;
std::string readgroups_f, bed_f, priors_str;
std::vector<std::string> chrom;
size_t nthreads = 1;
bool skip_empty_cpg=false;
bool verbose=false;
bool bound_ci = true;
size_t minmapQ, minbaseQ, max_pos_to_end;
double M;
int flags_off;
size_t nboots=0;
size_t cycles, minreadlength, minreadlength_deam;
size_t seed;
size_t windowsize, max_cpgs;
general_settings(){
minmapQ = 25;
max_pos_to_end = 30;
minbaseQ = 20;
minreadlength=25;
minreadlength_deam=std::numeric_limits<size_t>::max();
flags_off = 3844; // https://broadinstitute.github.io/picard/explain-flags.html
M = 0.75; // ~70-80% of all CpG are methylated in mammals
seed=std::numeric_limits<size_t>::max();
cycles=std::numeric_limits<size_t>::max();
windowsize=std::numeric_limits<size_t>::max();
max_cpgs=std::numeric_limits<size_t>::max();
buffer = ("");
}
};
void args_parser( int argc, char* argv[], general_settings & settings );
void print_help();
bool check_estF_args(general_settings & settings);