@toMNI_Awarp

Hi all,

I am trying to run @toMNI_Awarp on my skullstripped MPRAGE files using this line of code:

@toMNI_Awarp awarp_test 401_MPRAGE_strip+orig.BRIK 402_MPRAGE_strip+orig.BRIK

and receive the following error:

***** @toMNI_Awarp: Failed to find template MNI152_1mm_uni+tlrc – cannot continue

However, I can locate this file within my AFNI version - is there some way to point the program in the direction of where the file is located? Any help you all can offer would be appreciated!

Here is the output of afni -ver:
Precompiled binary linux_openmp_64: Aug 22 2017 (Version AFNI_17.2.09)

Best,
Sam Williams

I’m working on a newer version of that set of scripts that’s more user friendly. Still that dataset should be found in your AFNI distribution. It is found inside the script with “@FindAfniDsetPath MNI152_1mm_uni+tlrc”. In the meantime, you can copy that dataset to your directory or specify the basename variable in the script by editing a local copy of the script yourself. Also you may want to use a completely different base template dataset for the basename.

Thanks so much Daniel! I should have thought of copying the dataset to my local directory - it seems to be running now.

Thanks again,
Sam

Hi again,

I am still having some trouble running this script on the server where my data is located. Once I copied the template into my local directory, the script starts running but then stalls during the 3dUnifize loop.

I am running this code as a test, and I receive the folllowing output:

williamss@linux5% @toMNI_Awarp awarp 401_MPRAGE_strip+orig.HEAD 402_MPRAGE_strip+orig.HEAD
mkdir: created directory `awarp’

===== @toMNI_Awarp: copying input datasets to awarp =====

===== @toMNI_Awarp: beginning 3dUnifize loop =====

mkdir: created directory Temp1' [1] 25926 mkdir: created directory Temp2’
[2] 25973

At this point, the script stalls and will not advance further. Initially I was getting some warnings about environment variables not being set, but I’ve updated my ~/.afnirc file and no longer receive those warnings. I’ve tried running @toMNI_Awarp a few times, but I am unsure how to troubleshoot further, especially since I’m not sure where the script is going run.

The version of AFNI I’m using is Version AFNI_17.2.09.

Any ideas you all have about what I can do to troubleshoot would be greatly appreciated!

Best,
Sam Williams

If you run that program with “tcsh -x @toMNI_Awarp dirname dsetname1 dsetname2 …”, you’ll see the commands as they are executed and where that may have stalled. I recommend running @Align_Centers first to align each of the datasets to the center of the template. That will make the affine alignment (@auto_tlrc) run faster.

Hi again,

I was able to get the script to run through to the end without stalling, but I am receiving a lot of errors during the @auto_tlrc process, so I am unsure if the received outputs are correct.

I looked through the @auto_tlrc documentation but I’m not sure what the problem might be. Would you be able to look at some of these messages and help me identify if they are an issue? Particularly I am unsure how to handle these messages or if they should be of concern:

ans: Subscript out of range.
*** Can’t open dataset MNI152_1mm_uni+tlrc
v1_center_RAI: Subscript out of range.

williamss@linux5% /data/nil-external/ccp/OASES/OASES_FMRI/atlas/@toMNI_Awarp awarp5 205_MPRAGE_strip+orig.HEAD 206_MPRAGE_strip+orig.HEAD
mkdir: created directory `awarp5’

===== @toMNI_Awarp: copying input datasets to awarp5 =====

++ 3dcopy: AFNI version=AFNI_17.2.09 (Aug 22 2017) [64-bit]
++ 3dcopy: AFNI version=AFNI_17.2.09 (Aug 22 2017) [64-bit]

===== @toMNI_Awarp: beginning 3dUnifize loop =====

mkdir: created directory `Temp1’
++ 3dUnifize: AFNI version=AFNI_17.2.09 (Aug 22 2017) [64-bit]
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./205_MPRAGE_strip+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./205_MPRAGE_strip+orig.BRIK is 11.389321 degrees from plumb.

  • Pre-processing: ADV…UWG
    ++ ===== Elapsed = 55.0 sec
    mkdir: created directory `Temp2’
    ++ 3dUnifize: AFNI version=AFNI_17.2.09 (Aug 22 2017) [64-bit]
    *+ WARNING: If you are performing spatial transformations on an oblique dset,
    such as ./206_MPRAGE_strip+orig.BRIK,
    or viewing/combining it with volumes of differing obliquity,
    you should consider running:
    3dWarp -deoblique
    on this and other oblique datasets in the same session.
    See 3dWarp -help for details.
    ++ Oblique dataset:./206_MPRAGE_strip+orig.BRIK is 8.574255 degrees from plumb.
  • Pre-processing: ADV…UWG
    ++ ===== Elapsed = 52.6 sec

===== @toMNI_Awarp: beginning @auto_tlrc loop =====

ans: Subscript out of range.
*** Can’t open dataset MNI152_1mm_uni+tlrc
v1_center_RAI: Subscript out of range.
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./205_MPRAGE_strip_uni+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./205_MPRAGE_strip_uni+orig.BRIK is 11.389321 degrees from plumb.
c1: Subscript out of range.
Center distance of mm no auto_center needed

*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./205_MPRAGE_strip_uni+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./205_MPRAGE_strip_uni+orig.BRIK is 11.389321 degrees from plumb.
ans: Subscript out of range.
*** Can’t open dataset MNI152_1mm_uni+tlrc
v1_center_RAI: Subscript out of range.
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./205_MPRAGE_strip_uni+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./205_MPRAGE_strip_uni+orig.BRIK is 11.389321 degrees from plumb.
c1: Subscript out of range.
Center distance of mm
Padding …
++ 3dZeropad: AFNI version=AFNI_17.2.09 (Aug 22 2017) [64-bit]
** 3dZeropad: Can’t open dataset MNI152_1mm_uni+tlrc
Failed to pad
ans: Subscript out of range.
*** Can’t open dataset MNI152_1mm_uni+tlrc
v1_center_RAI: Subscript out of range.
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./206_MPRAGE_strip_uni+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./206_MPRAGE_strip_uni+orig.BRIK is 8.574255 degrees from plumb.
c1: Subscript out of range.
Center distance of mm no auto_center needed
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./206_MPRAGE_strip_uni+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./206_MPRAGE_strip_uni+orig.BRIK is 8.574255 degrees from plumb.
ans: Subscript out of range.
*** Can’t open dataset MNI152_1mm_uni+tlrc
v1_center_RAI: Subscript out of range.
*+ WARNING: If you are performing spatial transformations on an oblique dset,
such as ./206_MPRAGE_strip_uni+orig.BRIK,
or viewing/combining it with volumes of differing obliquity,
you should consider running:
3dWarp -deoblique
on this and other oblique datasets in the same session.
See 3dWarp -help for details.
++ Oblique dataset:./206_MPRAGE_strip_uni+orig.BRIK is 8.574255 degrees from plumb.
c1: Subscript out of range.
Center distance of mm
Padding …
++ 3dZeropad: AFNI version=AFNI_17.2.09 (Aug 22 2017) [64-bit]
** 3dZeropad: Can’t open dataset MNI152_1mm_uni+tlrc
Failed to pad
mv: will not overwrite just-created ./MNI152_1mm_uni+tlrc.BRIK' with Temp2/MNI152_1mm_uni+tlrc.BRIK’
mv: will not overwrite just-created ./MNI152_1mm_uni+tlrc.HEAD' with Temp2/MNI152_1mm_uni+tlrc.HEAD’

===== @toMNI_Awarp compressing output BRIK files =====

205_MPRAGE_strip+orig.BRIK: 90.4% – replaced with 205_MPRAGE_strip+orig.BRIK.gz
206_MPRAGE_strip+orig.BRIK: 90.6% – replaced with 206_MPRAGE_strip+orig.BRIK.gz
MNI152_1mm_uni+tlrc.BRIK: 78.4% – replaced with MNI152_1mm_uni+tlrc.BRIK.gz

===== @toMNI_Awarp is wrapped up, done, finished, and over =====

Thanks so much for your help

Best,
Sam Williams