-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.cpp
70 lines (57 loc) · 2.08 KB
/
main.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
/*
* hybrid-Lambda is used to simulate gene trees given species network under
* coalescent process.
*
* Copyright (C) 2010 -- 2015 Sha (Joe) Zhu
*
* This file is part of hybrid-Lambda.
*
* hybrid-Lambda is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*! \file main.cpp
* \brief Main function of hybrid-Lambda */
#include "hybridLambda.hpp"
int main(int argc, char *argv[]){
//if ( argc == 1 ) {
//print_help(); //else, proceed
//return EXIT_SUCCESS;
//}
try {
HybridLambda run_hybridLambda ( argc, argv );
run_hybridLambda.HybridLambda_core( );
run_hybridLambda.create_site_data_dir(); // segregating site data were generated
run_hybridLambda.extract_tmrca ();
run_hybridLambda.extract_bl ();
run_hybridLambda.extract_firstcoal();
run_hybridLambda.extract_frequency();
/// need to work
//if (run_hybridLambda.fst_bool){
////sim::param sim_para(argc, argv);
//Net coal_unit_net(sim_para.net_str);
//double tau = coal_unit_net.NodeContainer[0].brchlen1;
////Net para_net(sim_para.para_string);
////double lambdaA = para_net.NodeContainer[0].brchlen1;
////double lambdaAB = para_net.NodeContainer.back().brchlen1;
////cout<<"tau = " << tau <<endl;
////cout << "( 1 - exp( -tau ) )= "<<( 1 - exp( -tau ) )<<endl;
//Fst = ( 1 - exp( -tau ) ) * ( tau / ( 1 + tau ) );
//cout << "Expected[Fst] = " << Fst << endl;
//}
//}
}
catch (const exception &e) {
std::cerr << "Error: " << e.what() << std::endl;
return EXIT_FAILURE;
}
}