-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpopdel.cpp
More file actions
54 lines (51 loc) · 1.42 KB
/
popdel.cpp
File metadata and controls
54 lines (51 loc) · 1.42 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
#include <seqan/arg_parse.h>
#include <seqan/bam_io.h>
#include "parse_popdel.h"
#include "workflow_popdel.h"
#include "popdel_profile/bam_window_iterator_popdel.h"
#include "popdel_profile/parameter_estimation_popdel.h"
#include "popdel_profile/profile_parameter_parsing_popdel.h"
using namespace seqan;
// ==========================================================================
// Function main()
// ==========================================================================
int main(int argc, char const ** argv)
{
const char * prog_name = argv[0];
if (argc < 2)
{
printHelp(prog_name);
return 1;
}
// Concatenate program name and command.
const char * command = argv[1];
std::ostringstream name;
name << argv[0] << " " << command;
argv[1] = toCString(name.str());
++argv;
--argc;
// Execute the specified command.
if (strcmp(command, "profile") == 0)
{
return popdel_profile(argc, argv);
}
else if (strcmp(command, "call") == 0)
{
return popdel_call(argc, argv);
}
else if (strcmp(command, "view") == 0)
{
return popdel_view(argc, argv);
}
else if (strcmp(command, "--help") == 0 || strcmp(command, "-h") == 0)
{
printHelp(prog_name);
return 0;
}
else
{
std::cerr << "ERROR: Unknown command: " << command << std::endl;
printHelp(prog_name);
return 1;
}
}