{"id":23787790,"url":"https://github.com/schultzm/budgitree","last_synced_at":"2025-09-06T05:32:13.310Z","repository":{"id":62560478,"uuid":"218670322","full_name":"schultzm/Budgitree","owner":"schultzm","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-12T06:58:46.000Z","size":121,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T17:43:58.738Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schultzm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-31T02:43:54.000Z","updated_at":"2022-08-23T08:31:35.000Z","dependencies_parsed_at":"2022-11-03T14:45:23.476Z","dependency_job_id":null,"html_url":"https://github.com/schultzm/Budgitree","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schultzm%2FBudgitree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schultzm%2FBudgitree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schultzm%2FBudgitree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schultzm%2FBudgitree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schultzm","download_url":"https://codeload.github.com/schultzm/Budgitree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232092134,"owners_count":18471477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-01T15:17:41.136Z","updated_at":"2025-01-01T15:17:42.489Z","avatar_url":"https://github.com/schultzm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Budgitree\n\n[![Python package](https://github.com/schultzm/Budgitree/actions/workflows/python-package.yml/badge.svg)](https://github.com/schultzm/Budgitree/actions/workflows/python-package.yml)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n[![Python 3](https://img.shields.io/badge/Python-3-blue.svg)](https://www.python.org/)\n\n\n## Why use this program?\n\nLet's say you have just obtained your phylogenetic tree from FastTree.\nThis tree will likely contain polytomies, and branch lengths that are so\nsmall that they will be represented in exponential notation.\nSome programs will not accept trees with these two features (e.g., ClusterPicker).\nYou could remove the polytomies with the `ape` package in `R`.  But how do you\nprint the tree to standard out with the branch lengths in standard float format?  You could submit\nan issue to the developers of your target program and hope they respond with a fix.\nBoth of these options may delay your workflow.  This program provides a python3 solution\nto your problems.  Given a phylogenetic tree in (FastTree) newick format, `budgitree`\nprovides an easy way to print your tree to `stdout` with:\n\n1. Polytomies resolved (i.e., tree converted to strictly bifurcating) and/or\n2. Exponential notation removed (i.e., branch lengths in float format with user-specified number of decimal places)\n3. Collapse branches with support values less than the specified cutoff (default is do nothing)\n\n## Usage\n\n### Get help\n\n```{bash}\n$ budgitree\nusage: budgitree [-h]  ...\n\nGiven a newick tree, use this program to resolve polytomies (convert to\nbifurcating) and or change the formatting of branch lengths.\n\noptional arguments:\n  -h, --help  show this help message and exit\n\nSub-commands help:\n  \n    smuggle   Smuggle the budgie.\n    version   Print version.\n    test      Run test suite.\n```\n\n### Start smuggling\n\n```{bash}\n$ budgitree smuggle -h\nusage: budgitree smuggle [-h] [-p PRECISION] [-b] [-c COLLAPSE] tree\n\nProcess the tree.\n\npositional arguments:\n  tree                  Input newick tree\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -p PRECISION, --precision PRECISION\n                        Branch length precision (i.e., number of decimal\n                        places to print).\n  -b, --dont_bifurcate_polytomies\n                        Switch off conversion of node polytomies to\n                        bifurcating\n  -c COLLAPSE, --collapse COLLAPSE\n                        Collapse nodes with support values less than this.\n```\n\n#### Collapse branches\n\nCollapse branches with less than 0.5 support:\n\n```{bash}\nbudgitree smuggle treefile.tre -c 0.50\n```\n\n#### Print tree with branch supports to 20 decimal places (remove exponential notation):\n\n```{bash}\nbudgitree smuggle treefile.tre -p 20\n```\n\n#### Stop removal of polytomies during run:\n\nIf for some reason you would like to retain the polytomies, switch the feature off:\n\n```{bash}\nbudgitree smuggle treefile.tre -b\n```\n\n#### Combine the options\n\nRemove polytomies, print branch lengths to 15 decimal places, collapse nodes \u003c0.5:\n\n```{bash}\nbudgitree smuggle treefile.tre -p 15 -c 0.5\n```\n\n## Installation\n\nUsing `pip`:\n\n```{bash}\npip3 install budgitree\n```\n\nThe development version:\n\n```{bash}\npip3 install git+https://github.com/schultzm/Budgitree.git\n```\n\n\n## Testing\n\nRun the test suite to check the software works as intended:\n\n```{bash}\nbudgitree test\n```\n\n## Version\n\nPrint the version to stdout:\n\n```{bash}\nbudgitree version\n```\n\n## Etymology\n\nThe budgerigar, or \"**budgi**e\", is an Australian bird (_Melopsittacus undulatus_), keeping \nwith an Australian theme.  The software sets di**git**s on branches on\nphylogenetic **tree**s.  The `smuggle` feature of `budgitree` has to do with an Australian\njoke involving budgies and swimwear...\n\n🌲\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschultzm%2Fbudgitree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschultzm%2Fbudgitree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschultzm%2Fbudgitree/lists"}