(Modified 2013 Nov 19)
SPIDER/SPIRE installation
SPIDER is an image-processing package from the Wadsworth Center, used for analysis of data from electron microscopy and related fields. SPIDER itself is a command-line program with an internal scripting language. It is accompanied by the JWEB display program and the SPIRE reconstruction engine.
Installation instructions for SPIDER
Change shells to TC-shell (optional, but some of the steps below assume the C- or TC-shell).
chsh -s /bin/tcsh
The default for me was bash, in which I don't know much how to set variables. You may need to install csh/tcsh with: sudo apt-get install tcsh
Go to the SPIDER download page, fill out the form, and download SPIDER. The form is helpful to to the developers to demonstrate usage of the program.
Unpackage the tarball:
tar -zxf spiderweb.(VERSION).tar.gz
I added the following to my .cshrc file (more in the box below). Adjust names accordingly. Specifically, check the "best" executable that runs on your hardware, e.g., spider_linux_mp_opt64 or spider_linux_mp_intel.
setenv SPMAN_DIR "/home/tapu/local/spider/man/" setenv SPPROC_DIR "/home/tapu/local/spider/proc/" alias spider /home/tapu/local/spider/bin/spider_linux_mp_intel setenv SPBIN_DIR "/home/tapu/local/spider/bin/"
Installation of X-Window WEB
Unpacking the SPIDER tarball as above should have created a web/ directory alongside the spider directory. In my case, it'd be /home/tapu/local/web/
Try both executables in the web/bin directory: web_linux_dir and web_linux_tru.
As an approximation, the former works better with KDE, and the latter works better with GNOME.
In particular, the backgrounds for the slidebars and menus might go haywire, i.e., black text on a black background.
Add the following lines to you .cshrc file (using the appropriate directory path and executable):
setenv SPRGB_DIR /home/tapu/local/web/rgb alias web /home/tapu/local/web/bin/web_linux_(VERSION)
(For me, on Xubuntu, web_linux_tru worked better.) More about the .cshrc file in the box below.
More detailed instructions can be found at the SPIDER home page.
If you get the error:
error while loading shared libraries: libXmu.so.6: cannot open shared object file: No such file or directory
...you may be missing 32-bit libraries (described in more detail below). Type:
sudo apt-get install libxmu6:i386
WEB will hopefully work now.
Installation of JWEB
Change to the directory web/jweb/linux/, relative to the directory where you unpackaged the tarball.
./j2re-1_4_2_06-linux-i586.bin
If you get a tail error, see issue #2 at the JWEB link below.
cd j2re1.4.2_06/
../jai-1_1_2_01-lib-linux-i586-jre.bin
Insert the contents of jweb.cshrc to your .cshrc file.
If, when you try to run JWEB, you see errors of the following form:
libXp.so.6: cannot open shared object file: No such file or directory
libXtst.so.6: cannot open shared object file: No such file or directory
You may be missing required 32-bit libraries. So, type:
sudo apt-get install libxp6:i386 libxtst6:i386
I had needed to install xorg-libs on a system once. That package doesn't exist anymore in Ubuntu.
Maybe the libxp6 and libxtst6 (see below) took its place.
More complete information can be found at the JWEB installation page.
Installation of SPIRE
SPIRE is included in the main SPIDER download tarball. Upon installation of SPIDER, there will be a subdirectory called spire/
Since SPIRE is updated less often than SPIDER, I prefer to unpackage the tarball outside of the SPIDER directory. Unpackage the tarball:
tar -xf spire_linux-1.5.5.tar
Change to the SPIRE directory:
cd spire_linux-1.5.5/
(Optional) I have some non-default/updated SPIRE programs that I like to use. Copy the tarball spire-suppl.tar to your SPIRE directory and extract it by typing:
tar xf spire-suppl.tar
A description of the contents is listed here. To run them (after installing the rest of SPIRE), leave out the .py ending.
Run the installation script:
./install.sh
The installation script will ask the following questions:
if the default choice for SPIDER executable is okay. If not, enter the full path for the replacement. (Usually, the default is fine.)
if the default choice for WEB executable is okay. (The default here is also usually fine, identical to what's in the jweb.cshrc file.)
whether it's okay to replace the directory Spire/ in the directory site-packages/.
Answer: y
The SPIDER-related part of my .cshrc is as below:
set path = ( \ . \ $path \ /home/tapu/local/spider/spire/spire_linux-1.5.5/bin) setenv SPMAN_DIR "/home/tapu/local/spider/man/" setenv SPPROC_DIR "/home/tapu/local/spider/proc/" setenv SPBIN_DIR "/home/tapu/local/spider/bin/" alias spider /home/tapu/local/spider/bin/spider_linux_mp_intel # For X-Window WEB setenv SPRGB_DIR /home/tapu/local/web/rgb alias web /home/tapu/local/web/bin/web_linux_tru # For use with JWeb, edit following line for actual path of your 'JWeb" # directory then place all lines in users 'C' shell startup file (.cshrc) setenv JWEB_DIR /home/tapu/local/web/jweb/linux setenv JAIHOME $JWEB_DIR/j2re1.4.2_06/lib setenv JWEBCLASSPATH $JWEB_DIR/linux.WEB.jar:$JAIHOME/mlibwrapper.jar:$JAIHOME/jai_core.jar:$JAIHOME/jai_codec.jar # Add JWeb and JAI libraries to your $CLASSPATH if ( $?CLASSPATH ) then setenv CLASSPATH ${JWEBCLASSPATH}:$CLASSPATH else setenv CLASSPATH $JWEBCLASSPATH endif if ( $?LD_LIBRARY_PATH ) then setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/X11R6/lib else setenv LD_LIBRARY_PATH /usr/X11R6/lib endif # Create alias for JWeb location and set maximum memory usage alias jweb '$JWEB_DIR/j2re1.4.2_06/bin/java -Xmx512m -Djava.util.prefs.syncInterval=2000000 web/StartWeb'
More information can be found at the SPIRE installation page.
"Unable to load" SPIRE error
With 2 examples (both relatively recent installs), I saw errors of the following form:
tapu% montage classavg0* computing if images will fit on screen... Unable to load classavg001.dat Unable to load classavg002.dat Unable to load classavg003.dat Unable to load classavg004.dat no images loaded Traceback (most recent call last): File "/home/tapu/local/spider/spire/spire_linux-1.5.5/scripts/montage.py", line 446, in mn.makeMenus() File "/home/tapu/local/spider/spire/spire_linux-1.5.5/scripts/montage.py", line 172, in makeMenus variable=self.showVar, AttributeError: montage instance has no attribute 'showVar'
These classavg*** files existed, of course.
The fix was to do the following from the command line:
/home/tapu/local/spider/spire/spire_linux-1.5.5/python
(Substitute the path of your version of SPIRE's Python executable. Typing where python on many systems gives you a list of options.)
>>> import _imaging (from the Python environment)
If the error says, "ImportError: libjpeg.so.62: cannot open shared object file: No such file or directory",
then the package libjpeg62 is missing/incorrect.
Exit Python (with CTRL-d).
Install libjpeg62. In Debian-based systems (e.g., Ubuntu), the command would be:
sudo apt-get install libjpeg62
NOTES:
If your repository cache is old, your system may ask to check for newer versions.
If you're running a 64-bit system, libjpeg62 may be installed already, and it is the 32-bit version that is missing.
To specify the 32-bit version, the syntax is instead:
sudo apt-get install libjpeg62:i386
More information about the 32-bit library problem can be found above.
SPIRE's display programs will hopefully work now.
32-bit library problems
With 64-bit machines more common, the 32-bit libraries required for SPIRE and JWEB may not be installed by default. If not, you will need to install the 32-bit versions yourself.
For SPIRE, type:
sudo apt-get install libjpeg62:i386
More details about issues with SPIRE above.
For JWEB, type:
sudo apt-get install libxp6:i386
sudo apt-get install libxtst6:i386
More details about issues with JWEB above.
For X-Window WEB, type:
sudo apt-get install libxmu6:i386
More details about issues with WEB above.
More details about dealing with apt-get here.
This page is Lynx-enhanced