A toolkit for working with phylogenetic data.
v0.18.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DefaultTreeNewickReaderPlugin Class Reference

#include <genesis/tree/default/newick_reader.hpp>

Inherited by PlacementTreeNewickReader, DefaultTreeNewickReader, IndexedAttributeTreeNewickReader, and KeyedAttributeTreeNewickReader.

Detailed Description

Provide a set of plugin functions for NewickReader to read a DefaultTree.

Definition at line 50 of file tree/default/newick_reader.hpp.

Public Member Functions

 DefaultTreeNewickReaderPlugin ()=default
 
 DefaultTreeNewickReaderPlugin (DefaultTreeNewickReaderPlugin const &)=default
 
 DefaultTreeNewickReaderPlugin (DefaultTreeNewickReaderPlugin &&)=default
 
virtual ~DefaultTreeNewickReaderPlugin ()=default
 
double default_branch_length () const
 Get the default branch length used when there is none given for an edge. More...
 
self_typedefault_branch_length (double value)
 Set the default branch length used when there is none given for an edge. More...
 
std::string const & default_inner_name () const
 Get the default named used when there is none given for an inner node. More...
 
self_typedefault_inner_name (std::string const &value)
 Set the default named used when there is none given for an inner node. More...
 
std::string const & default_leaf_name () const
 Get the default named used when there is none given for a leaf node. More...
 
self_typedefault_leaf_name (std::string const &value)
 Set the default named used when there is none given for a leaf node. More...
 
std::string const & default_root_name () const
 Get the default named used when there is none given for the root node. More...
 
self_typedefault_root_name (std::string const &value)
 Set the default named used when there is none given for the root node. More...
 
void element_to_edge (NewickBrokerElement const &element, TreeEdge &edge) const
 
void element_to_node (NewickBrokerElement const &element, TreeNode &node) const
 
DefaultTreeNewickReaderPluginoperator= (DefaultTreeNewickReaderPlugin const &)=default
 
DefaultTreeNewickReaderPluginoperator= (DefaultTreeNewickReaderPlugin &&)=default
 
void register_with (NewickReader &reader) const
 
bool replace_name_underscores () const
 Return whether currently this plugin replaces underscores with spaces. More...
 
self_typereplace_name_underscores (bool value)
 Set whether to replace all underscores ('_') in names with spaces (' '). 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 unnamed nodes with a default name. More...
 

Public Types

using self_type = DefaultTreeNewickReaderPlugin
 

Constructor & Destructor Documentation

virtual ~DefaultTreeNewickReaderPlugin ( )
virtualdefault

Member Function Documentation

double default_branch_length ( ) const
inline

Get the default branch length used when there is none given for an edge.

Definition at line 80 of file tree/default/newick_reader.hpp.

self_type& default_branch_length ( double  value)
inline

Set the default branch length used when there is none given for an edge.

By default, this is 1.0.

Definition at line 90 of file tree/default/newick_reader.hpp.

std::string const& default_inner_name ( ) const
inline

Get the default named used when there is none given for an inner node.

Definition at line 116 of file tree/default/newick_reader.hpp.

self_type& default_inner_name ( std::string const &  value)
inline

Set the default named used when there is none given for an inner node.

Definition at line 124 of file tree/default/newick_reader.hpp.

std::string const& default_leaf_name ( ) const
inline

Get the default named used when there is none given for a leaf node.

Definition at line 99 of file tree/default/newick_reader.hpp.

self_type& default_leaf_name ( std::string const &  value)
inline

Set the default named used when there is none given for a leaf node.

Definition at line 107 of file tree/default/newick_reader.hpp.

std::string const& default_root_name ( ) const
inline

Get the default named used when there is none given for the root node.

Definition at line 133 of file tree/default/newick_reader.hpp.

self_type& default_root_name ( std::string const &  value)
inline

Set the default named used when there is none given for the root node.

Definition at line 141 of file tree/default/newick_reader.hpp.

void element_to_edge ( NewickBrokerElement const &  element,
TreeEdge edge 
) const
inline

Definition at line 242 of file tree/default/newick_reader.hpp.

void element_to_node ( NewickBrokerElement const &  element,
TreeNode node 
) const
inline

Definition at line 219 of file tree/default/newick_reader.hpp.

void register_with ( NewickReader reader) const
inline

Definition at line 254 of file tree/default/newick_reader.hpp.

bool replace_name_underscores ( ) const
inline

Return whether currently this plugin replaces underscores with spaces.

See the setter replace_name_underscores( bool ) for details.

Definition at line 196 of file tree/default/newick_reader.hpp.

self_type& replace_name_underscores ( bool  value)
inline

Set whether to replace all underscores ('_') in names with spaces (' ').

This is demanded by the original definition of the Newick format, see http://evolution.genetics.washington.edu/phylip/newicktree.html However, because under most common circumstances, it is more confusing than helpful, we decided to deactivate this by default. Thus, the default for this setting is false.

Definition at line 209 of file tree/default/newick_reader.hpp.

self_type& set_default_names ( std::string const &  value)
inline

Shorthand to set the default names for leaf, inner and root node at once, to one value.

Definition at line 151 of file tree/default/newick_reader.hpp.

bool use_default_names ( ) const
inline

Return whether currently default names are activated in this plugin.

See the setter use_default_names( bool ) for details.

Definition at line 164 of file tree/default/newick_reader.hpp.

self_type& use_default_names ( bool  value)
inline

Set whether to replace unnamed nodes with a default name.

Default is false. In this case, nodes without names in the Newick tree are simply unnamed, i.e., their name is the emptry string.

If set to true, unnamed nodes are named using one of the default names:

These default names can be changed by using default_leaf_name( std::string const& ), default_inner_name( std::string const& ) and default_root_name( std::string const& ), or by using set_default_names( std::string const& ) to set all three at once.

Definition at line 185 of file tree/default/newick_reader.hpp.

Member Typedef Documentation


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