stats file being read in as an anatomical image

Hi All,

  1. First, I hope you are staying safe and sane.

  2. Second, I have a question that is hopefully simple to answer.

CONTEXT: I have vertex and voxel level data that were analyzed with a complicated pipeline and saved as .mgz files. The group analysis was conducted using FSL’s PALM. PALM’s output provides several files: t maps, p maps, beta weights etc. I wanted to view the voxel level data, which are subcortically masked, using AFNI’s GUI (as the wb_view is difficult to use for voxel data). The group maps are saved as NIFTI files subcortically.

PROBLEM: I used 3dTcat to combine the PALM generated beta and t maps into the same file. However, when I opened AFNI (to read the voxel) data, it read these files as anatomy files (also verified with 3dinfo).

ATTEMPTED SOLUTION: I tried to force the files to be read as functional data using 3dbucket -fbuc but no luck. This is particularly an issue when trying to threshold because the scales are off. A simple fix is that I could use wb_view but AFNI’s viewer is much more user friendly. I was getting weird results with wb_view so I wanted to confirm with the AFNI GUI.

QUESTION 1: So, is there a way to force the files to be read as a functional dataset so that I can threshold correctly? If not, no big deal. I can learn how to use SUMA so that I can analyze my data using 3dMVM :slight_smile: or use the wb_view :frowning:

QUESTION 2: If I end up using 3dMVM, is there a way to generate a p and cohen’s map?

Thanks,
Shana

Hi, Shana-

I am confused-- what does “as anatomy files” mean? I am afraid I don’t understand what this means. And how is this “verified” with 3dinfo?

Is it correct that you have volumetric (NIFTI) datasets that you are concatenating, and then wanting to overlay in the GUI?

What are you selecting as your olay and thr bricks for viewing? Note that you might not be able to use the nice automatic conversion of stat-to-p for thresholding because I don’t think PALM or non-AFNI software will store the degree of freedom information in the header for the stat subbrick.

–pt

Hi Paul,

I am confused-- what does “as anatomy files” mean? I am afraid I don’t understand what this means. And how is this “verified” with 3dinfo?

Sorry that was confusing. This is what 3dinfo says:

Dataset File: ./reward_pos_vs_neg_feedback_subcortical_vox_tstat_uncparap_c1.nii
Identifier Code: NII_FyQ-kpj_FPGUqCi_ZKDy5g Creation Date: Wed Mar 25 19:24:36 2020
Template Space: TLRC
Dataset Type: Anat Bucket (-abuc)
Byte Order: LSB_FIRST {assumed} [this CPU native = LSB_FIRST]
Storage Mode: NIFTI

Is it correct that you have volumetric (NIFTI) datasets that you are concatenating, and then wanting to overlay in the GUI?

Yes, that is correct. PALM outputs separate files for the t map and coef so I used 3dTcat to merge the files together. Perhaps that was not correct?

What are you selecting as your olay and thr bricks for viewing?
Overlay: Coef
Thrs: tmap

Note that you might not be able to use the nice automatic conversion of stat-to-p for thresholding because I don’t think PALM or non-AFNI software will store the degree of freedom information in the header for the stat subbrick.

Very true. Okay, I’d prefer to use AFNI so I guess I’ll just have to figure out how to display results on the surface in AFNI-land.

Thanks for responding so quickly!

So, under dataset type: anat bucket rather than functional.

In the GUI, these files say abuc:2 (for the coef and tstat).

Hi, Shana-

Thanks for answering those questions; I’m still a bit confused about what the problem is. Any NIFTI or BRIK/HEAD files should overlay fine in the AFNI GUI; I don’t see the issue of what matters whether a dset is called “abuc” or not.

Are the dsets supposed to be in some standard space, but won’t overlay properly because they have the wrong view/sform code? Are your PALM results supposed to be standard or native/subject space?

You mention this:
" Very true. Okay, I’d prefer to use AFNI so I guess I’ll just have to figure out how to display results on the surface in AFNI-land. "
That can be done in several ways, for example using suma+afni GUIs together to project data onto an existing mesh.

Perhaps, would you mind uploading the dsets (I will PM you instructions to do that), and I can take a look in vivo? I’m sorry, I just don’t understand what the problem is…

–pt

… and, after looking at the datasets in question and chatting offline, it seems the resolution is the following:

  • the desired, but missing, functionality in viewing these datasets in the AFNI GUI was being able to threshold the stats volume by selecting a p-value. The reason for this not being present in the current scenario is the following:
    The stat-to-p conversion in the GUI depends on having stats files produced by AFNI, because we stick the necessary supplementary information of the number of degrees of freedom (and other numbers, where necessary) into the header file. Other software don’t include this feature, so it is not possible to have that functionality with externally generated stats, unfortunately. You would have to calculate the stat-to-p conversion separately; there are ways you can calculate this using AFNI programs for certain stats (like Pearson r, t-stats, and others)—‘cdf’ might be the most useful for that:
    https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/cdf_sphx.html#ahelp-cdf
    —but you have to know the degrees of freedom… Though, that quantity should always be known when computing a stat, anyways, for reporting purposes, too.

–pt