AFNI help on graham cluster

AFNI version info (afni -ver): Precompiled binary linux_centos_7_64: Jun 21 2023 (Version AFNI_23.1.08 'Publius Helvius Pertinax')


I am having an issue on the graham cluster in Compute Canada in which I am getting an error message when running the AFNI command, "whereami."

It seems that the command cannot find the required atlases needed for it to run. I looked in the bin folder of the AFNI installation, and the NIFTI files for the atlases are not there. Since I am working on a cluster, I cannot update the binaries.

The error message I get is the following:

[nmazloum@gra-login3 scripts]$ whereami -35.3 71.1 -18.1
++ Input coordinates orientation set by default rules to RAI
** ERROR: No atlas regions found.
whereami NULL string out.

Note that this command works when running AFNI locally. Would I be able to upload the atlases from my local computer (bin folder) to the graham cluster and then point whereami to the atlases that I have uploaded to the cluster?

Thank you for your help.


First, an admission. When I saw this subject title, I thought it referred to a "graham cracker", and now I am hungry. I will fight through the craving and try to reply usefully still.

When someone downloads a precompiled set of AFNI binaries, we also distribute a set of reference templates+atlases in the main binary directory. By default, whereami will essentially look in some special directories on your computer for reference datasets; the directory holding the AFNI binaries is one of those spots. Other locations are ones you can define by setting AFNI environment variables, such as in your ~/.afnirc file.

It is possible that the maintainers on your cluster removed those datasets from the AFNI binaries directory. You could test this perhaps by running:

# get directory name where the "afni" program lives
dirname `which afni`

# ... and search that <dir name> for NIFTI files
ls <dir name>/*.{nii,HEAD}*

If nothing is output in the terminal, then those datasets don't live there, and you can make your own local directory and point AFNI to know about that location. That is likely the case here, because no atlas regions were found, not just a specific one you were asking for. (If you were asking for a specific one, and see others but noth that, then perhaps you are asking for a no longer distributed reference, and you could still download that separately and put it in a directory and point AFNI at it in the same way, described below.)

I will describe downloading a directory of our currently distributed reference templates+atlases to the home directory, and then pointing AFNI to know about it as a "global session" (so it will always be loaded in the GUI when you open AFNI, in addition to your local directory); feel free to change directory name and/or the set of files you want. Some useful lists of datasets and directories is here.

OK, to work:

  1. Download+unpack the set of current AFNI-distributed atlases to your home directory:

     curl -O
     tar -xf afni_atlases_dist.tgz
  2. Open the AFNI environment variable file:

     afni_open -e ~/.afnirc

    NB: if you don't have one already, run -check_all and follow the instructions in the "Please Fix" section at the bottom of the text output there about copying a default one to start, and then run the above command.

  3. Take your home directory name (output of pwd, which you would put in place of <home dir>, below), and use it in conjunction with the new directory name to define a couple of variables in your AFNI env variable file that we have open. Scroll to the bottom of the file, and add these two lines:

    AFNI_GLOBAL_SESSION   =  <home dir>/afni_atlases_dist
    AFNI_ATLAS_PATH       =  <home dir>/afni_atlases_dist

    Save that text file and you can close it.

Now, when you open your AFNI GUI, you should see all the files in that special directory loaded (so you don't have to copy them around; comes from the first added line), and all the atlases in that directory should be known to whereami and other GUI features (from second line, which can actually be a comma-separated list of locations). You might also be interested in the behavior of the first couple environment variables listed here, controlling what is displayed/searched for various whereami behavior.

You can read more about AFNI environment variables here.