#include <genesis/tree/common_tree/newick_reader.hpp>
Inherited by PlacementTreeNewickReader, CommonTreeNewickReader, IndexedAttributeTreeNewickReader, KeyedAttributeTreeNewickReader, and SimpleNewickTreeNewickReader.
Provide a set of plugin functions for NewickReader to read a CommonTree.
Definition at line 50 of file tree/common_tree/newick_reader.hpp.
Public Member Functions | |
CommonTreeNewickReaderPlugin ()=default | |
CommonTreeNewickReaderPlugin (CommonTreeNewickReaderPlugin &&)=default | |
CommonTreeNewickReaderPlugin (CommonTreeNewickReaderPlugin const &)=default | |
virtual | ~CommonTreeNewickReaderPlugin ()=default |
double | default_branch_length () const |
Get the default branch length used when there is none given for an edge. More... | |
self_type & | default_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_type & | default_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_type & | default_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_type & | default_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 |
CommonTreeNewickReaderPlugin & | operator= (CommonTreeNewickReaderPlugin &&)=default |
CommonTreeNewickReaderPlugin & | operator= (CommonTreeNewickReaderPlugin const &)=default |
void | register_with (NewickReader &reader) const |
bool | replace_name_underscores () const |
Return whether currently this plugin replaces underscores with spaces. More... | |
self_type & | replace_name_underscores (bool value) |
Set whether to replace all underscores ('_') in names with spaces (' '). More... | |
self_type & | set_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_type & | use_default_names (bool value) |
Set whether to replace unnamed nodes with a default name. More... | |
Public Types | |
using | self_type = CommonTreeNewickReaderPlugin |
|
default |
|
virtualdefault |
|
default |
|
default |
|
inline |
Get the default branch length used when there is none given for an edge.
Definition at line 80 of file tree/common_tree/newick_reader.hpp.
|
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/common_tree/newick_reader.hpp.
|
inline |
Get the default named used when there is none given for an inner node.
Definition at line 116 of file tree/common_tree/newick_reader.hpp.
|
inline |
Set the default named used when there is none given for an inner node.
Definition at line 124 of file tree/common_tree/newick_reader.hpp.
|
inline |
Get the default named used when there is none given for a leaf node.
Definition at line 99 of file tree/common_tree/newick_reader.hpp.
|
inline |
Set the default named used when there is none given for a leaf node.
Definition at line 107 of file tree/common_tree/newick_reader.hpp.
|
inline |
Get the default named used when there is none given for the root node.
Definition at line 133 of file tree/common_tree/newick_reader.hpp.
|
inline |
Set the default named used when there is none given for the root node.
Definition at line 141 of file tree/common_tree/newick_reader.hpp.
|
inline |
Definition at line 242 of file tree/common_tree/newick_reader.hpp.
|
inline |
Definition at line 219 of file tree/common_tree/newick_reader.hpp.
|
default |
|
default |
|
inline |
Definition at line 254 of file tree/common_tree/newick_reader.hpp.
|
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/common_tree/newick_reader.hpp.
|
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/common_tree/newick_reader.hpp.
|
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/common_tree/newick_reader.hpp.
|
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/common_tree/newick_reader.hpp.
|
inline |
Set whether to replace unnamed nodes with a default name.
Common 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/common_tree/newick_reader.hpp.
Definition at line 58 of file tree/common_tree/newick_reader.hpp.