Closed halabikeren closed 7 years ago
Dear @halabikeren,
Yes, there are many accessor functions, and some modification functions. Take a look at
You can access addition information on tree nodes via http://hyphy.org/w/index.php/GetInformation
In order to modify a tree object you can use + / - operations, like in the example below
Topology T = ((a:0.1,b:0.2)ab:0.05, (c:0.01,d:0.02)cd:0.03, ef:0.07);
fprintf (stdout, Format (T,1,1), "\n");
T + {"NAME": "e", "WHERE" : "ef", "LENGTH" : 0.125};
T + {"NAME": "f", "WHERE" : "ef", "LENGTH" : 0.15};
fprintf (stdout, Format (T,1,1), "\n");
T - "c";
fprintf (stdout, Format (T,1,1), "\n");
There are other ways to access and manipulate trees, let me know if you have a specific use case in mind.
Best, Sergei
Great, Thank you!
Hi,
Is there a way to work with trees (add node, get node, ect.) in HBL?
Thanks! Keren