A toolkit for working with phylogenetic data.
v0.24.0
PlacementTreeNewickWriter Class Reference

#include <genesis/placement/formats/newick_writer.hpp>

Inherits NewickWriter, CommonTreeNewickWriterPlugin, and PlacementTreeNewickWriterPlugin.

Detailed Description

Definition at line 148 of file placement/formats/newick_writer.hpp.

Public Member Functions

 PlacementTreeNewickWriter ()
 
- Public Member Functions inherited from NewickWriter
 NewickWriter ()=default
 
 NewickWriter (NewickWriter const &)=default
 
 NewickWriter (NewickWriter &&)=default
 
virtual ~NewickWriter ()=default
 
NewickWriterforce_quotation_marks (bool value)
 If set to true, all names are wrapped in quotation marks, regardless of whether the name contains any characters that need to be wrapped. More...
 
bool force_quotation_marks () const
 Get whether all names are wrapped in quotation marks. More...
 
NewickWriterline_length (size_t value)
 Set the approximate maximal line length to use when writing Newick trees. More...
 
size_t line_length () const
 Get the currently set approximate maximal line length. More...
 
NewickWriteroperator= (NewickWriter const &)=default
 
NewickWriteroperator= (NewickWriter &&)=default
 
NewickWriterquotation_mark (char value)
 Set the type of quotation marks used for node names that contain special characters. More...
 
char quotation_mark () const
 Get the currently set type of quotation marks used for node names. More...
 
std::string to_string (Tree const &tree) const
 Shorthand to write a Tree to Newick format and return it is a string. More...
 
NewickWritertrailing_new_line (bool value)
 Set whether to write a new line char \n at the end of each tree. More...
 
bool trailing_new_line () const
 Get the current setting for whether a new line char \n is written to the end of each tree. More...
 
NewickBroker tree_to_broker (Tree const &tree) const
 Transform the information of the tree into a NewickBroker object. More...
 
void write (Tree const &tree, std::shared_ptr< utils::BaseOutputTarget > target) const
 Write a Tree to an output target, using the Newick format. More...
 
void write (TreeSet const &tree_set, std::shared_ptr< utils::BaseOutputTarget > target, bool with_names=false) const
 Write all Trees in a TreeSet to an output target, using the Newick format. More...
 
void write (NewickBroker const &broker, std::shared_ptr< utils::BaseOutputTarget > target) const
 Write a NewickBroker to an output target, in Newick format. More...
 
NewickWriterwrite_comments (bool value)
 Set whether to write Newick comments (e.g., some forms of bootstrap values). More...
 
bool write_comments () const
 Get whether Newick comments (e.g., some forms of bootstrap values) are written. More...
 
NewickWriterwrite_names (bool value)
 Set whether to write Newick node names. More...
 
bool write_names () const
 Get whether Newick node names are written. More...
 
NewickWriterwrite_tags (bool value)
 Set whether to write Newick tags (e.g., for jplace files). More...
 
bool write_tags () const
 Get whether Newick tags (e.g., for jplace files) are written. More...
 
NewickWriterwrite_values (bool value)
 Set whether to write Newick values (e.g., branch lengths). More...
 
bool write_values () const
 Get whether Newick values (e.g., branch lengths) are written. More...
 
- Public Member Functions inherited from CommonTreeNewickWriterPlugin
 CommonTreeNewickWriterPlugin ()=default
 
 CommonTreeNewickWriterPlugin (CommonTreeNewickWriterPlugin const &)=default
 
 CommonTreeNewickWriterPlugin (CommonTreeNewickWriterPlugin &&)=default
 
virtual ~CommonTreeNewickWriterPlugin ()=default
 
int branch_length_precision () const
 Get the currently set maximum precision (in number of digits) used for printing the branch_length floating point numbers. More...
 
self_typebranch_length_precision (int value)
 Set the maximum precision (in number of digits) used for printing the branch_length floating point numbers. More...
 
std::string const & default_inner_name () const
 Get the named used to filter out an inner node name. More...
 
self_typedefault_inner_name (std::string const &value)
 Set the named used to filter out an inner node name. More...
 
std::string const & default_leaf_name () const
 Get the named used to filter out a leaf node name. More...
 
self_typedefault_leaf_name (std::string const &value)
 Set the named used to filter out a leaf node name. More...
 
std::string const & default_root_name () const
 Get the named used to filter out the root node name. More...
 
self_typedefault_root_name (std::string const &value)
 Set the named used to filter out the root node name. More...
 
void edge_to_element (TreeEdge const &edge, NewickBrokerElement &element) const
 
self_typeenable_branch_lengths (bool value)
 Set whether to write branch lengths. More...
 
bool enable_branch_lengths () const
 Get whether currently any branch lengths are written. More...
 
self_typeenable_names (bool value)
 Set whether to write node names at all. More...
 
bool enable_names () const
 Get whether currently any node names are written at all. More...
 
void node_to_element (TreeNode const &node, NewickBrokerElement &element) const
 
CommonTreeNewickWriterPluginoperator= (CommonTreeNewickWriterPlugin const &)=default
 
CommonTreeNewickWriterPluginoperator= (CommonTreeNewickWriterPlugin &&)=default
 
void register_with (NewickWriter &writer) const
 
bool replace_name_spaces () const
 Return whether currently this plugin replaces spaces with underscores. More...
 
self_typereplace_name_spaces (bool value)
 Set whether to replace all spaces (' ') in names with underscores ('_'). More...
 
self_typeset_default_names (std::string const &value)
 Shorthand to set the default names for leaf, inner and root node at once, to one value. More...
 
bool use_default_names () const
 Return whether currently default names are activated in this plugin. More...
 
self_typeuse_default_names (bool value)
 Set whether to replace default named nodes with an empty string. More...
 
- Public Member Functions inherited from PlacementTreeNewickWriterPlugin
 PlacementTreeNewickWriterPlugin ()=default
 
 PlacementTreeNewickWriterPlugin (PlacementTreeNewickWriterPlugin const &)=default
 
 PlacementTreeNewickWriterPlugin (PlacementTreeNewickWriterPlugin &&)=default
 
virtual ~PlacementTreeNewickWriterPlugin ()=default
 
void edge_to_element (tree::TreeEdge const &edge, tree::NewickBrokerElement &element) const
 
bool enable_edge_nums () const
 
void enable_edge_nums (bool value)
 
bool enable_placement_counts () const
 
void enable_placement_counts (bool value)
 
PlacementTreeNewickWriterPluginoperator= (PlacementTreeNewickWriterPlugin const &)=default
 
PlacementTreeNewickWriterPluginoperator= (PlacementTreeNewickWriterPlugin &&)=default
 
void prepare_sample (Sample const &smp)
 
void register_with (tree::NewickWriter &writer) const
 

Additional Inherited Members

- Public Types inherited from NewickWriter
using edge_to_element_function = std::function< void(TreeEdge const &edge, NewickBrokerElement &element) >
 Function type that translates from a TreeEdge to a NewickBrokerElement. More...
 
using finish_writing_function = std::function< void(Tree const &tree, NewickBroker &broker) >
 Function type that allows to do some finalizing work with the Tree and NewickBroker after the actual tree writing finished. More...
 
using node_to_element_function = std::function< void(TreeNode const &node, NewickBrokerElement &element) >
 Function type that translates from a TreeNode to a NewickBrokerElement. More...
 
using prepare_writing_function = std::function< void(Tree const &tree, NewickBroker &broker) >
 Function type that allows to do some preparatory work with the Tree and NewickBroker before the actual tree writing begins. More...
 
- Public Types inherited from CommonTreeNewickWriterPlugin
using self_type = CommonTreeNewickWriterPlugin
 
- Public Attributes inherited from NewickWriter
std::vector< edge_to_element_functionedge_to_element_plugins
 Collect all functions to be called for each TreeEdge in order to translate it to a Newick representation. More...
 
std::vector< finish_writing_functionfinish_writing_plugins
 Collect all functions to be called after finishing the actual tree writing. More...
 
std::vector< node_to_element_functionnode_to_element_plugins
 Collect all functions to be called for each TreeNode in order to translate it to a Newick representation. More...
 
std::vector< prepare_writing_functionprepare_writing_plugins
 Collect all functions to be called before starting the actual tree writing. More...
 

Constructor & Destructor Documentation

◆ PlacementTreeNewickWriter()

Definition at line 159 of file placement/formats/newick_writer.hpp.


The documentation for this class was generated from the following file: