Unexpected APQC report

AFNI version info (afni -ver): 23.1.10

Hello afni_proc experts!

I recently ran afni_proc.py on some pilot data from an HPC. I transferred the whole output folder over to my own personal computer so that I could view the APQC HTML file. However, the output seems different than I am used to (I used it extensively with an older version of AFNI, but I think there have been some changes to APQC since then). There is one section (namely the radcor) that seems to be a red flag to me, but it also includes some images I've never seen before and I'm not sure how to interpret. It also was missing some key sections, such as the TSNR and the EPI to template overlap, which I wanted to look at. It appears these files were generated though, as I can find them in my output folder and open then with the AFNI GUI.

Here is a screenshot of the radcor section which seemed off to me:

The first image looks like what I would generally expect, but the next few rows I've never seen and don't know how to interpret.

I'm not sure if these issues are being caused my 1) my unfamiliarity with the updates to APQC, 2) some issue with running it on HPC and transferring it to personal computer to look at, 3) some combo of both, or 4) something else entirely. I'm inclined to think it's a bit of all of them.

Any advice for interpreting this/getting in the missing sections to the APQC report?

Thanks! My afni_proc.py script is below:

apptainer exec $AFNI_path afni_proc.py							\
	-subj_id		        sub-${sub_id}_ses-${ses_id}			\
	-out_dir			${output_path}					\
	-blocks				despike tshift align tlrc volreg blur mask scale regress				\
	-radial_correlate_blocks 	tcat volreg regress				\
	-copy_anat			${prewarp_path}/anatSS.sub-${sub_id}_ses-${ses_id}.nii					\
	-anat_has_skull			no						\
	-anat_follower			anat_w_skull anat ${T1_path}			\
	-anat_follower_ROI		aaseg anat ${SUMA_path}/aparc.a2009s+aseg.nii.gz\
	-anat_follower_ROI		aeseg epi ${SUMA_path}/aparc.a2009s+aseg.nii.gz	\
	-anat_follower_ROI		FSvent epi ${SUMA_path}/fs_ap_latvent.nii.gz	\
	-anat_follower_ROI		FSWe epi ${SUMA_path}/fs_ap_wm.nii.gz		\
	-anat_follower_erode		FSvent FSWe					\
	-dsets				${func_path}					\
	-tcat_remove_first_trs		3						\
	-tshift_opts_ts                 -tpattern @${st_path}				\
	-align_unifize_epi		local						\
	-align_opts_aea			-cost lpc+ZZ					\
					-giant_move					\
					-check_flip					\
	-tlrc_base			${MNI_path}					\
	-tlrc_NL_warp									\
	-tlrc_NL_warped_dsets		${prewarp_path}/anatQQ.sub-${sub_id}_ses-${ses_id}.nii 		      			\
					${prewarp_path}/anatQQ.sub-${sub_id}_ses-${ses_id}.aff12.1D				\
					${prewarp_path}/anatQQ.sub-${sub_id}_ses-${ses_id}_WARP.nii				\
	-volreg_align_to		MIN_OUTLIER					\
	-volreg_align_e2a								\
	-volreg_tlrc_warp								\
	-blur_size			6.0						\
	-mask_epi_anat			yes						\
	-regress_motion_per_run								\
	-regress_ROI_PC			FSvent 3					\
	-regress_ROI_PC_per_run		FSvent						\
	-regress_make_corr_vols		aeseg FSvent					\
	-regress_anaticor_fast								\
	-regress_anaticor_label		FSWe						\
	-regress_censor_motion		0.2						\
	-regress_censor_outliers	0.05						\
	-regress_apply_mot_types	demean deriv					\
	-regress_est_blur_epits								\
	-regress_est_blur_errts								\
	-html_review_style		pythonic					\
	-execute

Howdy-

Sorry for the delay in this.

I see. Indeed, this is the kind of image I would expect for "volreg" and "regress" radcor (from the Bootcamp "FT" subject dataset, AFNI ver=24.2.01):


The "tcat" one seems reasonable, but the underlay for "volreg" is unexpected: it shouldn't be so noisy because it is prior to regression (in your image, it looks like possibly residuals that have not been scaled? it is hard to tell). Additionally, for the "regress" one, I would just expect 1 image, for the combined residuals (why is there an all_runs one?), and the underlay should be the anatomical, not some scaled thing.

I wondered if the difference were simply having a fairly old version of AFNI, and I think that is the case for most of what is observed. I ran the same subject through AFNI with ver=23.1.10, which is what you have (thanks for posting that info, which is often left out of posts!), and it looks like:


... with both all_runs and the errts data shown, with scaled background EPI. The only thing that doesn't explain is why the volreg data has such noisy background in your APQC HTML. Was the input just normal, unprocessed EPI to start with?

--pt

Hi Paul,

Thanks for getting back to me!

I see, I will definitely try using the newer version and I'll report back what I see. I only used the other version because it was the newest one on our HPC cluster.

In terms of the data, yes, it was normal, unprocessed EPI. I've been piloting some sequences and it was one that was a little homebrewed so maybe that is the issue? I pulled the sequence parameters from a different study done at another centre, though, which I processed using AFNI and had no issues with. It was a multiband sequence with a pretty short TR (~ 878 ms)

Thanks!

Ryann

Hi, Ryann-

Re. the sequence---you can see what the reference EPI volume (used for motion correction as well as alignment to the anatomical) looks like in the vorig section (top) of the APQC HTML.

I would recommend getting AFNI updated there---a lot of improvements went into the APQC HTML alone since that version, include the interactive buttons, helping with InstaCorr, etc. These are described here:

--pt

Hi Paul,

Here's the reference EPI volume:

To me I didn't notice anything too weird, so strange that it's got all the noise in the volreg.

I'll update AFNI and run it again and report back!

Thanks so much!

Ryann

OK, that does look quite normal.

On just a very minor processing note, you might find it useful to add this option, for a bit of additional QC in the report:

   -volreg_compute_tsnr      yes

--pt

Hi @ptaylor ,

I have gotten around to re-running the data through afni_proc.py with the latest version of AFNI. I think some of the issues that I had previously pointed out look like they have been addressed. For example, here is the new radcor block:

... and I was able to get the TSNR block that was missing by adding in the option you suggested in your previous message.

However, I am wondering if there is maybe something else fishy with the data. The vstat block doesn't look great (this is resting state data for reference):

I also ran a different subject through the same afni_proc.py script and the vstat block looked similarly sparse. Do you know if that's something I should be concerned about?

Thanks! And thanks for all your help sorting out the previous issue!

Ryann

Hi, Ryann-

Great about getting the updated code version! The radcor is looking quite reasonable.

For the vstat images: indeed, there isn't a lot happening there. The correlation values seem quite low. One thing to look at is the TSNR, both the maps and the TSNR table that you should hopefully have. How does signal strength appear?

A second thing to check out is the interactive features of the APQC HTML report. If you have the python modules "flask" and "flask-cors" on your system, then you can use the following command to open up one or more APQC HTMLs:

open_apqc.py -infiles INDEX1 [INDEX2 INDEX3 ...]

Then, the dark green swatches above the images (seen above in the attachments) are labelled buttons you can click to run some useful AFNI GUI utilities: InstaCorr (IC) and Graph Viewing (GV). Starting with the latter, and say clicking "GV" above any of the vstat images, are there odd patterns in the time series as you move around the brain? Baseline fluctuations? Weird structures? Those should be residuals and so well-behaved (random fuzziness, but mean-centered and not a lot of structure).

Secondly, how many time points are in the total input data---are these time series particularly long? Sometimes with very long time series, dealing with baseline fluctuations can be challenging, and these might purge some correlation and things.

--pt

Hi Paul,

Here is the relevant TSNR information from the APQC report:

Unfortunately I do not see a TSNR table, the only table that is in the same block (the regr block) is the one listing dof (I'm pretty sure that's not what you were referring to but attaching a screenshot just in case).

I'll have to double check with the other features you suggested, I did the afni_proc preprocessing on our HPC but had to port it over to my personal computer to view the APQC results since we don't have visuals on the HPC, and my own personal computer version of AFNI is old. I will check back once it's updated!

In terms of time points -- I believe there is 471 TRs.

Thanks!

Ryann