Commit a8c0e566 authored by Elias Dohmen's avatar Elias Dohmen 🎓

dtype update v1.1.0

parent 84c5b7e2
......@@ -387,18 +387,18 @@ eventReconstruction(const posOrderMaps &pomaps, eventMaps &emaps, const unsigned
solutionTypes sTypes;
eventTypes eTypes;
float &fusion = eTypes.fusion;
float &fission = eTypes.fission;
float &termGain = eTypes.termGain;
float &termLoss = eTypes.termLoss;
float &singleDomGain = eTypes.singleDomGain;
float &singleDomLoss = eTypes.singleDomLoss;
unsigned int &fusion = eTypes.fusion;
unsigned int &fission = eTypes.fission;
unsigned int &termGain = eTypes.termGain;
unsigned int &termLoss = eTypes.termLoss;
unsigned int &singleDomGain = eTypes.singleDomGain;
unsigned int &singleDomLoss = eTypes.singleDomLoss;
unsigned int &identities_total = eTypes.identities_total;
float &exact_solution = sTypes.exact_solution;
float &non_ambiguous_solution = sTypes.non_ambiguous_solution;
float &ambiguous_solution = sTypes.ambiguous_solution;
float &complex_solution = sTypes.complex_solution;
unsigned int &exact_solution = sTypes.exact_solution;
unsigned int &non_ambiguous_solution = sTypes.non_ambiguous_solution;
unsigned int &ambiguous_solution = sTypes.ambiguous_solution;
unsigned int &complex_solution = sTypes.complex_solution;
vector<string> &event_listing = emaps.event_listing;
vector<string> &identities_listing = emaps.identities_listing;
......@@ -834,17 +834,17 @@ summary(BSDL::PhylogeneticTree<vector<int> > &nTree, const eventMaps &emaps, con
out << "# Event rates" << '\n';
out << "Fusion rate: " << fixed << setprecision(2)
<< eTypes.fusion / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
<< (float)eTypes.fusion / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
out << "Fission rate: " << fixed << setprecision(2)
<< eTypes.fission / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
<< (float)eTypes.fission / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
out << "Terminal Loss rate: " << fixed << setprecision(2)
<< eTypes.termLoss / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
<< (float)eTypes.termLoss / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
out << "Terminal Emergence rate: " << fixed << setprecision(2)
<< eTypes.termGain / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
<< (float)eTypes.termGain / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
out << "Single Domain Loss rate: " << fixed << setprecision(2)
<< eTypes.singleDomLoss / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
<< (float)eTypes.singleDomLoss / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
out << "Single Domain Emergence rate: " << fixed << setprecision(2)
<< eTypes.singleDomGain / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
<< (float)eTypes.singleDomGain / (sTypes.exact_solution + sTypes.non_ambiguous_solution) * 100 << "%" << '\n';
out << '\n';
// additional output file with events per node
......
......@@ -51,7 +51,7 @@ eventMaps {
std::map<unsigned int, BSDL::TreeNodePhylo<std::vector<int> >* > id_to_tree;
// counts identical domain arrangements between node and its parent node
std::map<unsigned int,unsigned int> identities_node;
// counts events per node. id -> (#fusion, #fission, #terminal loss, #terminal gain, #single loss, #single gain)
// counts events per node. id -> (#fusion, #fission, #terminal loss, #terminal emergence, #single domain loss, #single domain emergence)
std::map<unsigned int, std::vector<unsigned int> > events_per_node;
// summary of all solved events
std::vector<std::string> event_listing;
......@@ -66,10 +66,10 @@ eventMaps {
*/
struct
solutionTypes {
float exact_solution = 0.0; // one solution, one event type
float non_ambiguous_solution = 0.0; // multiple solutions of same event type
float ambiguous_solution = 0.0; // multiple solutions of different event types
float complex_solution = 0.0; // no solution in a single step with considered event types
unsigned int exact_solution = 0.0; // one solution, one event type
unsigned int non_ambiguous_solution = 0.0; // multiple solutions of same event type
unsigned int ambiguous_solution = 0.0; // multiple solutions of different event types
unsigned int complex_solution = 0.0; // no solution in a single step with considered event types
};
/**
......@@ -77,12 +77,12 @@ solutionTypes {
*/
struct
eventTypes {
float fusion = 0.0;
float fission = 0.0;
float termGain= 0.0;
float termLoss= 0.0;
float singleDomGain = 0.0;
float singleDomLoss = 0.0;
unsigned int fusion = 0.0;
unsigned int fission = 0.0;
unsigned int termGain= 0.0;
unsigned int termLoss= 0.0;
unsigned int singleDomGain = 0.0;
unsigned int singleDomLoss = 0.0;
unsigned int identities_total = 0; // arrangement was found in the ancestor and didn't change
};
......
......@@ -2,5 +2,5 @@
#define STR(x) QUOTE(x)
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define MINOR_VERSION 1
#define PATCH_VERSION 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment