<jupyter_start><jupyter_text>Notebook 3.3: Newick AssignmentComplete the notebook then download as an HTML file `(toolbar -> File -> Download as)` and submit your assignment by emailing to Natalie (<EMAIL>).<jupyter_code>import toytree<jupyter_output><empty_output><jupyter_text>Newick tree filesWe learned in notebook 3.2 that the file format to store phylogenetic trees is simply a text file containing a string of names within nested parentheses. When researchers publish phylogenetic results these are the types of tree files that they produce and publish. The files are sometimes saved as something like "treefile.newick" or "trees.nwk" or "birds.tree", etc. There are databases online where such files are saved including those that are specialized for tree data (like [TreeBase](https://www.treebase.org/treebase-web/home.html;jsessionid=956A84A237046124FEF23F89614CA5DF)) or general data repositories like Data Dryad.   Newick treesThe `toytree.tree()` function reads the newick file to create a Tree object in memory. As input it can take a newick string as text, or it can take a URL pointing to a text file online, or it can take a filename that is located on your computer.<jupyter_code>newick = "((a,b),(c, d));"

tre = toytree.tree(newick)
tre.draw();<jupyter_output><empty_output><jupyter_text>An example using a URL from treebase<jupyter_code>URL = "https://treebase.org/treebase-web/search/downloadATree.html?id=11298&treeid=31264"
tre = toytree.tree(URL)
tre.draw(tip_labels_align=True, height=800, width=600);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08472400513478819, 'fraction_numerical': 0.026957637997432605, 'mean_word_length': 6.086363636363636, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 16, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '141548', 'license': 'MIT', 'n_tokens_mistral': 503, 'n_tokens_neox': 457, 'n_words': 176, 'path': 'slides/fundamentals2019/session-3-tree-think/notebooks/nb-3.3-assignment.ipynb', 'repo_name': 'eaton-lab/eaton-lab.github.io', 'size': '1579'}