AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
March 31, 2017 04:53AM
I had initially tried 3dbucket. However, the resultant NIFTI file (after applying 3dAFNItoNIFTI) was not readable by Broccoli:

The exact form of the call to Broccoli was:
# Combining Subject-level nifti files using 3dBucket
[ -f volumes.nii ] && rm volumes*
3dbucket -aglueto volumes sub_1.nii.gz sub_2.nii.gz  \
                sub_3.nii.gz  \
                sub_4.nii.gz  \
                sub_5.nii.gz  \
                sub_6.nii.gz  \
                sub_7.nii.gz  \
                sub_8.nii.gz  \
                sub_9.nii.gz  \
                sub_10.nii.gz
3dAFNItoNIFTI -overwrite volumes+tlrc
rm volumes+tlrc*
3dinfo -label volumes.nii

# Run Broccoli
RandomiseGroupLevel volumes.nii -mask TT_N27_3mm_mask.nii -design design_broccoli.mat -contrasts contrast_broccoli.con -teststatistics 0 -permutations 500 -output test_broccoli

With thiis, the permutation tests by broccoli yielded the following response:
Input data is a single volume, nothing to permute!

An alternative approach for creating a nifti file that Broccoli can read is *3dTcat*. I didn't realize it initially that 3dTcat appends new volumes to the beginning of the sample volume. So creating the appropriate sample volume requires adding subject-volumes in reverse order to the rows in the design matrix.
# Combining Subject-level nifti files using 3dTcat
CNT=0
[ -f volumes.nii ] && rm volumes*
3dcopy sub_10.nii.gz volumes
3dTcat sub_9.nii.gz   -glueto     volumes+tlrc
3dTcat sub_8.nii.gz   -glueto     volumes+tlrc
3dTcat sub_7.nii.gz   -glueto     volumes+tlrc
3dTcat sub_6.nii.gz   -glueto     volumes+tlrc
3dTcat sub_5.nii.gz   -glueto     volumes+tlrc
3dTcat sub_4.nii.gz   -glueto     volumes+tlrc
3dTcat sub_3.nii.gz   -glueto     volumes+tlrc
3dTcat sub_2.nii.gz   -glueto     volumes+tlrc
3dTcat sub_1.nii.gz  -glueto     volumes+tlrc

3dAFNItoNIFTI -overwrite volumes+tlrc
rm volumes+tlrc*
3dinfo -label volumes.nii

# Run Broccoli
RandomiseGroupLevel volumes.nii -mask TT_N27_3mm_mask.nii -design design_broccoli.mat -contrasts contrast_broccoli.con -teststatistics 0 -permutations 500 -output test_broccoli

That being said, Broccoli's maintainer informed me that the "Clustsim" flag on 3dttest++ can generate non-parametric null distribution, which I was previously unaware of. However, including that flag leads to a crash on my system (the error message was placed in a different post).

Thank you for your attention.
Subject Author Posted

Concatenating subbricks across subjects into single nifti file

cmehta March 29, 2017 10:58PM

Re: Concatenating subbricks across subjects into single nifti file

Peter Molfese March 30, 2017 10:38AM

Re: Concatenating subbricks across subjects into single nifti file

rick reynolds March 30, 2017 12:15PM

Re: Concatenating subbricks across subjects into single nifti file

cmehta March 31, 2017 04:53AM

Re: Concatenating subbricks across subjects into single nifti file

rick reynolds March 31, 2017 08:39AM