AFNI

Checking available versions

module avail afni

Using AFNI (from forsyth)

Load AFNI with module load forsyth/afni.

After loading the module, all AFNI tools are made accessible in the shell session.

Installing AFNI

  1. Download AFNI installer:
curl -O https://afni.nimh.nih.gov/pub/dist/bin/misc/@update.afni.binaries
  1. Install the CentOS 7 package to /sw/contrib/labname-src/afni (replacing mylabname with the name of your lab):
TARGET="/sw/contrib/mylabname-src/afni/"
tcsh @update.afni.binaries -package linux_centos_7_64 -do_extras -bindir "$TARGET"
  1. Install required R libraries to /sw/contrib/mylabname-src/afni/Rlibs:
export R_LIBS="$TARGET/Rlibs"
mkdir -p "$R_LIBS"
rPkgsInstall -pkgs ALL
  1. Create an Lmod .lua module file for AFNI with a text editor:
/sw/contrib/modulefiles/mylabname/afni.lua
help(myModuleName())
local base = pathJoin(
    "/sw/contrib",
    string.gsub(myModuleName(), "/.*$", "-src"),
    string.gsub(myModuleName(), "^.*/", ""),
    myModuleVersion()
)
append_path("PATH", base)
setenv("R_LIBS", r_libs)

if (mode() == "load") then
    LmodMessage("R_LIBS set to " .. r_libs)
    LmodMessage("------------------------------------------------------------")
    LmodMessage("On initial use, run the following:")
    LmodMessage("  suma -update_env")
end

whatis("Name: " .. string.gsub(myModuleName(), "^.*/", ""))
whatis("Version: " .. myModuleVersion())
  1. Check that the module is available and load it:

    module -I spider mylabname/afni
    module load mylabname/afni
    1
    Lmod takes some time to cache available modules. You can use the -I option to force Lmod to check for new modules.