{"id":18989799,"url":"https://github.com/cdcgov/patristic","last_synced_at":"2026-04-13T19:30:17.576Z","repository":{"id":57320825,"uuid":"160393749","full_name":"CDCgov/patristic","owner":"CDCgov","description":"A Phylogenetics toolkit for Javascript","archived":false,"fork":false,"pushed_at":"2023-12-20T18:06:56.000Z","size":529,"stargazers_count":7,"open_issues_count":5,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-01T22:03:17.893Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://cdcgov.github.io/patristic/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CDCgov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-04T17:21:36.000Z","updated_at":"2023-12-08T22:47:51.000Z","dependencies_parsed_at":"2023-12-20T19:25:13.520Z","dependency_job_id":null,"html_url":"https://github.com/CDCgov/patristic","commit_stats":{"total_commits":133,"total_committers":7,"mean_commits":19.0,"dds":"0.21052631578947367","last_synced_commit":"e51a23401765558267ccb993b4c061d5996df600"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDCgov%2Fpatristic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDCgov%2Fpatristic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDCgov%2Fpatristic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CDCgov%2Fpatristic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CDCgov","download_url":"https://codeload.github.com/CDCgov/patristic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240002228,"owners_count":19732165,"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":"2024-11-08T17:07:58.651Z","updated_at":"2026-04-13T19:30:17.516Z","avatar_url":"https://github.com/CDCgov.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# patristic\n\n`patristic` is a javascript toolkit for working with phylogenies. It can:\n\n* [Parse newick](https://cdcgov.github.io/patristic/docs/#parsenewick) into\n[Javascript objects representing the phylogenetic tree](https://cdcgov.github.io/patristic/docs/#branch)\n* Run [rapid neighbor joining](http://pure.au.dk/ws/files/19821675/rapidNJ.pdf)\nto [compute a phylogenetic tree from a distance matrix](https://cdcgov.github.io/patristic/docs/#parsematrix)\n* [Infer a patristic distance matrix](https://cdcgov.github.io/patristic/docs/#tomatrix)\nfrom a phylogenetic tree\n* [Reroot a tree on any given Branch](https://cdcgov.github.io/patristic/docs/#reroot)\n* [Infer directionality between two Branches in the tree](https://cdcgov.github.io/patristic/docs/#sources)\n* [...And quite a bit more.](https://cdcgov.github.io/patristic/docs/#table-of-contents)\n\n## Installation\n\nTo install patristic with NPM use: `npm install --save patristic`\n\n## Usage\n\nPlease note that this is a beta-stage API and may change (possibly dramatically)\nin the very near future.\n\n### Quick Start\n\n```javascript\nvar newick = \"(A:0.1,B:0.2,(C:0.3,(D:0.4,E:0.6):0.1):0.5);\";\nvar tree = patristic.parseNewick(newick);\n```\n\nWe can use this tree to compute a patristic distance matrix.\n\n```javascript\nvar matrix = tree.toMatrix();\n```\n\nNote that elements in the tree object maintain references to their parents,\ncreating circular references. If you need a tree without circular references for\nserialization:\n\n```javascript\ntree.toObject();\n```\n\n(`tree.toJSON` aliases that, so you can `JSON.stringify` a Branch and it just\nworks. 😉)\n\nFor more details, check out our [Full Documentation](https://cdcgov.github.io/patristic/docs/#table-of-contents).\n\n## Public Domain\nThis repository constitutes a work of the United States Government and is not\nsubject to domestic copyright protection under 17 USC § 105. This repository is in\nthe public domain within the United States, and copyright and related rights in\nthe work worldwide are waived through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).\nAll contributions to this repository will be released under the CC0 dedication. By\nsubmitting a pull request you are agreeing to comply with this waiver of\ncopyright interest.\n\n## License\nThe repository utilizes code licensed under the terms of the Apache Software\nLicense and therefore is licensed under ASL v2 or later.\n\nThis source code in this repository is free: you can redistribute it and/or\nmodify it under the terms of the Apache Software License version 2, or (at your\noption) any later version.\n\nThis source code in this repository is distributed in the hope that it will be\nuseful, but WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software\nLicense for more details.\n\nYou should have received a copy of the Apache Software License along with this\nprogram. If not, see http://www.apache.org/licenses/LICENSE-2.0.html\n\nThe source code forked from other open source projects will inherit its license.\n\n## Privacy\nThis repository contains only non-sensitive, publicly available data and\ninformation. All material and community participation is covered by the\nSurveillance Platform [Disclaimer](https://github.com/CDCgov/template/blob/master/DISCLAIMER.md)\nand [Code of Conduct](https://github.com/CDCgov/template/blob/master/code-of-conduct.md).\nFor more information about CDC's privacy policy, please visit [http://www.cdc.gov/privacy.html](http://www.cdc.gov/privacy.html).\n\n## Contributing\nAnyone is encouraged to contribute to the repository by [forking](https://help.github.com/articles/fork-a-repo)\nand submitting a pull request. (If you are new to GitHub, you might start with a\n[basic tutorial](https://help.github.com/articles/set-up-git).) By contributing\nto this project, you grant a world-wide, royalty-free, perpetual, irrevocable,\nnon-exclusive, transferable license to all users under the terms of the\n[Apache Software License v2](http://www.apache.org/licenses/LICENSE-2.0.html) or\nlater.\n\nAll comments, messages, pull requests, and other submissions received through\nCDC including this GitHub page are subject to the [Presidential Records Act](http://www.archives.gov/about/laws/presidential-records.html)\nand may be archived. Learn more at [http://www.cdc.gov/other/privacy.html](http://www.cdc.gov/other/privacy.html).\n\n## Records\nThis repository is not a source of government records, but is a copy to increase\ncollaboration and collaborative potential. All government records will be\npublished through the [CDC web site](http://www.cdc.gov).\n\n## Notices\nPlease refer to [CDC's Template Repository](https://github.com/CDCgov/template)\nfor more information about [contributing to this repository](https://github.com/CDCgov/template/blob/master/CONTRIBUTING.md),\n[public domain notices and disclaimers](https://github.com/CDCgov/template/blob/master/DISCLAIMER.md),\nand [code of conduct](https://github.com/CDCgov/template/blob/master/code-of-conduct.md).\n\n## Updates\nResolve backward branches","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdcgov%2Fpatristic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdcgov%2Fpatristic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdcgov%2Fpatristic/lists"}