Skip to content

hshyk/PhyloTiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhyloTiler

Requirements

  • You must have Perl installed
  • You must have Inkscape installed
  • You must have VIPS installed
  • The following CPAN modules need to be installed:
    • Bio::Phylo
    • XML::Simple
    • Image::Size
    • File::Path
    • File::Copy
    • File::Copy::Recursive
    • Config
    • JSON

##Installation You must install the following to run the program:

OS X Specific Installation Issues

To install Inkscape, download XQuartz and install it (http://xquartz.macosforge.org/landing/) and then download and install Inkscape (http://inkscape.org/download/).

  1. Install libffi:
  2. ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz

  3. Install gettext:
  4. http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.2.tar.gz

  5. Intall glib:

  6. ``` curl http://ftp.gnome.org/pub/gnome/sources/glib/2.31/glib-2.31.14.tar.xz -o glib.tgz ```
    ```tar zxf glib.tgz ```

  7. Before running ./configure, apply the following patch:
  8. edit glib/glib/gconvert.c line 61:

          #if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)
         /* #error GNU libiconv in use but included iconv.h not from libiconv */
          #endif
          #if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H)
          /* #error GNU libiconv not in use but included iconv.h is from libiconv */
          #endif

  9. Install vips:
  10. http://www.vips.ecs.soton.ac.uk/supported/current/vips-7.38.5.tar.gz

Windows Specific Installation Issues

Once Inkscape and VIPS are installed, make sure to set their install directories in your PATH environment variable.

Running the Script

You can run the script from the command line. The script takes two parameters. The first is the location of the Tree file. The second is the location of the metadata file. An example is phylo.pl Tree.tre metadata.txt. To run the examples included in the files:

phylo.pl example/Viburnum.tre example/info.txt

The script will output the following into your target destination from your configuration:

  • treeviewer.html - The actual viewer
  • tiles - The tile images folder for the viewer
  • js - Javascript folder for the viewer
  • css - CSS folder for the viewer
  • files - Contains the NEXUS, NeXML and SVG representation of the tree

Configuration

The configuration is read from an XML file, config.xml. The following is available to configure:

  • Zoom - Minimum: The minimum zoom for the Google Maps tile viewer. Default: 1
  • Zoom - Maximum: The maximum zoom for the Google Maps tile viewer. This will determine the image size and how many levels to tile the image. Default: 5
  • Shape: The shape of the tree. Default: RECT. Available modes: RECT,DIAG,CURVY,RADIAL
  • Destination: The file location where you would like the package files to go. Default: package (same folder as source files)

There is a metadata template file, template.txt, which can be used to add metadata records. You can open template.txt with Excel. The bigger the size of the tree, the better details you will get.

The metadata file contains the following fields:

  • LEFT NAME - Left name.
  • RIGHT NAME - Right name.
  • IMAGE - An image for the popup window when the point in the tree is clicked.
  • CONTENT - The text for the popup window when the point in the tree is clicked.
  • LINK - A clickable link for the popup window when the point in the tree is clicked.
  • HOVER TEXT - Text that will appear next to the point.
  • ZOOM LEVELS - You can set the zoom level of the Google Map at which the point will appear or not appear. The format should use a comma to separate the numbers, eg. 2,3,5 If nothing is set, it will show on all levels.

Please note that when a bigger tree is being generated, it may take longer for the script complete.

License

Released under the GNU GENERAL PUBLIC LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published