Reg- rsfMRI Preprocessing

Greetings Sir,

I have used program to preprocess rsfMRI images, it executed without any errors
and the anatomical and functional results are stored in the directories as shown in the attachment.

For further analysis I want to convert the final functional preprocessed output to NIFTI (.nii format),to do so which output file (pb…BRICK and HEAD file) do I need to consider from the attached screenshot. Is pb04 is the final one (The one which I need to convert for further analysis)?

As I am new to AFNI, I am a bit confused at this stage.
Could you please help me to resolve this issue?

Looking forward to hearing from you

Thanks and Regards
Devika K

Hi, Devika-

The main output of resting state processing is the residual time series (what is sometimes called the “error time series”) from the regression model. This filename starts with “errts” in the results directory. In your specific processing case here, it looks like it is called “errts.sub_1.tproject+tlrc.*”.

A couple points on the outputs from

  • we output a lot of things, and keep them all in one place so you can check intermediate results of processing-- it is very rare (=impossible) to just run processing and inherently trust all output results without checking intermediate stages.
  • to help check thing quickly, there are full “single subject” (ss) review tools, including scripts and a fairly comprehensive HTML file (to view in a browser).
    • scripts include:
      @ss_review_basic (shows summary of useful quantities from processing)
      @ss_review_driver (opens images and AFNI GUI to show datasets)
    • HTML file: there is a folder called QC_[subject ID]/index.html – you can open it in a browser (in your case here, it is QC_subj_1/index.html)
      → when running, we strong recommend including the option “-html_review_style pythonic” to get the prettier/more information output HTML
      The HTML includes most of the info in the @ss_review* scripts in one place-- so please check that.
  • To know a bit more about what the outputs are, there is a “dictionary” of keywords and output file names, stored in a text file: out.ss_review_uvars.json
    … and to see (terse) descriptions of what each keyword represents, you can run “ -show_uvar_dict”
  • To know more about running and viewing the outputs, the AFNI Academy " playlist is a good place to start:

And actually, a lot of functionality about AFNI is contained in that set of YouTube videos, including using the GUI, setting up analyses, performing data alignment, making ROIs, getting stats from ROIs, working on the surface, and more:
It might be a good reference, if you are new to AFNI. (Someday we will have statistical analysis lectures there; at the moment, following the link from a previous Bootcamp we taught at MIT is the best bet for seeing thoses-- – note that several lectures there overlap with the YouTube channel content, too.)

To your actual question – To convert a dataset like errts.sub_1.tproject+tlrc.{BRIK,HEAD} to NIFTI, you can do something like the following, depending on whether you want a compressed NIFTI or not:

3dcopy errts.sub_1.tproject+tlrc  NEW_FILE.nii.gz
3dcopy errts.sub_1.tproject+tlrc  NEW_FILE.nii

(Note you could call the first file without extension, as above, or “errts.sub_1.tproject+tlrc.HEAD” or “errts.sub_1.tproject+tlrc.BRIK”.)