Repository navigation
Description
The sequence GUI tool Scripts/SeqGui/SeqGui.py does not have a dedicated maintainer and has only really seen trivial updates for style or compatibility since it was contributed back in 2000 by Cayte.
See also http://biopythongui.blogspot.co.uk/2008/08/gui-seq.html and https://sites.google.com/site/biopythongui/download from 2008 by Wubin Qu (@quwubin)
Based on http://wiki.wxpython.org/How%20to%20install%20wxPython I was able to install wx on my Mac, and run it with the Apple provided Python 2.7
$ sudo pip2.7 install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
Password:
The directory '/Users/xxx/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/xxx/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting wxPython_Phoenix
Downloading http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev2076+9cbca77-cp27-cp27m-macosx_10_6_intel.whl (30.0MB)
100% |████████████████████████████████| 30.0MB 12.4MB/s
Installing collected packages: wxPython-Phoenix
Successfully installed wxPython-Phoenix-3.0.3.dev2076+9cbca77
$ python2.7 -c "import wx; print(wx.__version__)"
3.0.3.dev2076+9cbca77
$ python2.7 Scripts/SeqGui/SeqGui.py
Scripts/SeqGui/SeqGui.py:87: wxPyDeprecationWarning: Call to deprecated item __call__. Use :meth:`EvtHandler.Bind` instead.
wx.EVT_BUTTON(self, ID_CLOSE, self.OnClose)
Scripts/SeqGui/SeqGui.py:88: wxPyDeprecationWarning: Call to deprecated item __call__. Use :meth:`EvtHandler.Bind` instead.
wx.EVT_BUTTON(self, ID_APPLY, self.OnApply)
Scripts/SeqGui/SeqGui.py:89: wxPyDeprecationWarning: Call to deprecated item __call__. Use :meth:`EvtHandler.Bind` instead.
wx.EVT_BUTTON(self, ID_CLEAR, self.OnClear)
Scripts/SeqGui/SeqGui.py:228: wxPyDeprecationWarning: Call to deprecated item __call__. Use :meth:`EvtHandler.Bind` instead.
wx.EVT_MENU(self, ID_EXIT, self.exit)
Notice the deprecation warning. Also the list of genetic codes needs to be extended.
Sadly it didn't like my self-compiled Python 3.5,
$ pip3.5 install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix
Collecting wxPython_Phoenix
Downloading http://wxpython.org/Phoenix/snapshot-builds/wxPython_Phoenix-3.0.3.dev2076+9cbca77-cp35-cp35m-macosx_10_6_intel.whl (30.0MB)
100% |████████████████████████████████| 30.0MB 11.9MB/s
Installing collected packages: wxPython-Phoenix
$ python3.5 -c "import wx; print(wx.__version__)"
3.0.3.dev2076+9cbca77
$ python3.5 Scripts/SeqGui/SeqGui.py
This program needs access to the screen. Please run with a
Framework build of python, and only when you are logged in
on the main display of your Mac.
I tried on a Linux machine but it seems I didn't have (the right) GTK libraries installed.
See also #848 about deprecating and removing Scripts/xbbtools/xbb*.py.
Should we deprecate SeqGui.py?
Activity
peterjc commentedon Jun 10, 2016
Also resizing the window partly works (testing with Python 2.7 on the Mac), but does not take the full vertical space available.
Startup size:
Resized:
MarkusPiotrowski commentedon Jun 10, 2016
I would vote for doing the same with
SeqGuiandXbbtools(#848), either remove both or update both. If we decide for the latter, I would volunteer.peterjc commentedon Jun 10, 2016
Thank you! Longer reply on #848.
MarkusPiotrowski commentedon Jun 13, 2016
Here's the tkinter version of
SeqGui. Since most of the code was forbuilding the GUI and tkinter and wxPython are quite different, I rewrote
the program from scratch. I didn't change much on the functionality of
the program, the main 'progress' is that the codon tables are not longer
hardwired but imported from
Bio.Data.CodonTablesinstead. Here is howit looks on Windows 7 (left: old, wxPython, right: updated, tkinter):
untitled-2
https://cloud.githubusercontent.com/assets/4503120/16007311/f6c89cdc-3171-11e6-8182-3c4c5e2062bd.png
Before starting a pull request, I would be happy if some people could
test the code on Python 2/Python 3 and on several platforms (this is a
small script with minimal functionality). PEP8 should be OK, but I'm
sure that QuantifiedCode will complain about the
*imports; this is,however, the de facto standard when using tkinter.
You find the code on this Gist:
https://gist.github.com/MarkusPiotrowski/f44505ac45c25207f2662ba0bd3edbdd
-Markus
peterjc commentedon Jun 13, 2016
Looks good at first glance, and shorter than the original as a bonus :)
peterjc commentedon Jun 22, 2016
Thanks to Markus volunteering,
SeqGuihas been updated (see #586). There is more that could be added, perhaps taking on functionality fromXbbtools? I will leave that to you to decided @MarkusPiotrowski - thank you!