ApE, a plasmid editor, installation on Linux (Debian)

UPDATE 2017-06: The easiest way to have a running ApE under Linux, which became critical for me after switching permanently to Linux at work, is to recover a Mac App bundle from the author’s web site: http://biologylabs.utah.edu/jorgensen/wayned/ape/Download/Mac/Ape_OSX_current.zip

After unzipping to a local folder, just launch the application (in my case):

wish /home/username/thefolder/ApeMac/Ape_8_6_0.app/

Tcl/Tk need to be installed to have the wish command available.

You can even alter the preferences of your file manager to open .ape files by using the same command followed by “%F” (on Ubuntu 17.04, MATE, Caja file manager).

UPDATE 2018-04: For portability among Linux installations, the `AppMain.tcl` can be packed with the `tclkit`, making it a single executable file (Starkit, for StandAlone Runtime). It takes about five minutes to follow the instructions from the tcl/tk wiki. It needs the sdx (Starkit Developer eXtension) application and a tclkit.

The first command creates a compressed folder containing the script and the associated tclkit resources. The second command unzips the folder, which allows the third command to create the runnable application file.

tclkit sdx.kit qwrap example.tcl
tclkit sdx.kit unwrap example.kit
tclkit sdx.kit wrap example -runtime tclkitcopy

OLDER CONTENT – safe to ignore follows:

ApE is the most useful DNA editor I know of. Although installation on Windows and Mac OS X is easy through pre-packaged binaries, Linux installation may be a little bit more complex. Don’t be discouraged – nice people, with the help from the ApE author himself, discovered all that is there to know about how to do it properly. Some useful information comes from the Ape wiki:

Information from http://pastebin.com/fJNjcW1G about how to install Ape on Linux (you might get some error results from wget, standard browser pointing to the address should work better):

# download latest windows version/package
 >wget http://biologylabs.utah.edu/jorgensen/wayned/ape/Download/Windows/ApE_win_current.zip
 >unzip ApE_win_current.zip
 # download & setup tclkit (http://equi4.com/tclkit/index.html)
 >wget http://www.equi4.com/pub/tk/8.5.1/tclkit-linux-x86.gz
 >gunzip tclkit-linux-x86.gz 

 #make the binary executable:
 >chmod +x tclkit-linux-x86
 # download SDX (Starkit Developer eXtension)
 # http://equi4.com/starkit/sdx.html
 wget http://equi4.com/pub/sk/sdx.kit
 # unwrap & run ApE
 ./tclkit-linux-x86 sdx.kit unwrap ApE.exe
 ./tclkit-linux-x86 ApE.vfs/main.tcl

A recent version of the Tclkit can be recovered from:

Two i386 libraries were required for ApE  to work on a Debian install (wheezy, 7.7, 64 bit version):

>su - root
>apt-get install libxss1:i386
>apt-get install libxft2:i386

The old Ape version for Linux works with base Tcl/Tk, but lacks some of the nice features of the ApE 2 series.
Newer versions require some extensions from the tclkit.

Don’t forget to chmod +x the tclkit binary

Proof that it works:

ApE screen shot
ApE screen shot

🙂    🙂


EDIT: The 2.0.7 version is in fact available and works directly with wish. Once unzipped, just ‘cd’ to the ‘ApE Linux’ directory and from there > wish AppMain.tcl  . This even works under Mac OS X Mavericks with Tcl/Tk 8.5.9!


6 thoughts on “ApE, a plasmid editor, installation on Linux (Debian)

  1. Hi,
    just followed this tutorial and it doesn’t seem to work on debian testing (‘jessie’). I always get this error message:

    me@laptop>> ~/ext_software/ape$ ./tclkitsh-8.5.9-linux-ix86 ApE.vfs/main.tcl
    couldn’t load file “~/ext_software/ape/ApE.vfs/lib/tk8.5/../libtk8.5.so”: ~/ext_software/ape/ApE.vfs/lib/tk8.5/../libtk8.5.so: cannot open shared object file: No such file or directory
    while executing
    “load ~/ext_software/ape/ApE.vfs/lib/tk8.5/../libtk8.5.so Tk”
    invoked from within
    “if {[lsearch -exact [info loaded] {{} Tk}] >= 0} {
    load “” Tk
    } else {
    load ~/ext_software/ape/ApE.vfs/lib/tk8.5/../libtk8.5.s…”
    (“package ifneeded Tk 8.5.0” script)
    invoked from within
    “package require Tk 8.5”
    (file “~/ext_software/ape/ApE.vfs/lib/app-AppMain/AppMain.tcl” line 27)
    invoked from within
    “source ~/ext_software/ape/ApE.vfs/lib/app-AppMain/AppMain.tcl”
    (“package ifneeded app-AppMain 1.0” script)
    invoked from within
    “package require app-AppMain”
    (file “ApE.vfs//main.tcl” line 4)

    Seems like a path problem since I can find the Tk8.5 in the lib folder….
    Any suggestions?


  2. Hi Nic and thank you for pointing out the problem. I forgot to mention the install I did was on Debian stable (wheezy), 64 bit version, maybe it has something to do with the paths and available libraries. I’ll try out the installation of ApE on a fresh jessy and see if I reproduce the error.

    As an alternative, you can try to see if the older ApE version for Linux works (from http://biologylabs.utah.edu/jorgensen/wayned/ape/Download/Linux/). As indicated in this blog post (http://www.allandebono.org/show/protocols/ape-for-ubuntu/) this older version does not require the tclkit and works with Tcl/Tk directly. It does not have all the bells and whistles of the latest versions and is a little ugly but works.

    Last alternative, least satisfying, is to run the Windows version under Wine. However, in that case, the program complains about registry entries and cannot save any preference, so it’s a desperate solution.

  3. Even if it’s been a long time from my previous reply, I have some good news and edited the post accordingly. Version 2.0.7 of ApE seems to work fine on both Debian based Ubuntu 14.10 and under Mac OS X Mavericks as long as a recent, or not even that recent, version of Tcl/Tk is available. This version is missing a few things but nothing essential.

  4. Hello,
    I get an error “Cannot create ‘ApE.vfs’ directory”, do you know what am i missing? Thanks!

  5. Hi and sorry for being late with my reply. Did you try the native version of ApE (2.0.7) ? I found that solution to be the nicest and easiest (installed on three different Linux distributions, including Ubuntu and Debian).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s