Function add_comment

Source
pub fn add_comment(node: &mut Node, c: &str)
Expand description

Adds key-value comments to a node

use phylotree::tree::Tree;

let newick = "(A,B);";
let mut tree = Tree::from_newick(newick).unwrap();
let mut node = tree.get_by_name_mut("A").unwrap();
nwr::add_comment(&mut node, "color=red");

assert_eq!(tree.to_newick().unwrap(), "(A[color=red],B);".to_string());