{"library":"newick","title":"newick","description":"A Python module to read and write the Newick format, commonly used for phylogenetic trees. Current version: 1.11.0. Release cadence is irregular; maintained on GitHub.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install newick"],"cli":null},"imports":["from newick import loads","from newick import dumps","from newick import load","from newick import dump"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from newick import loads, dumps\n\n# Load a Newick string\ntree = loads('(A:0.1,B:0.2,(C:0.3,D:0.4):0.5);')\n# tree is a list of Node objects (rooted at index 0)\nnode = tree[0]\nprint(node.name)       # None (internal node)\nprint(node.descendants) # list of Nodes\nprint(node.length)     # None (for root)\n\n# Modify the tree and dump back to string\nnode.name = 'root'\nnewick_str = dumps(node)\nprint(newick_str)","lang":"python","description":"Parses a Newick string into a tree of Node objects and serializes back.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}