Error in affine transform during

I created a proc.subj script using and did not see any errors during the creation of the script. However, when trying to run the script, I run into problems during the transformation. It seems like it is not recognizing base.nii but I cannot understand why not. Does the following give you any ideas why not?

++ 3dUnifize: AFNI version=AFNI_16.2.16 (Sep 4 2016) [64-bit]

  • Pre-processing: ADV…UWG
    ++ Output dataset ./anat.un.nii.gz
    ++ ===== Elapsed = 88.9 sec
    #Script is running (command trimmed):
    3dcopy /abin/MNI_avg152T1+tlrc ./base.nii
    ++ WARNING: file /home/jgowin/.afni.log is now 550997561 (551 million [mega]) bytes long!
    ++ 3dcopy: AFNI version=AFNI_16.2.16 (Sep 4 2016) [64-bit]
    #++ Aligning /mnt/nfs2/studies/relapsefmri/JoshScripts/A0322201401.results/awpy/base.nii data to /mnt/nfs2/studies/relapsefmri/JoshScripts/A0322201401.results/awpy/anat.un.nii data
    #Script is running (command trimmed):
    @auto_tlrc -base ./base.nii -input ./anat.un.nii -suffix .aff -no_ss -no_pre -init_xform CENTER
    Error: template (or -apar) dset not found: ./base.nii
    #**ERROR Failed in affine step
    ** ERROR - script failed
    3dbucket: No match.

From the results directory, what is the output of:

ls -l awpy/base.*

Maybe the .gz file is there, instead. Are you

  • rick

Oh wait, it is AFNI_COMPRESSOR that would do this
in the case of NIFTI. Do you have that set?

  • rick

Yes, it looks like the .gz file is there:

[jgowin@muso A0322201401.results]$ ls -l awpy/base.*
-rw-rw----+ 1 jgowin paulus-lab 315649 Aug 23 18:07 awpy/base.nii.gz

How do I disable the compressor, or work around it?

I have tried including “unsetenv AFNI_COMPRESSOR” at the start of the proc.SUBJ script but it hasn’t prevented the files to be compressed as .gz. Is there another way to unset the AFNI_COMPRESSOR variable?


What shell are you using? echo $0

Check your ~/.cshrc file, and if you have one, ~/.afnirc.
If you are using bash, check those start-up files.

Note that even if you unset that variable in the script,
the script will start sub-shells. So if those apply it, or
if it is in your .afnirc file, it will still be used.

  • rick

The default shell is bash but I run the proc.SUBJ script using the suggested tcsh proc.SUBJ -xef
I may have to contact the root user to change the local environment. Thanks for helping me get to the bottom of this.

It shouldn’t be so much much. What does this show?

grep AFNI_COMPRESSOR ~/.afnirc ~/.cshrc ~/.bash*

  • rick

Here’s the output.

[jgowin@muso ~]$ grep AFNI_COMPRESSOR ~/.afnirc ~/.cshrc ~/.bash*
/home/jgowin/.afnirc:unset AFNI_COMPRESSOR
grep: /home/jgowin/.cshrc: No such file or directory
/home/jgowin/.bash_history:unset AFNI_COMPRESSOR
/home/jgowin/.bash_history:unsetenv AFNI_COMPRESSOR
/home/jgowin/.bashrc:unset AFNI_COMPRESSOR
/home/jgowin/.bashrc~:unset AFNI_COMPRESSOR

Does any of that look problematic?

I updated the files and now here is what I get.

[jgowin@muso ~]$ grep AFNI_COMPRESSOR ~/.afnirc ~/.cshrc ~/.bash*
/home/jgowin/.afnirc:AFNI_COMPRESSOR = NONE
/home/jgowin/.cshrc:setenv AFNI_COMPRESSOR NONE
/home/jgowin/.bashrc:export AFNI_COMPRESSOR

Now, most of my files are saving uncompressed as .BRIK files. However, at the @auto_tlrc stage, it is still saving as .nii.gz and failing to find base.nii since only base.nii.gz exists.

Do I need to edit my rc files?

I just saw this in my output.proc file: -base MNI_avg152T1+tlrc -input 0322201401_ns+orig -skull_strip_input no
#++ version: 0.03
– clearing AFNI_COMPRESSOR …

Do I need to prevent from clearing my AFNI_COMPRESSOR setting?

Sorry, but I have been away a bit.

Are you at the NIH? If so, maybe I could look
more closely at your setup?

  • rick