animal_warper failing for some images

Hello!

I’m attempting to run @animal_warper between a native space T1w image and the D99 atlas. Unfortunately, for some of the macaques this isn’t working. The errors seem to be related to 3DQwarp. I have tried running @align_centers first on the images (aligning the native T1w with the D99_template), and also have run FLIRT between the two images because I was reading on other threads that the issue may be due to the images being very far apart. However this has not fixed the issue, despite the images now being on top of each other when viewing through fsleyes. I have also run the command on the cluster with 100GB+ of memory so I doubt its a memory issue. Do you know what might be going wrong here? I have pasted the output from when it starts to have warnings/ errors below. Happy to post it all if you like, and can upload the crash log as well?

Many thanks,
Sam


*+ WARNING: Parameter z-shift =  41.80656 is close to edge of its search range -38.13291 ..  41.86709
 + - Fine net CPU time = 0.0 s
++ Computing output image
++ image warp: parameters = -38.5248 -14.0263 41.8066 -37.0619 -43.3652 20.6220 1.0346 1.0497 0.7239 0.0163 -0.0150 -0.0304
++ Unloading unneeded data
++ Wrote -1Dmatrix_save ./D99_template_al2std_mat.aff12.1D
++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 983.2
++ ###########################################################
++ #   PLEASE check results VISUALLY for alignment quality   #
++ ###########################################################
#++  Applying alignment for dset2 to dset1
#++ Inverting dset1 to dset2 matrix
#Script is running (command trimmed):
  cat_matvec -ONELINE ./D99_template_al2std_mat.aff12.1D -I > ./center_aligned_T1_pshft_al2std_mat.aff12.1D
#++ Applying transformation of dset2 to dset1
#Script is running (command trimmed):
  3dAllineate -base /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz -1Dmatrix_apply ./center_aligned_T1_pshft_al2std_mat.aff12.1D -prefix ./center_aligned_T1_pshft_al2std -input ./__tt_center_aligned_T1_pshft+tlrc -master BASE -mast_dxyz 0.250000 -weight_frac 1.0 -maxrot 6 -maxshf 10 -VERB -warp aff -source_automask+4 -twoblur 1.000000 -blok "RHDD(0.500000)" -twobest 11 -twopass -VERB -maxrot 45 -maxshf 40 -fineblur 0.5 -source_automask+2 -overwrite
++ 3dAllineate: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Registrator
*+ WARNING: Small value 0.25 after -mast_dxyz :-(
++ Source dataset: ./__tt_center_aligned_T1_pshft+tlrc.HEAD
++ Base dataset:   /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz
++ Loading datasets into memory
++ base center of mass = 136.500 147.653 125.509 (index)
 + source center of mass = 135.789 207.093 118.041 (index)
 + source-target CM = -0.428 2.186 -1.867 (xyz)
 +        -cmass x y z shifts =   -0.428    2.186   -1.867
 +  shift search range is +/- =   21.989   27.767   19.581
 + Range param#4 [z-angle] = -6.000000 .. 6.000000  center = 0.000000
 + Range param#5 [x-angle] = -6.000000 .. 6.000000  center = 0.000000
 + Range param#6 [y-angle] = -6.000000 .. 6.000000  center = 0.000000
 + Range param#1 [x-shift] = -10.000000 .. 10.000000  center = 0.000000
 + Range param#2 [y-shift] = -10.000000 .. 10.000000  center = 0.000000
 + Range param#3 [z-shift] = -10.000000 .. 10.000000  center = 0.000000
 + Range param#4 [z-angle] = -45.000000 .. 45.000000  center = 0.000000
 + Range param#5 [x-angle] = -45.000000 .. 45.000000  center = 0.000000
 + Range param#6 [y-angle] = -45.000000 .. 45.000000  center = 0.000000
 + Range param#1 [x-shift] = -40.000000 .. 40.000000  center = 0.000000
 + Range param#2 [y-shift] = -40.000000 .. 40.000000  center = 0.000000
 + Range param#3 [z-shift] = -40.000000 .. 40.000000  center = 0.000000
++ Final parameter search ranges:
 +       x-shift =  -40.000 ..   40.000
 +       y-shift =  -40.000 ..   40.000
 +       z-shift =  -40.000 ..   40.000
 +       z-angle =  -45.000 ..   45.000
 +       x-angle =  -45.000 ..   45.000
 +       y-angle =  -45.000 ..   45.000
 +       x-scale =    0.711 ..    1.406
 +       y-scale =    0.711 ..    1.406
 +       z-scale =    0.711 ..    1.406
 +     y/x-shear =   -0.111 ..    0.111
 +     z/x-shear =   -0.111 ..    0.111
 +     z/y-shear =   -0.111 ..    0.111
++ changing output grid spacing to 0.2500 mm
++ OpenMP thread count = 4
++ ========== Applying transformation to 1 sub-bricks ==========
++ ========== sub-brick #0 ========== [total CPU to here=0.0 s]
 + * Enter alignment setup routine
 + - copying base image
 + - copying source image
 + - no weight image
 + - using 11 points from base image [use_all=0]
 + * Exit alignment setup routine
++ using -1Dmatrix_apply
++ Computing output image
++ image warp: parameters = -0.5876 -0.4455 0.9233 165.7096 0.7347 -0.5653 0.4152 -37.7864 0.2232 0.6255 0.9400 -375.1440
++ Unloading unneeded data
++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 5.0
++ ###########################################################
#++ Creating final output: dset2 data aligned to dset1
# copy is not necessary
#++ Saving history
#Script is running (command trimmed):
  3dNotes -h "align_epi_anat.py -overwrite -output_dir intermediate -dset2 \
 intermediate/center_aligned_T1_pshft.nii.gz -dset1 \
 /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz \
 -dset2to1 -suffix _al2std -dset1_strip None -dset2_strip None -cost \
 lpa+ZZ -feature_size 0.5 -giant_move -master_dset2 BASE" \
 ./center_aligned_T1_pshft_al2std+tlrc

#++ Removing all the temporary files
#Script is running (command trimmed):
  \rm -f ./__tt_center_aligned_T1_pshft*
#Script is running (command trimmed):
  \rm -f ./__tt_D99_template*
# Finished alignment successfully

++ 3dAFNItoNIFTI: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3drefit: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset intermediate/center_aligned_T1_shft.nii.gz
 + deoblique
 + loading and re-writing dataset intermediate/center_aligned_T1_shft.nii.gz (/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft.nii.gz in NIFTI storage)
++ 3drefit processed 1 datasets
++ 3dAllineate: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Registrator
++ Source dataset: /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft.nii.gz
++ Base dataset:   /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz
++ Loading datasets into memory
*+ WARNING: center of mass shifts (-cmass) are turned off, but would be TERRIBLY large!
*+ WARNING:   - at least one is more than 50% of search range
 +        -cmass x y z shifts =    9.290   39.922   54.804
 +  shift search range is +/- =   21.989   27.767   19.581
 +                                 42.2%   143.8%   279.9%
++ OpenMP thread count = 4
++ ========== Applying transformation to 1 sub-bricks ==========
++ Output dataset intermediate/center_aligned_T1_shft_aff.nii.gz
++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 2.2
++ ###########################################################
 +  
++ ***********************************************************
*+ WARNING: -cmass was turned off, but might have been needed :(
 +           Please check your results - PLEASE PLEASE PLEASE
++ ***********************************************************
++ Prepare for running @djunct_overlap_check (ver = 0.42)
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./QC/__workdir_olap_pQpViRgP5C9/olapch_0_cp_ulay.nii
++ Just copy olay, bc ulay will get regridded
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./QC/__workdir_olap_pQpViRgP5C9/olapch_1_cp_olay.nii
++ Quietly run: 3drefit -space D99_Macaque olapch_0_cp_ulay.nii


++ olay_alpha has known value: No
++ My command:
   @chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 3 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 4 -do_clean -set_dicom_xyz 0 0 0

++ Using AFNI ver : AFNI_21.2.09
++ chauffeur ver  : 6.29
** ERROR: Xvfb -- not found in path -- program fails

++ DONE (bad exit): check for errors

2dcat: No match.

+* Removing temporary workdir 'QC/__workdir_olap_pQpViRgP5C9*'


++ DONE! Image output:
       QC/init_qc_02_inpaff_base

#++ auto_warp.py version: 0.06
-- clearing AFNI_COMPRESSOR ...
# Output directory /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/
#Script is running (command trimmed):
  mkdir ./awpy_center_aligned_T1_pshft/
cd /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/
#Script is running (command trimmed):
  3dcopy /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft_aff.nii.gz ./anat.nii
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#Script is running (command trimmed):
  3dUnifize -GM -input ./anat.nii -prefix ./anat.un.nii
++ 3dUnifize: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
 + Pre-processing: ADVUWm
++ Output dataset ./anat.un.nii
++ ===== Elapsed = 17.5 sec
#Script is running (command trimmed):
  3dcopy /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz ./base.nii
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#Script is running (command trimmed):
  3dAttribute DELTA ./anat.un.nii
#Script is running (command trimmed):
  3dAttribute DELTA ./base.nii
0.250000 0.250000
#Script is running (command trimmed):
  3dinfo -same_grid ./anat.un.nii ./base.nii
#++ Aligning /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/base.nii data to /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/anat.un.nii data
#Script is running (command trimmed):
  3dQwarp -prefix ./anat.un.qw.nii -blur -3 -3 -workhard:0:2 -iwarp \
 -maxlev 09 -base ./base.nii -source ./anat.un.nii 
++ OpenMP thread count = 4
++ 3dQwarp: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the (Hermite) Cubically Warped
** FATAL ERROR: 3dQwarp fails :: source image has 0 nonzero voxels (< 100)
** Program compile date = Sep 27 2021
#**ERROR Failed in warping step
** ERROR - script failed
3dcopy: No match.
3dcopy: No match.

+++ Command Echo:
   3dNwarpCat -warp1 center_aligned_T1_shft_WARP.nii.gz -warp2 intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D -prefix intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz 

++ 3dNwarpCat: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warper
** ERROR: Can't open dataset from file 'center_aligned_T1_shft_WARP.nii.gz'
** ERROR: Failed to read 3D warp from 'center_aligned_T1_shft_WARP.nii.gz'
** ERROR: Can't compute nonlinear warp from string 'center_aligned_T1_shft_WARP.nii.gz intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D '
** ERROR: EDIT_dset_items[1]: invalid input dataset
** ERROR: Cannot write dataset: it is invalid

Fatal Signal 11 (SIGSEGV) received
  3dNwarpCat
 Bottom of Debug Stack
** Command line was:
3dNwarpCat -warp1 center_aligned_T1_shft_WARP.nii.gz -warp2 intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D -prefix intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz
** AFNI version = AFNI_21.2.09  Compile date = Sep 27 2021
** [[Precompiled binary linux_openmp_64: Sep 27 2021]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/c1639425/.afni.crashlog

+++ Command Echo:
   3dNwarpCat -warp1 intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D -warp2 center_aligned_T1_shft_WARPINV.nii.gz -space NO-DSET -prefix intermediate/center_aligned_T1_shft_base2osh_WARP.nii.gz 

++ 3dNwarpCat: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warper
** ERROR: Can't open dataset from file 'center_aligned_T1_shft_WARPINV.nii.gz'
** ERROR: Failed to read 3D warp from 'center_aligned_T1_shft_WARPINV.nii.gz'
** ERROR: Can't compute nonlinear warp from string 'intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D center_aligned_T1_shft_WARPINV.nii.gz '

Fatal Signal 11 (SIGSEGV) received
  3dNwarpCat
 Bottom of Debug Stack
** Command line was:
3dNwarpCat -warp1 intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D -warp2 center_aligned_T1_shft_WARPINV.nii.gz -space NO-DSET -prefix intermediate/center_aligned_T1_shft_base2osh_WARP.nii.gz
** AFNI version = AFNI_21.2.09  Compile date = Sep 27 2021
** [[Precompiled binary linux_openmp_64: Sep 27 2021]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/c1639425/.afni.crashlog
++ 3dNwarpApply: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warped
++ opened source dataset 'intermediate/center_aligned_T1_shft.nii.gz'
++ -master dataset is '/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/D99_template.nii.gz'
++ Processing -nwarp ** ERROR: Can't open dataset from file 'intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz'
** ERROR: Can't open 3D warp dataset 'intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz'

** FATAL ERROR: Cannot process warp string 'intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz '
** Program compile date = Sep 27 2021
** ERROR: program failed (3dNwarpApply, osh2base)

Hi, Sam-

There are a couple things to note. The first error message that program produces is:


** ERROR: Xvfb -- not found in path -- program fails

… which means that the automatic QC image generation cannot occur. It would be good to fix that issue, since looking at the QC images was going to be my first question to help address the other/main code crashing.

Could you please copy+paste the output of:


afni_system_check.py -check_all

here?

thanks,
pt

Hi pt,

Thanks for the quick repsonse.

The output of that command is:

afni_system_check.py -check_all
-------------------------------- general ---------------------------------
architecture: 64bit ELF
system: Linux
release: 3.10.0-957.12.1.el7.x86_64
version: #1 SMP Mon Apr 29 14:59:59 UTC 2019
distribution: CentOS Linux 7 (Core)
number of CPUs: 4
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /cubric/software/afni.versions/21.2.09/afni
afni version : Precompiled binary linux_openmp_64: Sep 27 2021
: AFNI_21.2.09 ‘Nerva’
AFNI_version.txt : AFNI_21.2.09, linux_openmp_64, Sep 27 2021
which python : /cubric/data/c1639425/miniconda3/envs/python3.9/bin/python
python version : 3.9.12
which R : /cubric/software/r.versions/3.5.1/bin/R
R version : R version 3.5.1 (2018-07-02) – “Feather Spray”
which tcsh : /bin/tcsh

instances of various programs found in PATH:
afni : 1 (/cubric/software/afni.versions/21.2.09/afni)
R : 2
/cubric/software/r.versions/3.5.1/bin/R
/usr/bin/R
python : 3
/cubric/data/c1639425/miniconda3/envs/python3.9/bin/python3.9
/usr/bin/python2.7
/cubric/data/c1639425/miniconda3/bin/python3.9
python2 : 1 (/usr/bin/python2.7)
python3 : 3
/cubric/data/c1639425/miniconda3/envs/python3.9/bin/python3.9
/usr/bin/python3.6
/cubric/data/c1639425/miniconda3/bin/python3.9

testing ability to start various programs…
afni : success
suma : success
3dSkullStrip : success
uber_subject.py : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
3dMVM : success

checking for R packages…
rPkgsInstall -pkgs ALL -check : FAILURE

    oo Warning: 
       These packages are not installed on the computer: brms!
    These packages are not installed on the computer: metafor!

R RHOME : /cubric/software/r.versions/3.5.1/lib64/R

checking for $HOME files…
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------
** failed to load module PyQt4
– PyQt4 is no longer needed for an AFNI bootcamp

** failed to load module matplotlib.pyplot
– matplotlib.pyplot is not required, but is desirable

-------------------------------- env vars --------------------------------
PATH = /cubric/data/c1639425/miniconda3/envs/python3.9/bin:/cubric/data/c1639425/miniconda3/condabin:/cubric/software/gcc.versions/8.3/bin:/cubric/software/r.versions/3.5.1/bin:/cubric/software/fsl/bin:/cubric/software/freesurfer/bin:/cubric/software/freesurfer/fsfast/bin:/cubric/software/freesurfer/tktools:/cubric/software/fsl/bin:/cubric/software/freesurfer/mni/bin:/cubric/software/gcc.versions/8.3/bin:/cubric/software/r.versions/3.5.1/bin:/cubric/software/fsl/bin:/cubric/software/freesurfer/bin:/cubric/software/freesurfer/fsfast/bin:/cubric/software/freesurfer/tktools:/cubric/software/fsl/bin:/cubric/software/freesurfer/mni/bin:/cubric/software/gcc.versions/8.3/bin:/cubric/software/r.versions/3.5.1/bin:/opt/VirtualGL/bin:/cubric/software/fsl/bin:/cubric/software/freesurfer/bin:/cubric/software/freesurfer/fsfast/bin:/cubric/software/freesurfer/tktools:/cubric/software/fsl/bin:/cubric/software/freesurfer/mni/bin:/cubric/software/gcc.versions/8.3/bin:/cubric/software/r.versions/3.5.1/bin:/opt/VirtualGL/bin:/cubric/software/fsl/bin:/cubric/software/freesurfer/bin:/cubric/software/freesurfer/fsfast/bin:/cubric/software/freesurfer/tktools:/cubric/software/fsl/bin:/cubric/software/freesurfer/mni/bin:/cubric/software/gcc.versions/8.3/bin:/cubric/software/r.versions/3.5.1/bin:/opt/VirtualGL/bin:/usr/lib64/qt-3.3/bin:/cubric/software/fsl/bin:/cubric/software/freesurfer/bin:/cubric/software/freesurfer/fsfast/bin:/cubric/software/freesurfer/tktools:/cubric/software/freesurfer/mni/bin:/usr/local/MATLAB/R2015aSP1/bin:/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/opt/matlab/bin:/cubric/software/bin:/opt/MATLAB/R2012b/bin:/opt/MATLAB/R2017b/bin:/cubric/software/afni.versions/21.2.09:/home/c1639425/itksnap/itksnap-3.8.0-20190612-Linux-gcc64/bin:/cubric/software/mrtrix.versions/3_20200227/bin:/cubric/software/ants.versions/2.1.0/Scripts:/cubric/software/ants.versions/2.1.0/bin:/cubric/data/c1639425/miniconda3/bin:/home/c1639425/.local/bin:/home/c1639425/bin:/cubric/software/bin:/opt/MATLAB/R2017b/bin:/opt/MATLAB/R2012b/bin:/cubric/software/afni.versions/21.2.09:/home/c1639425/itksnap/itksnap-3.8.0-20190612-Linux-gcc64/bin:/cubric/software/mrtrix.versions/3_20200227/bin:/cubric/software/ants.versions/2.1.0/Scripts:/cubric/software/ants.versions/2.1.0/bin:/cubric/data/c1639425/miniconda3/bin:/home/c1639425/.local/bin:/home/c1639425/bin:/cubric/software/bin:/opt/MATLAB/R2017b/bin:/opt/MATLAB/R2012b/bin:/cubric/software/afni.versions/21.2.09:/home/c1639425/itksnap/itksnap-3.8.0-20190612-Linux-gcc64/bin:/cubric/software/mrtrix.versions/3_20200227/bin:/cubric/software/ants.versions/2.1.0/Scripts:/cubric/software/ants.versions/2.1.0/bin:/cubric/data/c1639425/miniconda3/bin:/home/c1639425/.local/bin:/home/c1639425/bin:/cubric/software/bin:/opt/MATLAB/R2017b/bin:/opt/MATLAB/R2012b/bin:/cubric/software/afni.versions/21.2.09:/home/c1639425/itksnap/itksnap-3.8.0-20190612-Linux-gcc64/bin:/cubric/software/mrtrix.versions/3_20200227/bin:/cubric/software/ants.versions/2.1.0/Scripts:/cubric/software/ants.versions/2.1.0/bin:/cubric/data/c1639425/miniconda3/bin:/cubric/software/bin:/opt/MATLAB/R2017b/bin:/opt/MATLAB/R2012b/bin:/cubric/software/afni.versions/21.2.09:/home/c1639425/itksnap/itksnap-3.8.0-20190612-Linux-gcc64/bin:/cubric/software/mrtrix.versions/3_20200227/bin:/cubric/software/ants.versions/2.1.0/Scripts:/cubric/software/ants.versions/2.1.0/bin:/cubric/data/c1639425/miniconda3/bin

PYTHONPATH =
R_LIBS = /home/c1639425/R

LD_LIBRARY_PATH = /cubric/software/gcc.versions/8.3/lib64:/cubric/software/gcc.versions/8.3/lib64::/cubric/software/ctf.versions/ctf-libs/:/cubric/software/mrtrix.versions/3_20200227/lib:/cubric/software/ants.versions/2.1.0/lib/:/cubric/software/ctf.versions/ctf-libs/:/cubric/software/mrtrix.versions/3_20200227/lib:/cubric/software/ants.versions/2.1.0/lib/

DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /cubric/software/afni.versions/21.2.09

------------------------------ OS specific -------------------------------
which yum : /bin/yum
yum version : 3.4.3

========================= summary, please fix: =========================

  • just be aware: login shell ‘bash’, but our code examples use ‘tcsh’
  • missing R packages (see rPkgsInstall)
  • insufficient data for AFNI bootcamp

Best wishes,
Sam

Hi, Sam-

Thanks for providing that.

The CentOS depending list is here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/install_instructs/steps_linux_RH.html#install-prerequisite-packages
… and includes Xvfb. Are you running on a managed software system, or on one where you have sudo/admin privileges to install software?

I also see this failure message:


** failed to load module matplotlib.pyplot

… which will be problematic at times. Your Python of choice comes from miniconda:


/cubric/data/c1639425/miniconda3/envs/python3.9/bin/python

… and you can matplotlib to your conda environment, here are some notes:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/miniconda.html#short-list-of-conda-commands
And I think adding matplotlib could be done with this on your system, since your env name appears to be “python3.9”:


conda install -n python3.9 "matplotlib>=2.2.3"

–pt

Unfortunately its a managed system, shall I ask IT to install Xvfb?

Many thanks,
Sam

I think that would be good to do, yes.

I don’t think you can install it just with conda, say.

–pt

Okay, all done (thank you IT!)

The outputs (with some trimming) and QC images are below.

Many thanks!
Sam

@animal_warper -input center_aligned_T1.nii -base /cubric/collab/505_subiculum/Monkey_brains/D99_v2.0_dist/D99_template.nii.gz -atlas /cubric/collab/505_subiculum/Monkey_brains/D99_v2.0_dist/D99_atlas_v2.0.nii.gz

++ Start @animal_warper, ver = 3.39
++ Prepare for running @djunct_overlap_check (ver = 0.42)
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./aw_results/QC/__workdir_olap_BF2DtBfz9Vc/olapch_0_cp_ulay.nii
++ Just copy olay, bc ulay will get regridded
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./aw_results/QC/__workdir_olap_BF2DtBfz9Vc/olapch_1_cp_olay.nii
++ Quietly run: 3drefit -space D99_Macaque olapch_0_cp_ulay.nii

++ olay_alpha has known value: No
++ My command:
@chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 3 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 4 -do_clean -set_dicom_xyz 0 0 0

++ Using AFNI ver : AFNI_21.2.09
++ chauffeur ver : 6.29

------------------ start of optionizing ------------------

++ Found input file: olapch_0_cp_ulay.nii
++ Found input file: olapch_1_cp_olay.nii
++ Using blowup factor: 2
++ Using opacity: 3
++ Making temporary work directory to copy vis files: ./__tmp_chauf_5DPqsY1gM2c
++ Converted 0 to labels
++ Final subbrick indices: 0 0 0
++ Copy ulay to visualize (volumetric) within user’s range:
++ Ulay to be visualized within user range:
[0%, 98%] → [0.000000, 2265.500000]
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tmp_chauf_5DPqsY1gM2c/tmp_ulay.nii
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tmp_chauf_5DPqsY1gM2c/tmp_olay.nii
++ For olay, the 98%ile value leads to
→ upper range value: 208.000000
++ Dimensions (xyzt): 275 347 245 1
++ (initial) Slice spacing ordered (x,y,z) is: 275 347 245
++ Will have user’s chosen: SET_DICOM_XYZ 0 0 0

------------------- end of optionizing -------------------

– trying to start Xvfb :822
[1] 23135

+++ Command Echo:
afni -q -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=3 mont=1x1:275:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=3 mont=1x1:347:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=3 mont=1x1:245:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 2265.500000 -com SET_FUNC_RANGE 208.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_XHAIR_GAP -1 -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG axialimage ./img00.axi blowup=2 -com SAVE_JPEG sagittalimage ./img00.sag blowup=2 -com SAVE_JPEG coronalimage ./img00.cor blowup=2 -com QUITT ./__tmp_chauf_5DPqsY1gM2c

+/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/QC/__workdir_olap_BF2DtBfz9Vc/__tmp_chauf_5DPqsY1gM2c++ Writing one 550x694 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.axi.jpg’
++ Writing one 694x490 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.sag.jpg’
++ Writing one 550x490 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.cor.jpg’

AFNI QUITTs!

+* Removing temporary image directory ‘./__tmp_chauf_5DPqsY1gM2c’.

[1] + Done Xvfb :822 -screen 0 1024x768x24

++ DONE (good exit)
see: ./img00*

+++ Arranging 3 images (each 550x694) into a 3x1 matrix.
+++ Transforming all input to rgb for a good reason
+++ Writing image to …/init_qc_00_inp_base.jpg
You can view image …/init_qc_00_inp_base.jpg with:
aiv …/init_qc_00_inp_base.jpg

+* Removing temporary workdir ‘aw_results/QC/__workdir_olap_BF2DtBfz9Vc*’

++ DONE! Image output:
aw_results/QC/init_qc_00_inp_base

++ Making ‘base’ abbrev:
… D99_Macaque
→ D99_Macaque
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Making list of ‘atlas_follower’ abbrevs:
… D99_atlas_v2.0 → D99_atlas_v2.0
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3drefit: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset ./intermediate/center_aligned_T1_pshft.nii.gz

  • deoblique
  • loading and re-writing dataset ./intermediate/center_aligned_T1_pshft.nii.gz (/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_pshft.nii.gz in NIFTI storage)
    ++ 3drefit processed 1 datasets
    ++ Prepare for running @djunct_overlap_check (ver = 0.42)
    ++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
    ++ Authored by: A cast of thousands
    ++ Output dataset ./QC/__workdir_olap_V6nDvfjZlLN/olapch_0_cp_ulay.nii
    ++ Just copy olay, bc ulay will get regridded
    ++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
    ++ Authored by: A cast of thousands
    ++ Output dataset ./QC/__workdir_olap_V6nDvfjZlLN/olapch_1_cp_olay.nii
    ++ Quietly run: 3drefit -space D99_Macaque olapch_0_cp_ulay.nii

++ olay_alpha has known value: No
++ My command:
@chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 3 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 4 -do_clean -set_dicom_xyz 0 0 0

++ Using AFNI ver : AFNI_21.2.09
++ chauffeur ver : 6.29

------------------ start of optionizing ------------------

++ Found input file: olapch_0_cp_ulay.nii
++ Found input file: olapch_1_cp_olay.nii
++ Using blowup factor: 2
++ Using opacity: 3
++ Making temporary work directory to copy vis files: ./__tmp_chauf_2MFLsOmdtou
++ Converted 0 to labels
++ Final subbrick indices: 0 0 0
++ Copy ulay to visualize (volumetric) within user’s range:
++ Ulay to be visualized within user range:
[0%, 98%] → [0.000000, 2265.500000]
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tmp_chauf_2MFLsOmdtou/tmp_ulay.nii
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tmp_chauf_2MFLsOmdtou/tmp_olay.nii
++ For olay, the 98%ile value leads to
→ upper range value: 208.000000
++ Dimensions (xyzt): 275 347 245 1
++ (initial) Slice spacing ordered (x,y,z) is: 275 347 245
++ Will have user’s chosen: SET_DICOM_XYZ 0 0 0

------------------- end of optionizing -------------------

– trying to start Xvfb :300
[1] 23550

+++ Command Echo:
afni -q -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=3 mont=1x1:275:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=3 mont=1x1:347:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=3 mont=1x1:245:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 2265.500000 -com SET_FUNC_RANGE 208.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_XHAIR_GAP -1 -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG axialimage ./img00.axi blowup=2 -com SAVE_JPEG sagittalimage ./img00.sag blowup=2 -com SAVE_JPEG coronalimage ./img00.cor blowup=2 -com QUITT ./__tmp_chauf_2MFLsOmdtou

+/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/QC/__workdir_olap_V6nDvfjZlLN/__tmp_chauf_2MFLsOmdtou++ Writing one 550x694 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.axi.jpg’
++ Writing one 694x490 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.sag.jpg’
++ Writing one 550x490 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.cor.jpg’

AFNI QUITTs!

+* Removing temporary image directory ‘./__tmp_chauf_2MFLsOmdtou’.

[1] + Done Xvfb :300 -screen 0 1024x768x24

++ DONE (good exit)
see: ./img00*

+++ Arranging 3 images (each 550x694) into a 3x1 matrix.
+++ Transforming all input to rgb for a good reason
+++ Writing image to …/init_qc_01_inpsh_base.jpg
You can view image …/init_qc_01_inpsh_base.jpg with:
aiv …/init_qc_01_inpsh_base.jpg

+* Removing temporary workdir ‘QC/__workdir_olap_V6nDvfjZlLN*’

++ DONE! Image output:
QC/init_qc_01_inpsh_base

#++ align_epi_anat version: 1.62
#++ turning off tshift, volume registration, resampling
#++ turning off tshift, volume registration, resampling
#Script is running (command trimmed):
3dAttribute DELTA ./intermediate/center_aligned_T1_pshft.nii.gz
#Script is running (command trimmed):
3dAttribute DELTA ./intermediate/center_aligned_T1_pshft.nii.gz
#Script is running:
3dAttribute DELTA /cubric/collab/505_subiculum/Monkey_brains/D99_v2.0_dist/D99_template.nii.gz
#++ Multi-cost is lpa+ZZ

User has selected a new output directory /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/

#Script is running (command trimmed):
mkdir ./intermediate/
mkdir: cannot create directory ‘./intermediate/’: File exists
cd /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/
#++ Removing all the temporary files
#Script is running (command trimmed):
\rm -f ./__tt_center_aligned_T1_pshft*
#Script is running (command trimmed):
\rm -f ./__tt_D99_template*
#Script is running (command trimmed):
3dcopy /cubric/collab/505_subiculum/Monkey_brains/D99_v2.0_dist/D99_template.nii.gz ./__tt_D99_template+orig
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#Script is running (command trimmed):
3dinfo ./__tt_D99_template+orig | \grep ‘Data Axes Tilt:’|\grep ‘Oblique’
#++ Dataset /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/__tt_D99_template+orig is not oblique
#Script is running (command trimmed):
3dinfo ./center_aligned_T1_pshft.nii.gz | \grep ‘Data Axes Tilt:’|\grep ‘Oblique’
#++ Dataset /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_pshft.nii.gz is not oblique
#++ Copying NIFTI EPI input to AFNI format
#Script is running (command trimmed):
3dcopy ./center_aligned_T1_pshft.nii.gz ./__tt_center_aligned_T1_pshft+tlrc
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#++ using 0th sub-brick because only one found
#Script is running (command trimmed):
3dbucket -prefix ./__tt_center_aligned_T1_pshft_ts ./__tt_center_aligned_T1_pshft+tlrc’[0]’
++ 3dbucket: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#++ removing skull or area outside brain
#++ Computing weight mask
#Script is running (command trimmed):
3dBrickStat -automask -percentile 90.000000 1 90.000000 ./__tt_center_aligned_T1_pshft_ts+tlrc
#++ Applying threshold of 2200.000000 on /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/__tt_center_aligned_T1_pshft_ts+tlrc
#Script is running (command trimmed):
3dcalc -datum float -prefix ./__tt_center_aligned_T1_pshft_ts_wt -a ./__tt_center_aligned_T1_pshft_ts+tlrc -expr ‘min(1,(a/2200.000000))’
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
#++ Aligning dset1 data to dset2 data
#Script is running (command trimmed):
3dAllineate -lpa+ZZ -wtprefix ./__tt_D99_template_al2std_wtal -weight ./__tt_center_aligned_T1_pshft_ts_wt+tlrc -source ./__tt_D99_template+orig -prefix ./__tt_D99_template_al2std -base ./__tt_center_aligned_T1_pshft_ts+tlrc -cmass -1Dmatrix_save ./D99_template_al2std_mat.aff12.1D -master BASE -mast_dxyz 0.250000 -weight_frac 1.0 -maxrot 6 -maxshf 10 -VERB -warp aff -source_automask+4 -twoblur 1.000000 -blok “RHDD(0.500000)” -twobest 11 -twopass -VERB -maxrot 45 -maxshf 40 -fineblur 0.5 -source_automask+2
++ 3dAllineate: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Registrator
++ lpa+ parameters: hel=1.00 mi=0.00 nmi=0.20 crA=0.40 ov=0.00 [to be zeroed at Final iteration]
++ Option ‘-cmass’ enables center-of-mass code = 7 = +xyz
*+ WARNING: Small value 0.25 after -mast_dxyz :frowning:
++ Source dataset: ./__tt_D99_template+orig.HEAD
++ Base dataset: ./__tt_center_aligned_T1_pshft_ts+tlrc.HEAD
++ Loading datasets into memory
++ 7006921 voxels in -source_automask+2
++ Zero-pad: xbot=30 xtop=26
++ Zero-pad: ybot=16 ytop=43
++ Zero-pad: zbot=21 ztop=17
++ 7388107 voxels [19.4%] in weight mask
++ Number of points for matching = 7388107
++ Local correlation: blok type = ‘RHDD(1.63065)’
++ lpa+ parameters: hel=1.00 mi=0.00 nmi=0.20 crA=0.40 ov=0.00 [to be zeroed at Final iteration]
++ base center of mass = 165.789 223.093 139.041 (index)

  • source center of mass = 136.500 147.653 125.509 (index)
  • source-target CM = 0.428 -2.186 1.867 (xyz)
  • estimated center of mass shifts = 0.428 -2.186 1.867

< parameter values removed>

Finished alignment successfully

++ 3dAFNItoNIFTI: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ 3drefit: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: RW Cox
++ Processing AFNI dataset intermediate/center_aligned_T1_shft.nii.gz

  • deoblique
  • loading and re-writing dataset intermediate/center_aligned_T1_shft.nii.gz (/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft.nii.gz in NIFTI storage)
    ++ 3drefit processed 1 datasets
    ++ 3dAllineate: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
    ++ Authored by: Zhark the Registrator
    ++ Source dataset: /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft.nii.gz
    ++ Base dataset: /cubric/collab/505_subiculum/Monkey_brains/D99_v2.0_dist/D99_template.nii.gz
    ++ Loading datasets into memory
    *+ WARNING: center of mass shifts (-cmass) are turned off, but would be TERRIBLY large!
    *+ WARNING: - at least one is more than 50% of search range
  •    -cmass x y z shifts =    9.290   39.922   54.804
    
  • shift search range is +/- = 21.989 27.767 19.581
  •                             42.2%   143.8%   279.9%
    

++ OpenMP thread count = 4
++ ========== Applying transformation to 1 sub-bricks ==========
++ Output dataset intermediate/center_aligned_T1_shft_aff.nii.gz
++ 3dAllineate: total CPU time = 0.0 sec Elapsed = 2.2
++ ###########################################################
+
++ ***********************************************************
*+ WARNING: -cmass was turned off, but might have been needed :frowning:

  •       Please check your results - PLEASE PLEASE PLEASE
    

++ ***********************************************************
++ Prepare for running @djunct_overlap_check (ver = 0.42)
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./QC/__workdir_olap_Cz0OKk26mCn/olapch_0_cp_ulay.nii
++ Just copy olay, bc ulay will get regridded
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ./QC/__workdir_olap_Cz0OKk26mCn/olapch_1_cp_olay.nii
++ Quietly run: 3drefit -space D99_Macaque olapch_0_cp_ulay.nii

++ olay_alpha has known value: No
++ My command:
@chauffeur_afni -ulay olapch_0_cp_ulay.nii -pass -pass -olay olapch_1_cp_olay.nii -ulay_range 0% 98% -func_range_perc_nz 98 -cbar Reds_and_Blues -pbar_posonly -set_subbricks 0 0 0 -olay_alpha No -olay_boxed No -opacity 3 -zerocolor black -prefix img00 -montx 1 -monty 1 -montgap 1 -montcolor black -save_ftype JPEG -set_xhairs OFF -label_mode 1 -label_size 4 -do_clean -set_dicom_xyz 0 0 0

++ Using AFNI ver : AFNI_21.2.09
++ chauffeur ver : 6.29

------------------ start of optionizing ------------------

++ Found input file: olapch_0_cp_ulay.nii
++ Found input file: olapch_1_cp_olay.nii
++ Using blowup factor: 2
++ Using opacity: 3
++ Making temporary work directory to copy vis files: ./__tmp_chauf_2sjmch3CY7E
++ Converted 0 to labels
++ Final subbrick indices: 0 0 0
++ Copy ulay to visualize (volumetric) within user’s range:
++ Ulay to be visualized within user range:
[0%, 98%] → [0.000000, 0]
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tmp_chauf_2sjmch3CY7E/tmp_ulay.nii
++ 3dcalc: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: A cast of thousands
++ Output dataset ././__tmp_chauf_2sjmch3CY7E/tmp_olay.nii
++ For olay, the 98%ile value leads to
→ upper range value: 208.000000
++ Dimensions (xyzt): 275 347 245 1
++ (initial) Slice spacing ordered (x,y,z) is: 275 347 245
++ Will have user’s chosen: SET_DICOM_XYZ 0 0 0

------------------- end of optionizing -------------------

– trying to start Xvfb :527
[1] 24715

+++ Command Echo:
afni -q -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=3 mont=1x1:275:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=3 mont=1x1:347:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=3 mont=1x1:245:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 0 -com SET_FUNC_RANGE 208.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_XHAIR_GAP -1 -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG axialimage ./img00.axi blowup=2 -com SAVE_JPEG sagittalimage ./img00.sag blowup=2 -com SAVE_JPEG coronalimage ./img00.cor blowup=2 -com QUITT ./__tmp_chauf_2sjmch3CY7E

+/cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/QC/__workdir_olap_Cz0OKk26mCn/__tmp_chauf_2sjmch3CY7E++ Writing one 550x694 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.axi.jpg’
++ Writing one 694x490 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.sag.jpg’
++ Writing one 550x490 image to filter ‘/cubric/software/afni.versions/21.2.09/cjpeg -quality 95 > ./img00.cor.jpg’

AFNI QUITTs!

+* Removing temporary image directory ‘./__tmp_chauf_2sjmch3CY7E’.

[1] + Done Xvfb :527 -screen 0 1024x768x24

++ DONE (good exit)
see: ./img00*

+++ Arranging 3 images (each 550x694) into a 3x1 matrix.
+++ Transforming all input to rgb for a good reason
+++ Writing image to …/init_qc_02_inpaff_base.jpg
You can view image …/init_qc_02_inpaff_base.jpg with:
aiv …/init_qc_02_inpaff_base.jpg

+* Removing temporary workdir ‘QC/__workdir_olap_Cz0OKk26mCn*’

++ DONE! Image output:
QC/init_qc_02_inpaff_base

#++ auto_warp.py version: 0.06
– clearing AFNI_COMPRESSOR …

Output directory /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/

#Script is running (command trimmed):
mkdir ./awpy_center_aligned_T1_pshft/
cd /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/
#Script is running (command trimmed):
3dcopy /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/intermediate/center_aligned_T1_shft_aff.nii.gz ./anat.nii
++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
#Script is running (command trimmed):
3dUnifize -GM -input ./anat.nii -prefix ./anat.un.nii
++ 3dUnifize: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]

  • Pre-processing: ADVUWm
    ++ Output dataset ./anat.un.nii
    ++ ===== Elapsed = 17.7 sec
    #Script is running (command trimmed):
    3dcopy /cubric/collab/505_subiculum/Monkey_brains/D99_v2.0_dist/D99_template.nii.gz ./base.nii
    ++ 3dcopy: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
    #Script is running (command trimmed):
    3dAttribute DELTA ./anat.un.nii
    #Script is running (command trimmed):
    3dAttribute DELTA ./base.nii
    0.250000 0.250000
    #Script is running (command trimmed):
    3dinfo -same_grid ./anat.un.nii ./base.nii
    #++ Aligning /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/base.nii data to /cubric/collab/505_subiculum/Monkey_brains/data/derivatives/sub-06/anat/animal_warper/aw_results/awpy_center_aligned_T1_pshft/anat.un.nii data
    #Script is running (command trimmed):
    3dQwarp -prefix ./anat.un.qw.nii -blur -3 -3 -workhard:0:2 -iwarp
    -maxlev 09 -base ./base.nii -source ./anat.un.nii
    ++ OpenMP thread count = 4
    ++ 3dQwarp: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
    ++ Authored by: Zhark the (Hermite) Cubically Warped
    ** FATAL ERROR: 3dQwarp fails :: source image has 0 nonzero voxels (< 100)
    ** Program compile date = Sep 27 2021
    #**ERROR Failed in warping step
    ** ERROR - script failed
    3dcopy: No match.
    3dcopy: No match.

+++ Command Echo:
3dNwarpCat -warp1 center_aligned_T1_shft_WARP.nii.gz -warp2 intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D -prefix intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz

++ 3dNwarpCat: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warper
** ERROR: Can’t open dataset from file ‘center_aligned_T1_shft_WARP.nii.gz’
** ERROR: Failed to read 3D warp from ‘center_aligned_T1_shft_WARP.nii.gz’
** ERROR: Can’t compute nonlinear warp from string 'center_aligned_T1_shft_WARP.nii.gz intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D ’
** ERROR: EDIT_dset_items[1]: invalid input dataset
** ERROR: Cannot write dataset: it is invalid

Fatal Signal 11 (SIGSEGV) received
3dNwarpCat
Bottom of Debug Stack
** Command line was:
3dNwarpCat -warp1 center_aligned_T1_shft_WARP.nii.gz -warp2 intermediate/center_aligned_T1_shft_al2std_mat.aff12.1D -prefix intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz
** AFNI version = AFNI_21.2.09 Compile date = Sep 27 2021
** [[Precompiled binary linux_openmp_64: Sep 27 2021]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/c1639425/.afni.crashlog

+++ Command Echo:
3dNwarpCat -warp1 intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D -warp2 center_aligned_T1_shft_WARPINV.nii.gz -space NO-DSET -prefix intermediate/center_aligned_T1_shft_base2osh_WARP.nii.gz

++ 3dNwarpCat: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warper
** ERROR: Can’t open dataset from file ‘center_aligned_T1_shft_WARPINV.nii.gz’
** ERROR: Failed to read 3D warp from ‘center_aligned_T1_shft_WARPINV.nii.gz’
** ERROR: Can’t compute nonlinear warp from string 'intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D center_aligned_T1_shft_WARPINV.nii.gz ’

Fatal Signal 11 (SIGSEGV) received
3dNwarpCat
Bottom of Debug Stack
** Command line was:
3dNwarpCat -warp1 intermediate/center_aligned_T1_shft_inv_al2std_mat.aff12.1D -warp2 center_aligned_T1_shft_WARPINV.nii.gz -space NO-DSET -prefix intermediate/center_aligned_T1_shft_base2osh_WARP.nii.gz
** AFNI version = AFNI_21.2.09 Compile date = Sep 27 2021
** [[Precompiled binary linux_openmp_64: Sep 27 2021]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /home/c1639425/.afni.crashlog
++ 3dNwarpApply: AFNI version=AFNI_21.2.09 (Sep 27 2021) [64-bit]
++ Authored by: Zhark the Warped
++ opened source dataset ‘intermediate/center_aligned_T1_shft.nii.gz’
++ -master dataset is ‘/cubric/collab/505_subiculum/Monkey_brains/D99_v2.0_dist/D99_template.nii.gz’
++ Processing -nwarp ** ERROR: Can’t open dataset from file ‘intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz’
** ERROR: Can’t open 3D warp dataset ‘intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz’

** FATAL ERROR: Cannot process warp string 'intermediate/center_aligned_T1_shft_osh2base_WARP.nii.gz ’
** Program compile date = Sep 27 2021
** ERROR: program failed (3dNwarpApply, osh2base)

Hi, Sam-

Great, glad the IT was accommodating so quickly.

Thanks for sending those images—that helps show that the initial overlap is quite good, both initially and after the center-of-mass shift (perhaps some center-of-mass alignment had already even been done, esp. judging by the input filename? Fine.). Actually, that was the main thing that I thought might be going awry here. The tissue contrast+resolution of the input dataset also seems fine, so that shouldn’t be creating a problem for alignment.

It also appears that your anatomical was skullstripped already. That isn’t a problem, just something to note (@animal_warper itself would accomplish that, too).

I was going to ask to also see the init_qc_02*jpg that should be created—that shows the result of affine alignment. However, I can in the text about the image generation that underlay range is set to [0, 0], which means the dataset isn’t even in the FOV… which means that something bad happened in the affine alignment step.

And, interestingly, the date of your binary set’s compilation is Sept 27, 2021. That is somewhat old, but more importantly we introduced a (re)stabilizing change to a couple affine alignment cost functions in 3dAllineate on Sept 29, 2021, and I think that this is the kind of situation those changes would prevent.

So, the TL;DR now after you’ve read this far: I suspect if you update your AFNI binaries, you won’t have this trouble with the alignment. (A side benefit: I also made a change just recently so that @animal_warper should exit on the first failure it gets, rather than continuing on, to make debugging simpler.) On a standard system, you could just run:


@update.afni.binaries -d

… to accomplish this.

On your administered system, actually it would be good if the admins could more regularly update AFNI (say, once a quarter or twice a year, at a minimum?). But even if you are on an administered system, you can still install the binaries on to your local directory and put that location at the start of your path, and then you will be using that local version of the binaries—and you can update that whenever you want, because admin rights are needed for it. How does that sound? If that is appealing but you have questions about the mechanics of doing so, we can help with that, too.

–pt

Hello,

IT updated AFNI and now all is working as expected. Many thanks!

Sam

Hi, Sam-

Great to hear, and thanks for letting us know.

–pt