[BioPython] Re: plans for next release

thomas@cbs.dtu.dk thomas@cbs.dtu.dk
Tue, 5 Dec 2000 08:53:58 +0100 (CET)


> thomas wrote
> > Ok - I just came back from egypt. Of course there is no need at all for
> > using posix.posixpath - thats still left from my novice days :-)
> > I fix that and try to remove all Pmw widgets (its easy to implement the
> > scrolled things in pure Tk)
> >

> Cayte wrote
> 
>   Egypt sounds like a fascinating place to visit!  Late fall sounds like the
> right time, too, with cooler weather.

and nice snorkling too :-)
> 
>   Have you ever considered wxPython?  I have a tool, SeqGui.py, in wxPython,
> that's sort of like xbbtools.py  I find it easier to work with than Tkinter.
> Back in May, we had a thread about Gui support. Its in the archives.

#################
# It seems that my reply didn't make it through sendmail :-( - I try to
# reconstruct ...
#########

The main reasons for my sticking to Tkinter are the fact that I have used
Tcl/Tk a lot before I discovered python - I have tons of Tk snippets from
my previous bioinformatic work (Biowish, GRS, XBbtools, CapDB etc.) which
is very easy to convert into shorter, cleaner and more efficient python Tk
code. Maybe the biggest advantage in using Tkinter is the powerful Tk
Canvas, as far as I know neither wxPython or Gtk python have anything close
to the canvas widget.

> 
>   I'd like the gui to eventually support color highlighting of features, for
> example, regions of high consensus.
> 

I don't know how this works in wxPython, but in Tkinter it is already
there from the beginning. Every line, rectangle etc. you draw in the
canvas is an unique object and gets an id. You can very easy bind any event
(e.g. MouseOver, DoubleClickButton1 etc.) to any function. To highlight
different genes or sequence regions is just to group the according id's and
bind a color-change on a MouseOver event.

e.g. my recently accepted paper about phylogenomics with python (NAR nr2
2001) deals with the interactive display of all genes, phylogenetic
trees, blast results for a microbial genome (between 1000 and 5000 times
3). 
I have no fancy webpage yet but you can check a screenshot of the
phylome of the Bacteria Thermotoga maritima
at http://www.cbs.dtu.dk/thomas/pyphy/pyphy.png
(Phylome = set of all phylogenetic trees for a genome. 
 color coding for the kingdom of the closest neighbor in the phylogenetic
 tree: blue = Bacteria, yellow = Archaea, red = Eukarya)

Here the phylome map is an interactive display of all phylogenetic trees
and genes (colored lines in the circle), where each line/gene is sensitive
to mouse movement. A MouseOver event displays gene information in the top
Entry, Button1Click shows the phylogenetic tree, Button3 shows a gene
specific popupmenu for blastresults, alignments etc.
Each gene can be a member of a metabolic pathway, where selecting a pathway
in the right listbox changes the width and the arrow shape of each gene
associated (canvas tag) with the pathway.

The advantage here is zooming, resizing, moving and event grabbing is part
of the canvas widget so we only need to redraw single objects.

I have never worked with wxPython - what is exactly the strength of
wxWindows ? I guess it is faster than Tkinter, are there any special
features not found in the rest of the GUI family ?


c ya
-thomas

Sicheritz Ponten Thomas E.  CBS, Department of Biotechnology
thomas@biopython.org        The Technical University of Denmark
CBS:  +45 45 252485         Building 208, DK-2800 Lyngby
Fax   +45 45 931585         http://www.cbs.dtu.dk/thomas/index.html

        De Chelonian Mobile ... The Turtle Moves ...