-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathoptions.cpp
More file actions
61 lines (44 loc) · 1.96 KB
/
Copy pathoptions.cpp
File metadata and controls
61 lines (44 loc) · 1.96 KB
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
// stl
#include <string>
// imports
using std::string;
// custom headers
#include "options.h"
#include "helper.h"
// i/o options
string par::pedFile = "null";
string par::mapFile = "null";
string par::file = "null";
string par::tpedFile = "null";
string par::tfamfile = "null";
string par::tfile = "null";
bool par::genome = false;
string par::genomeFile = "null";
bool par::recode = false;
bool par::transpose = false;
string par::out = "snpduo";
bool par::webDuo = false;
// Screen printing
bool par::verbose = true;
// Primary analysis
bool par::counts = false;
bool par::summary = false;
bool par::specified = false;
bool par::calculated = false;
bool par::oldCalculated = false;
bool par::conflicting = false;
// Other options
bool par::map3 = false;
int par::snpCount = 0;
void checkMinimumInput()
{
if (par::pedFile == "null" and par::tpedFile == "null" and par::genomeFile == "null" /*and par::bpedFile == "null"*/) error ("Must specify an input source");
if ( (par::pedFile != "null" and (par::tpedFile != "null" or par::genomeFile != "null")) or (par::tpedFile != "null" and par::genomeFile != "null") )
{
error ("Cannot specify multiple input options. Please specify .ped/.map files, .tped/.tfam files, or a .genome file");
}
if (!par::counts and !par::summary and !par::specified and !par::calculated and !par::conflicting and !par::recode) error("Must specify an analysis method or recoding option. Use '--help' for more info");
if (par::genome and (par::conflicting or par::specified)) error("Cannot specify a PLINK genome file and any options requiring Pedigree information (specified relationships or conflicting relationships)");
if (par::calculated and par::oldCalculated) error("Cannot perform relationship calculation by both old and new method simultaneously\nPlease specifiy --calculated OR --oldCalculated");
if (par::transpose and par::webDuo) error("Please only specify one recoding option (--recode, --recode --tranpose, or --recode --webDuo)");
}