Low voxel significance but large clusters?

Hello!

This is more of a conceptual question about MRI voxel signal issues. We have a dataset of ~150 subjects who completed a variety of tasks as well as resting state. Across the whole sample, signal just isn’t very robust at the voxel level. Even for well established task paradigms (and even resting state), basic contrasts in expected regions are not surviving correction (expected regions emerge in task contrasts, but they ultimately don’t survive correction). We’re seeing this semi-weird phenomenon that while clusters of expected regions are certainly large enough to meet 3dClustSim thresholds, the voxel-wise significance is almost never achieved. Voxels in these large expected clusters are not passing even p<0.01. Obviously there are possible hardware concerns that could have contributed to the low SNR in voxels, but since we’re past the point of fixing any of those issues, I’m wondering if there are any things we can do in preprocessing/alternative thresholding procedures we can use.

I’m not suggesting we do any p-hacking here, because there are clear effects in all of the tasks we have and in the predicted regions/direction (I’d also like to add these are not novel or complex tasks, for example one task is a go/no-go task with symbols, another is basic fear conditioning/extinction, and another is aversive picture viewing)… there’s just something across the board about signal strength in this sample that is limiting “significance”.

Any thoughts/advice are greatly appreciated!!

Carissa

Hi, Carissa-

What did you do for single subject processing for all these subjects (afni_proc.py-created pipeline? something else?), and how did you QC and verify these results (so that you know the model was correctly made, that alignment worked, etc.)? I think I would want to know more about these important preliminary steps before moving on the group analysis question.

–pt

Hi Paul!

We used a “standard” afni_proc.py script for preprocessing with SSWarper run before afni_proc.py. Only minor changes were use of a different cost function for a handful of subjects who had more difficult alignment. To QC, I used the @ss* programs. Is there something in particular I can share from those QC outputs?

Thanks,

Carissa

Hi, Carissa-

How about I share a Box drive with you to see check out the afni_proc.py command, as well as a couple example QC_*/ HTML directories? That might give the quickest view of things.

–pt

Hi Paul,

I’ve uploaded the afni_proc.py script used for preprocessing as well as preprocessing outputs for 3 subjects. Our cluster at UWM is missing a dependency to generate the HTML outputs for QCing, but the @ss* scripts are still generated. I believe I copied over everything for each subject. Let me know if I can send anything else!

Thanks for your help!

Carissa

Hi, Carissa-

OK, thanks, I will take a look.

But no lovely QC HTML from your cruel cluster? What!?!?

What is the output of:


afni_system_check.py -check_all

on this merciless machine?

–pt

I know… it’s quite upsetting and I have very little sway in our cluster administration…

Here’s that output:


afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture:         64bit ELF
system:               Linux
release:              3.10.0-1160.24.1.el7.x86_64
version:              #1 SMP Thu Apr 8 19:51:47 UTC 2021
distribution:         CentOS Linux 7.9.2009 Core
number of CPUs:       16
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /sharedapps/LS/psych_imaging/afni/07.17.2019/afni
afni version         : Precompiled binary linux_openmp_64: Jul  3 2019
                     : AFNI_19.2.01 'Claudius'
AFNI_version.txt     : AFNI_19.2.01, linux_openmp_64, Jul 03 2019
which python         : /usr/bin/python
python version       : 2.7.15
which R              : which: no R in (/sharedapps/LS/psych_imaging/afni/07.17.2019/:/usr/pkg/bin:/usr/pkg/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/cnweis/.local/bin:/home/cnweis/bin)

which tcsh           : /usr/pkg/bin/tcsh

instances of various programs found in PATH:
    afni    : 1   (/raid-07/sharedapps/LS/psych_imaging/afni/07.17.2019/afni)
    R       : 0
    python  : 1   (/usr/bin/python2.7)
    python2 : 1   (/usr/bin/python2.7)
    python3 : 1   (/usr/bin/python3.6)


testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    uber_subject.py      : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success

checking for R packages...
    rPkgsInstall -pkgs ALL -check : FAILURE
        R: Command not found.

checking for $HOME files...
    .afnirc                   : missing
    .sumarc                   : missing
    .afni/help/all_progs.COMP : missing

------------------------------ python libs -------------------------------
** python module not found: PyQt4
-- PyQt4 is no longer needed for an AFNI bootcamp

-------------------------------- env vars --------------------------------
PATH = /sharedapps/LS/psych_imaging/afni/07.17.2019/:/usr/pkg/bin:/usr/pkg/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/cnweis/.local/bin:/home/cnweis/bin

PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH = /sharedapps/LS/psych_imaging/afni/07.17.2019/lib:/sharedapps/pkg-2018Q2/lib

DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas    : found TT_N27+tlrc  under /sharedapps/LS/psych_imaging/afni/07.17.2019/

------------------------------ OS specific -------------------------------
which yum            : /usr/bin/yum
yum version          : There was a problem importing one of the Python modules


=========================  summary, please fix:  =========================
*  login shell 'bash', trusting user to translate code examples from 'tcsh'
*  shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile
*  failure under initial "AFNI and related program tests"
*  missing R packages (see rPkgsInstall)
*  please run: cp /sharedapps/LS/psych_imaging/afni/07.17.2019/AFNI.afnirc ~/.afnirc
*  please run: "suma -update_env" for .sumarc
*  please run: apsearch -update_all_afni_help
*  insufficient data for AFNI bootcamp
*  consider running: yum install PyQt4


Hi, Carissa-

OK, a few things here:

  • that AFNI is stuck in mid-2019, but on a cluster, updating things are often difficult—I do have some sympathy with admins on this, as lots of people with different use-cases want various things on a cluster, some of which conflict. But updating your AFNI would be very useful, if possible.
  • I can’t tell if the matplotlib module is installed there, because this old version of AFNI didn’t report on it (current ones do).
  • There are a few recommendations that you can do to likely improve your AFNI usage on the cluster, and they don’t require admin-level changes (they just affect your local files). These are in the bottom section, where you can copy+paste each of these lines:

cp /sharedapps/LS/psych_imaging/afni/07.17.2019/AFNI.afnirc ~/.afnirc
suma -update_env
apsearch -update_all_afni_help

The first two give you default ~/.afnirc and ~/.sumarc settings files for AFNI and SUMA, respectively, which you can subsequently adjust (change default things in the GUIs, for example). The third one makes it possible to use autocomplete of option names when typing AFNI commands in the terminal command line (I can’t work without this functionality, myself… If you haven’t noticed, most AFNI programs have a few options to try to remember…).
And also you should copy+paste these lines, for the second comment “* shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile”:


echo "" >> ~/.bash_profile
echo "source ~/.bashrc" >> ~/.bash_profile
echo "" >> ~/.bash_profile

Separately, something I have done occasionally on a cluster or helped other people set up is to put a version of the AFNI binaries in a home directory, and then just add that location in your path ahead of the default cluster version—you don’t need admin rights to have a set of AFNI binaries sitting there to use, like on a normal PC. All the dependencies should be installed, because your system is set up to use the binaries. And you can update your local version at will. If that sounds interesting, we can work through that here (I do think being able to keep up with AFNI updates is really useful. We add a lot of improvements and functionality overtime, as well as the occasional gulp bug fix.)

–pt

Hey Paul,

I’ve run the suggested lines of code you sent and this is the updated output of “afni_system_check.py -check_all”

I didn’t realize you could update binaries in my home directory! That helps a ton!

Carissa


-------------------------------- general ---------------------------------
architecture:         64bit ELF
system:               Linux
release:              3.10.0-1160.24.1.el7.x86_64
version:              #1 SMP Thu Apr 8 19:51:47 UTC 2021
distribution:         CentOS Linux 7.9.2009 Core
number of CPUs:       16
apparent login shell: bash
shell RC file:        .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /sharedapps/LS/psych_imaging/afni/07.17.2019/afni
afni version         : Precompiled binary linux_openmp_64: Jul  3 2019
                     : AFNI_19.2.01 'Claudius'
AFNI_version.txt     : AFNI_19.2.01, linux_openmp_64, Jul 03 2019
which python         : /usr/bin/python
python version       : 2.7.15
which R              : which: no R in (/sharedapps/LS/psych_imaging/afni/07.17.2019/:/usr/pkg/bin:/usr/pkg/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/cnweis/.local/bin:/home/cnweis/bin)

which tcsh           : /usr/pkg/bin/tcsh

instances of various programs found in PATH:
    afni    : 1   (/raid-07/sharedapps/LS/psych_imaging/afni/07.17.2019/afni)
    R       : 0
    python  : 1   (/usr/bin/python2.7)
    python2 : 1   (/usr/bin/python2.7)
    python3 : 1   (/usr/bin/python3.6)


testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success
    uber_subject.py      : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success

checking for R packages...
    rPkgsInstall -pkgs ALL -check : FAILURE
        R: Command not found.

checking for $HOME files...
    .afnirc                   : found
    .sumarc                   : found
    .afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------
** python module not found: PyQt4
-- PyQt4 is no longer needed for an AFNI bootcamp

-------------------------------- env vars --------------------------------
PATH = /sharedapps/LS/psych_imaging/afni/07.17.2019/:/usr/pkg/bin:/usr/pkg/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/cnweis/.local/bin:/home/cnweis/bin

PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH = /sharedapps/LS/psych_imaging/afni/07.17.2019/lib:/sharedapps/pkg-2018Q2/lib

DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas    : found TT_N27+tlrc  under /sharedapps/LS/psych_imaging/afni/07.17.2019/

------------------------------ OS specific -------------------------------
which yum            : /usr/bin/yum
yum version          : There was a problem importing one of the Python modules


=========================  summary, please fix:  =========================
*  login shell 'bash', trusting user to translate code examples from 'tcsh'
*  failure under initial "AFNI and related program tests"
*  missing R packages (see rPkgsInstall)
*  insufficient data for AFNI bootcamp
*  consider running: yum install PyQt4


Hi, Carissa-

Glad that each of those parts helped.

If you would like any assistance with adding the AFNI binaries locally—and putting that location at the start of your $PATH, to make sure that that set of programs gets seen before the system-wide one—please just let us know.

–pt

Yes that’d be great! Have you had a chance yet to take a look at the files I uploaded to Box?

Carissa

Hi, Carissa-

Re. the processing you uploaded: yes, I looked at the script, and have scripting-based comments to start, and still need to look more at the processing details; I will write back separately about that.

About putting a local copy of AFNI binaries on your system, some things I note from information provided so far (mainly in the afni_system_check.py output):

  • your HPC is set to use the “linux_openmp_64” binaries (so that is what we’ll use for the local version).
  • your command line login shell is “bash” (though we will setup both bash and tcsh environments).
    I will nominate putting the AFNI binaries in a directory called “abin” in your home directory (this mirrors what the general setup instructions have for users on their individual systems).

So, you can copy+paste the following commands (what each does is just noted each code block). If anything fails at a block, I would pause the process and ask a question here.

  • go to home directory; download the AFNI script for installing stuff; run it with some particular choices of package and unpacking location:

cd
curl -O https://afni.nimh.nih.gov/pub/dist/bin/misc/@update.afni.binaries
tcsh @update.afni.binaries -package linux_openmp_64.tgz -bindir abin -no_recur

  • set up bash shell to have this local AFNI version, which lives in “~/abin”, first in your path:

echo "" >> ~/.bashrc
echo "export PATH=$HOME/abin:$PATH" >> ~/.bashrc
echo "" >> ~/.bashrc

  • set up tcsh shell to have this local AFNI version, which lives in “~/abin”, first in your path:

echo "" >> ~/.cshrc
echo "set path = ( $HOME/abin  $path )" >> ~/.cshrc
echo "" >> ~/.cshrc

Then, if you log out and log back in, things should be set. You can verify this by typing:


afni -ver

and


which afni

The first should show you a modern version of AFNI from April, 2021 (not the system one from 2019), and the latter should be something like “YOUR_HOME_DIR/abin/afni” (not the likely long path to where your system has its version of AFNI).

If that all looks good, I would also run:


apsearch -update_all_afni_help

… which will update all your autocompletions of AFNI program options as you type anything on the commmand line.

–pt

Hi Paul,

Sorry for the delay. I successfully ran through all those steps you outlined and everything appears to be working on my end with the newest AFNI version! Thanks-- I’ll definitely be passing along these instructions to my lab mates!

Circling back to the preprocessing issue with the data I sent, have you had a chance to explore those data/processing steps any further?

Thanks,

Carissa