-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathakt.cpp
106 lines (98 loc) · 2.82 KB
/
akt.cpp
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/**
* @file akt.cpp
* @brief controller for ancestry and kinship toolkit.
*
* parse command options and call correct functions
*/
#include "akt.hh"
using namespace std;
/**
* @name usage
* @brief print out options
*
* List of input options
*
*/
static void usage()
{
cerr << "\nProgram:\takt (Ancestry and Kinship Tools)" << endl;
cerr << "Version:\t" << AKT_VERSION << endl;
cerr << "Copyright (c) 2018, Illumina, Inc. All rights reserved. See LICENSE for further details.\n" << endl;
cerr << "Usage:\takt <command> [options]\n" << endl;
cerr << "\tpca principal component analysis" << endl;
cerr << "\tkin calculate kinship coefficients" << endl;
cerr << "\trelatives discover pedigrees" << endl;
cerr << "\tunrelated generate a list of unrelated individuals" << endl;
cerr << "\tpedphase Mendelian transmission phasing for duos/trios" << endl;
cerr << endl;
exit(1);
}
int main(int argc, char **argv)
{
if (argc < 2)
{
usage();
return (1);
} else if (((string) argv[1]) == "pca")
{
pca_main(argc, argv);
} else if (((string) argv[1]) == "ibd")
{
die("ibd is deprecated");
// ibd_main(argc, argv);
} else if (((string) argv[1]) == "kin")
{
kin_main(argc, argv);
} else if (((string) argv[1]) == "relatives")
{
relatives_main(argc, argv);
} else if (((string) argv[1]) == "cluster")
{
die("cluster is deprecated");
// cluster_main(argc, argv);
} else if (((string) argv[1]) == "stats")
{
die("stats is deprecated");
// stats_main(argc, argv);
}
else if (((string) argv[1]) == "mendel")
{
die("mendel command is deprecated. See the bcftools +mendelian plugin for equivalent functionality.");
//mendel_main(argc, argv);
} else if (((string) argv[1]) == "LDplot")
{
die("ldplot is deprecated");
// ldplot_main(argc, argv);
} else if (((string) argv[1]) == "admix")
{
die("admix is deprecated");
// admix_main(argc, argv);
} else if (((string) argv[1]) == "metafreq")
{
die("metafreq is deprecated");
// metafreq_main(argc, argv);
} else if (((string) argv[1]) == "prune")
{
die("prune is deprecated");
// prune_main(argc, argv);
} else if (((string) argv[1]) == "unrelated")
{
unrelated_main(argc, argv);
} else if (((string) argv[1]) == "tag")
{
die("tag is deprecated");
// tag_main(argc, argv);
}
else if (((string) argv[1]) == "pedphase")
{
pedphase_main(argc, argv);
}
// else if(((string)argv[1]) == "grm") {
// grm_main(argc, argv);
// }
else
{
cerr << "Invalid command: " << argv[1] << endl;
usage();
}
}