Helpful fMRI QA Tools in AFNI

Apologies for the lack of updates lately!  It’s been… busy.

I’ve written in the past about automatically making “snapshots” in AFNI (here) and even doing that without having AFNI taking over you entire screen using Xvfb (here).  These are one way of performing Quality Assurance (QA) on your data, by actually LOOKING at the activation each individual has for different conditions, without having to open AFNI, select the conditions Coefficient and Tstat and adjusting the slider.

But there’s considerably more QA that you might want to do!  First and foremost, you may have already discovered that if you use afni_proc.py, some helpful scripts for looking at single-subject data are created for you.  These are:

  1. @ss_review_basic – which will print out a variety of data information, such as your thresholds for motion and outlier censoring, as well as the number of TRs censored, average motion, and even a breakdown of your censoring by conditions.
  2. @ss_review_driver – this script will walk you through some important QA on your data, starting by printing out the information in @ss_review_basic!  Then it will walk you through motion and outlier censoring plots, checking EPI to Anatomical registration, regression matrix errors/warnings, and finally display the peak activation of your overall F-map.  This should be inside of the head.

Now I won’t lie, running these scripts is good, but sometimes you just want all of the data in one place fast.  Well you could pay someone to transcribe all of the information from @ss_review_basic into a table.  Or you can use a very helpful program called gen_ss_review_table.py.  And of course that’s the topic of today’s post!

Recall that afni_proc.py places all of your results into a single “results” folder.  Within that folder is where we find our @ss_review_basic and @ss_review_driver scripts.  When the scripts are called, they automatically create an out.ss_review version of the output of those scripts.  And it is these files that you want to call gen_ss_review_table.py on. For example:

gen_ss_review_table.py  \
-infiles Subject*/Subject*.results/out.ss_review* \
-tablefile ss_review_stats.txt

Would generate a table of all of my subjects including easy to summarize data on motion thresholds, TRs that are censored, and even blur estimates for computing your inputs to 3dClustSim!  Example shown below, other columns are not visible because I took a screenshot for easy viewing purposes.

table_demo1

 

Comments are closed.