-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwfbuffered.cc
41 lines (35 loc) · 1.09 KB
/
wfbuffered.cc
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
#include <cstdint>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <tskit.h>
#include <boost/program_options.hpp>
#include "rng.hpp"
#include "tskit_tools.hpp"
#include "simulate.hpp"
#include "options.hpp"
#include "cli.hpp"
namespace po = boost::program_options;
int
main(int argc, char **argv)
{
command_line_options options;
auto cli = generate_main_options(options);
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, cli), vm);
po::notify(vm);
validate_cli(options);
if (vm.count("help"))
{
std::cout << cli << '\n';
std::exit(1);
}
auto rng = make_rng(options.seed);
auto tables = make_table_collection_ptr(1.);
simulate(rng, options.N, options.psurvival, options.nsteps,
options.simplification_interval, options.rho, options.buffer_new_edges,
options.cppsort, options.parallel_sort, tables);
auto ret = tsk_table_collection_build_index(tables.get(), 0);
ret = tsk_table_collection_dump(tables.get(), options.treefile.c_str(), 0);
}