-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95145f2
commit 7fbd28c
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
# Phy2HTML | ||
|
||
Phy2HTML is a simple Python program that is designed to read a tree in Newick format and create a visualization of the tree for display in a webpage using only HTML and CSS. No Java, Javascript, SVG, or embedded images. It works by creating a fine CSS based-grid and adding appropriate cell borders to "draw" the tree. The output html and css are kept deliberately minimalistic to readily allow you to embed the code into other sites or workflows. | ||
Phy2HTML is a simple Python program that is designed to read a tree in Newick format and create a visualization of the tree for display in a webpage using only HTML and CSS. No Java, Javascript, SVG, or embedded images, and readily scalable. It works by creating a CSS based-grid and adding appropriate cell borders to "draw" the tree. The output html and css are kept deliberately minimalistic to readily allow you to copy/embed the code into other pages or workflows. | ||
|
||
The display tree is simplistic compared to what advanced phylogenetic visualization software can do, but it creates an output that may be more appropriate for display in webpages, at least in some circumstances (e.g., you can easily create links from the labels/taxa on the tree to any other page). The display style is simple, but can also be easily modified through simple applicaton of CSS. Tree shape is limited to rectangular branches with the root on the left and tip labels on the right. | ||
The display tree is simplistic compared to what advanced phylogenetic visualization software can do, but it creates an output that may be more appropriate for display on the web, at least in some circumstances (e.g., you can easily create links from the labels/taxa on the tree to any other page). The display style is simple, but can also be easily modified through simple applicaton of CSS. Tree shape is limited to rectangular branches with the root on the left and tip labels on the right. | ||
|
||
The program assumes/requires the tree to be rooted and it cannot contain reticulations, although polytomies are fine. At this time the program does not scale branch lengths; it is designed for display of branching patterns not evolutionary distances. Branches are simply scaled to equal node depths. | ||
The program assumes/requires the tree to be rooted and it cannot contain reticulations, although polytomies are fine. At this time the program does not scale branch lengths; it is designed for display of branching patterns not evolutionary distances. Branches are simply scaled to equal node depths (the program will read branch lengths without a problem, it just doesn't use them). | ||
|
||
You can see a simple example of the output by viewing [test_tree.html](http://htmlpreview.github.io/?https://github.com/msrosenberg/Phy2HTML/blob/master/test_tree.html) in a browser. | ||
|
||
Two sample Newick files are included, one with 11 taxa and one with 66. There is no technical limit to the size of the tree it can display, but very large trees will likely become visually unwieldy just due to the standard scaling issues one would have with any very large tree. | ||
|
||
The code is written in Python 3 and works in vanilla Python with no external dependencies. |