Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Import a string in Newick format
ResourceFunction["ImportNewickString"][newickString] reads a String in Newick format and outputs a nested structure suitable for further analysis. |
Import a basic Newick string:
In[1]:= |
Out[1]= |
Arbitrary depths of nesting are supported:
In[2]:= |
Out[2]= |
If the Newick string does not provide labels for any nodes, labels will be automatically generated:
In[3]:= |
Out[3]= |
In the case labels names are duplicated, indexes will be appended to uniquely identify them:
In[4]:= |
Out[4]= |
ImportNewickString also supports multiple trees not linked by a common node:
In[5]:= |
Out[5]= |
This work is licensed under a Creative Commons Attribution 4.0 International License