Skip to content

Review status of Scripts/SeqGui/SeqGui.py #849

Closed

Description

@peterjc

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

  1. peterjc commented on Jun 10, 2016

    @peterjc
    MemberAuthor

    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:

    screenshot 2016-06-10 10 30 38

    Resized:

    screenshot 2016-06-10 10 31 04

  2. MarkusPiotrowski commented on Jun 10, 2016

    @MarkusPiotrowski
    Contributor

    I would vote for doing the same with SeqGui and Xbbtools (#848), either remove both or update both. If we decide for the latter, I would volunteer.

  3. peterjc commented on Jun 10, 2016

    @peterjc
    MemberAuthor

    Thank you! Longer reply on #848.

  4. MarkusPiotrowski commented on Jun 13, 2016

    @MarkusPiotrowski
    Contributor

    Here's the tkinter version of SeqGui. Since most of the code was for
    building 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.CodonTables instead. Here is how
    it 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

  5. peterjc commented on Jun 13, 2016

    @peterjc
    MemberAuthor

    Looks good at first glance, and shorter than the original as a bonus :)

  6. peterjc commented on Jun 22, 2016

    @peterjc
    MemberAuthor

    Thanks to Markus volunteering, SeqGui has been updated (see #586). There is more that could be added, perhaps taking on functionality from Xbbtools? I will leave that to you to decided @MarkusPiotrowski - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions