网页 综合 更新时间 2026-11-17 08:53:35

Interactive web tree visualization — ETE Toolkit - analysis and visualization of trees

自动蜘蛛 etetoolkit.org 正文约 2944 字
Starting at version 2.1, ETE provides a module to interactively display trees within web pages. This task is not straightforward, but ETE tries to simplify it by providing a basic WebTreeApplication class that can be imported in your python web applications.
WebTreeApplication implements a transparent connector between ETE’s functionality and web application. For this, a pre-built WSGI application is provided.
Through this application, you will be able to create custom web implementations to visualize and manipulate trees interactively. Some examples can be found at the PhylomeDB tree browser or in the ETE’s online treeviewer.
Alternatively, a virtual X system such as XVFB has been reported to work in servers without a proper X backend. Just install XVFB and preface your ETE commands with xvfb-run.
xvfb-run python MyETEscript.py
All modern linux desktop installations include a graphical interface (called X server). However web servers (in which the ETE plugin is expected to run) may not count with a X server.
In order to render tree images with ETE, you will need to install, at least, a basic X server. Note that the X server does not require a desktop interface, such as Gnome or KDE.
In Ubuntu, for instance, a basic X server called xdm can be installed as follows:
apt-get install xserver-xorg xdm xfonts-base xfonts-100dpi xfonts-75dpi
Once the X server is installed, you will need to configure it to accept connections from the web-server.
In our example, edit the /etc/X11/xdm/xdm-config file and set following values:
Do not forget to restart your xdm server.
/etc/init.d/xdm restart
If you plan to use web tree application in a linux desktop computer, then the X server is already installed. You will only need to give permissions to the web-server (i.e. apache) to connect your display. Usually, as simple as running the following command in a terminal:
You will need to add support for WSGI application to your web server. In the following steps, an Apache2 web server will be assumed.
Configuration will depend a lot on your specific system, but this is an example configuration file for the default site of your Apache server (usually at /ete/apache2/sites-available/default):
/var/www/webplugin/wsgi/ is the folder in which python web application will be located. Make sure that the apache WSGI config enables this folder to run wsgi-scripts.
/var/www/webplugin/ is assumed to be the directory in which your application will run.
/var/www/webplugin/tmp/ should be writable by the web-server (i.e. chmod 777)
ETE’s WebTreeApplication uses WSGI in the backend, and a several javascript files in the frontend. Basic files are included as an example in the ETE installation package examples/webplugin. The whole example folder is necessary, and it contains a commented copy of a web-tree implementation examples/webplugin/wsgi/webplugin_example.py.
© Copyright 2015, The ETE Toolkit Team. Last updated on Mar 18, 2016.
访问原文 返回搜索 http://etetoolkit.org/docs/latest/tutorial/tutorial_webplugin.html
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。