Friday, June 25, 2010

Install AFNI and CTF software packages on Fedora 13 system

MEG CTF software packages work under Linux system.  Fedora is free to use.  Also I learned how to install Fedora from Dr. Tom who is a very good teacher and scientist at NIMH.  Here I wrote down the basic steps for installation.

First, I installed Fedora 13 using installation DVD made myself.  (The content is downloaded from http://fedoraproject.org/)  The procedure is quite straightforward.  Follow the instruction on the screen.  The system was successfully installed.

Second, I installed AFNI using following steps (adapted from AFNI website).

Step 0: enter these commands to prepare for the installation:
      
        cd
        mkdir abin
      

        The first command, 'cd', is used just to make sure the user is in
        their home directory, before issuing further commands.

        The second command, 'mkdir abin' is used to create the directory
        which will be used to store the actual programs from the AFNI
        package.  The main reason that 'abin' (for "AFNI binaries") is
        chosen for a name is to allow the descriptions to be more generic,
        and less dependent upon which operating system is in use.

Step 1: enter these commands to get and unpack the AFNI binary package:
      
        wget http://afni.nimh.nih.gov/pub/dist/tgz/linux_gcc32.tgz
        tar xvfz linux_gcc32.tgz
        mv linux_gcc32/* abin
        rmdir linux_gcc32
      

        The first command, 'wget http://...' is used to actually download
        the AFNI package.  The user may use their browser, pointed to
        pub/dist/tgz to find the linux_gcc32.tgz package, also.

        The second command, 'tar xvfz linux_gcc32.tgz' is used to
        extract the contents (the programs) of the compressed package.
        The options used with this tar command are:
            x - to extract the contents of the archive
            v - verbose, to display files as they are extracted
            f - file, the next argument is the tar file to expand
            z - uncompress the file before extracting its contents
        See 'man tar' for more details.

        The third command, 'mv linux_gcc32/* abin' moves everything from
        the newly extracted linux_gcc32 directory into the abin directory.

        The final command, 'rmdir linux_gcc32' is used to remove the
        empty linux_gcc32 directory, now that its contents have been
        moved to abin.

        Note: this linux_gcc32.tgz package includes SUMA.

Step 2: enter these commands to get and unpack some sample data:
      
        wget http://afni.nimh.nih.gov/pub/dist/edu/data/AFNI_data1.tgz
        tar xvfz AFNI_data1.tgz
      

        The first command, 'wget http://...' is used to download the
        AFNI_data1.tgz sample data package.  This package contains
        SPGR anatomy, EPI time-series data, and an 'afni' directory,
        with datasets made from that raw data.  The user may also use
        their browser to download AFNI_data1.tgz.

        The 'tar xvfz ...' command is to extract the AFNI_data1
        directory from the compressed archive.  The tar options are
        the same as in Step 1.

Step 3: enter this command to add the directory ~/abin to your PATH:
    gedit ~/.bash_profile
    Then you will see a file open and change it to the following contents:

    # .bash_profile

    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi

    # User specific environment and startup programs

    PATH=$PATH:$HOME/abin

    export PATH
  
    Save it.

Step 4: log out and log back in

        This is done to invoke the change to the .cshrc file, meaning
        that any new terminal window would have a command shell with
        ~/abin in the PATH.  It also has the effect of using the
        'rehash' command, which tells the shell (T-shell) to make note
        of all executables in the PATH.

Step 5: open a new terminal window, and start playing!
      
        cd AFNI_data1/afni
        afni
      

        Note that if the 'afni' command fails, you may want to review the
        steps that have been taken.  There are two commands that may help
        resolve any problems:
      
        echo $PATH

It worked.  You might need to install netpbm rpm packages for supporting different image formats. (warning message might look like this)

Initializing: X11.
++++++++ IMAGE SAVE SETUP WARNINGS ++++++++
++ Can't find program ppmtogif AND/OR ppmquant for Save to GIF
++ Can't find program ppm2tiff OR pnmtotiff for Save to TIFF
++ Can't find program ppmtobmp for Save to BMP
++ Can't find program pnmtops for Save to EPS
++ Can't find program pnmtopng for Save to PNG
++ Some of the missing image Save programs are in
++  the netpbm software package, which is freeware.
++  Netpbm can be found at http://netpbm.sourceforge.net/
++ To disable these warnings, set environment
++  variable AFNI_IMSAVE_WARNINGS to 'NO'.
+++++++++++++++++++++++++++++++++++++++++++


Third, I installed CTF software package.

[root@localhost Downloads]# mkdir /tmp/mnt
[root@localhost Downloads]# mount -o loop,ro -t iso9660 ctf-5.4.0CD_20061212.iso /tmp/mnt
[root@localhost Downloads]# cd /tmp/mnt
[root@localhost mnt]# ./CTF.install
(c) Copyright VSM MedTech Ltd. All Rights Reserved.
Description:
This script updates or installs the CTF_MEG MEG/EEG Software suite.
If a current installation is not found, then a "complete install" is performed
otherwise, an upgrade is performed. An upgrade copies all executable and script
files from the distribution CD-ROM to the CTF_MEG software directory.
The CTF.install will then copy any configuration files that are on the CD-ROM
but are missing in the CTF_MEG directory. The user is given the option of
copying all configuration files, as well as creating backups of all
existing files that are over written.

If necessary, CTF.install will install acroread ( PDF file reader ) and
openmotif, ghostscript, Python, Xdialog, Xprint, a set of pixmap conversion
programs, and a set of postscript conversion programs.

Checking current installation....
The directory /opt/ctf does not exist
Is this a new installation? [ , n ]y  
Please enter a destination path for the installation? [
]

Please enter path of the source directory for the install? [ ]/tmp/mnt

Select which electronics system is in use.

CTF_MEG2000 -- Contains  DSQ-2041/DSQ-2043 DSP bank with DSQ-2010 SQUID Channel Units
               and rack mounted ADC/Trigger units
CTF_MEG2005 -- Contains  DSQ-2041/DSQ-2043 based DSP bank with DSQ-2010 SQUID Channel Units
               and desktop Electronic Control Console

Select "Skip" to skip installation of electronics specific files.

1) CTF_MEG2000
2) CTF_MEG2005
3) Skip
Select electronics system version :3
Checking for required libraries ...

Dynamically shared library file libXm.so.3 needed by CTF software is missing
Please insure that you are installing the software on RedHat Enterprise 3.0 or higher

Installation of the CTF_MEG MEG/EEG Software has failed prematurely.
Do you want to continue [ y, ]?n

solve libXm.so.3 problem:
#cd /usr/lib
#ln -s libXm.so.4 libXm.so.3

Then you will get another error: libstdc++.so.5
#yum install compat-libstdc++-33-3.2.3-68.i686

Reference:  http://kurage.nimh.nih.gov/meglab/Meg/CTFSoftwareInstallation

If you have specific problems, feel free to contact me.

1 comment:

  1. openmotif is the key package which has to be installed properly. :)

    ReplyDelete