diff --git a/README b/README new file mode 100644 index 0000000..16fb7cc --- /dev/null +++ b/README @@ -0,0 +1,21 @@ +Licence: GPL3 +Author: Richard Neher, Fabio Zanini +Date: 2012/09/12 + +Description: +------------ +The sources for FFPopSim are online at: + + http://code.google.com/p/ffpopsim/ + +Documentation and examples are online at: + + http://webdav.tuebingen.mpg.de/ffpopsim/ + +To install the library, read the INSTALL file. +The two configuration files are: + +- Makefile +- setup.py (for the Python extension) + +Enjoy. diff --git a/src/rootedTree.cpp b/src/rootedTree.cpp index 908f7a1..ea32db5 100644 --- a/src/rootedTree.cpp +++ b/src/rootedTree.cpp @@ -24,6 +24,26 @@ */ #include "ffpopsim_highd.h" + + +namespace{ +/* +* Function to name the tree node as well as the alignment entry +*/ +ostream& operator<< (ostream& out, map ::iterator &c){ + +//std::ostream &clone_name(std::ostream &out, const Clone &c){ + out << c->first.index << "_" + << c->first.age << "_" + << c->second.clone_size << "_" + << c->second.fitness; + + return out; +} + +} + + /* * this overloads the ostream operator to output keys of nodes and edges */ @@ -460,9 +480,10 @@ string rooted_tree::print_sequences() { for (vector::iterator sampled_leaf = sampled_leafs.begin(); sampled_leaf!=sampled_leafs.end(); sampled_leaf++){ node= nodes.find(*sampled_leaf); + for (size_t si=0; sisecond.sampled; si++){ - seq_str <<">"<index<<"_"<age<<"_"<second.clone_size<<'-'<second.fitness - <<"\n"<second.genotype<<"\n"; + seq_str << ">" << node << "\n" + << node->second.genotype << "\n"; } } return seq_str.str(); @@ -498,7 +519,7 @@ string rooted_tree::subtree_newick(tree_key_t root){ } tree_str<<")"; } - tree_str<second.clone_size<<'_'<second.sampled<<"_"<second.fitness<< '_'<< root.location; + tree_str << root_node; tree_str << ":" << edge->second.length; //tree_str<second.length; return tree_str.str();