Include 3T18yoSchwartzReactN32 in Docker
psadil opened this issue · 2 comments
psadil commented
Describe the bug
When Talairach registration fails a QA check, FreeSurfer will attempt to retry the registration with target=3T18yoSchwartzReactN32_as_orig
. To allow for this, fMRIPrep includes that atlas. But sMRIPrep does not.
Exact command line executed
singularity run \
-e \
--bind ${base}:/ds \
--bind $MYSCRATCH:/scratch \
code/smriprep_0.12.1.sif \
--nprocs 16 \
--omp-nthreads 8 \
--mem-gb 24 \
--output-spaces T1w MNI152NLin2009cAsym \
--fs-license-file /ds/code/license \
-w /scratch/work \
--no-submm-recon \
/ds/inputs/rawdata /ds/derivatives/smriprep participant
Are you positive that the input dataset is BIDS-compliant?
- I have used the online BIDS-Validator
- I have run a local installation of the BIDS-Validator (please, note the version of the validator here).
- I let sMRIPrep check it for me (in other words, I didn't set the
--skip-bids-validation
argument). - No, I haven't checked myself AND used the
--skip-bids-validation
argument.
sMRIPrep feedback information
crash log for example participant
Node: smriprep_wf.single_subject_SCN9747_wf.anat_preproc_wf.surface_recon_wf.autorecon1
Working directory: /scratch/work/smriprep_wf/single_subject_SCN9747_wf/anat_preproc_wf/surface_recon_wf/autorecon1
Node inputs:
FLAIR_file = <undefined>
T1_files = <undefined>
T2_file = <undefined>
args = <undefined>
big_ventricles = <undefined>
brainstem = <undefined>
directive = autorecon1
environ = {}
expert = <undefined>
flags = <undefined>
hemi = <undefined>
hippocampal_subfields_T1 = <undefined>
hippocampal_subfields_T2 = <undefined>
hires = <undefined>
mprage = <undefined>
mri_aparc2aseg = <undefined>
mri_ca_label = <undefined>
mri_ca_normalize = <undefined>
mri_ca_register = <undefined>
mri_edit_wm_with_aseg = <undefined>
mri_em_register = <undefined>
mri_fill = <undefined>
mri_mask = <undefined>
mri_normalize = <undefined>
mri_pretess = <undefined>
mri_remove_neck = <undefined>
mri_segment = <undefined>
mri_segstats = <undefined>
mri_tessellate = <undefined>
mri_watershed = <undefined>
mris_anatomical_stats = <undefined>
mris_ca_label = <undefined>
mris_fix_topology = <undefined>
mris_inflate = <undefined>
mris_make_surfaces = <undefined>
mris_register = <undefined>
mris_smooth = <undefined>
mris_sphere = <undefined>
mris_surf2vol = <undefined>
mrisp_paint = <undefined>
openmp = 8
parallel = <undefined>
steps = <undefined>
subject_id = recon_all
subjects_dir = <undefined>
talairach = <undefined>
use_FLAIR = <undefined>
use_T2 = <undefined>
xopts = <undefined>
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
result["result"] = node.run(updatehash=updatehash)
File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
result = self._run_interface(execute=True)
File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
return self._run_command(execute)
File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node autorecon1.
Cmdline:
recon-all -autorecon1 -i /scratch/work/smriprep_wf/single_subject_SCN9747_wf/anat_preproc_wf/anat_validate/sub-SCN9747_ses-phase1pretx_T1w_noise_corrected_valid.nii.gz -noskullstrip -noT2pial -noFLAIRpial -openmp 8 -subjid sub-SCN9747 -sd /ds/derivatives/smriprep/freesurfer
Stdout:
fs-check-version --s sub-SCN9747 --o /tmp/tmp.1HXzfW
Wed Aug 16 01:58:26 EDT 2023
setenv SUBJECTS_DIR /ds/derivatives/smriprep/freesurfer
cd /scratch/work/smriprep_wf/single_subject_SCN9747_wf/anat_preproc_wf/surface_recon_wf/autorecon1
/opt/freesurfer/bin/fs-check-version --s sub-SCN9747 --o /tmp/tmp.1HXzfW
-rwxrwxr-x 1 root root 18565 Aug 4 2022 /opt/freesurfer/bin/fs-check-version
freesurfer-linux-ubuntu22_x86_64-7.3.2-20220804-6354275
$Id$
Linux compute-110.cm.cluster 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
pid 32078
Current FS Version freesurfer-linux-ubuntu22_x86_64-7.3.2-20220804-6354275
Subject does not have a bstampfile, copying /opt/freesurfer/build-stamp.txt
Subject FS Version: freesurfer-linux-ubuntu22_x86_64-7.3.2-20220804-6354275
No constraints on version because REQ=UnSet and FsVerFile=NotThere
#@#% fs-check-version match = 1
fs-check-version Done
INFO: SUBJECTS_DIR is /ds/derivatives/smriprep/freesurfer
Actual FREESURFER_HOME /opt/freesurfer
Linux compute-110.cm.cluster 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
/ds/derivatives/smriprep/freesurfer/sub-SCN9747
mri_convert /scratch/work/smriprep_wf/single_subject_SCN9747_wf/anat_preproc_wf/anat_validate/sub-SCN9747_ses-phase1pretx_T1w_noise_corrected_valid.nii.gz /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig/001.mgz
mri_convert /scratch/work/smriprep_wf/single_subject_SCN9747_wf/anat_preproc_wf/anat_validate/sub-SCN9747_ses-phase1pretx_T1w_noise_corrected_valid.nii.gz /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig/001.mgz
reading from /scratch/work/smriprep_wf/single_subject_SCN9747_wf/anat_preproc_wf/anat_validate/sub-SCN9747_ses-phase1pretx_T1w_noise_corrected_valid.nii.gz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (1, 0, 0)
j_ras = (0, 1, 0)
k_ras = (0, 0, 1)
writing to /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig/001.mgz...
#--------------------------------------------
#@# MotionCor Wed Aug 16 01:58:28 EDT 2023
Found 1 runs
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig/001.mgz
Checking for (invalid) multi-frame inputs...
Only one run found so motion
correction will not be performed. I'll
copy the run to rawavg and continue.
cp /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig/001.mgz /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/rawavg.mgz
mri_info /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/rawavg.mgz
rawavg.mgz ========================================
Volume information for /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/rawavg.mgz
type: MGH
dimensions: 224 x 224 x 150
voxel sizes: 0.946000, 0.946000, 1.000000
type: FLOAT (3)
fov: 211.904
dof: 1
xstart: -106.0, xend: 106.0
ystart: -106.0, yend: 106.0
zstart: -75.0, zend: 75.0
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
nframes: 1
PhEncDir: UNKNOWN
FieldStrength: 0.000000
ras xform present
xform info: x_r = 1.0000, y_r = 0.0000, z_r = 0.0000, c_r = 105.9520
: x_a = 0.0000, y_a = 1.0000, z_a = 0.0000, c_a = 105.9520
: x_s = 0.0000, y_s = 0.0000, z_s = 1.0000, c_s = 75.0000
talairach xfm :
Orientation : RAS
Primary Slice Direction: axial
voxel to ras transform:
0.9460 0.0000 0.0000 0.0000
0.0000 0.9460 0.0000 0.0000
0.0000 0.0000 1.0000 0.0000
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant 0.894916
ras to voxel transform:
1.0571 0.0000 0.0000 0.0000
0.0000 1.0571 0.0000 0.0000
0.0000 0.0000 1.0000 0.0000
0.0000 0.0000 0.0000 1.0000
/ds/derivatives/smriprep/freesurfer/sub-SCN9747
mri_convert /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/rawavg.mgz /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig.mgz --conform
mri_convert /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/rawavg.mgz /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig.mgz --conform
reading from /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/rawavg.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (1, 0, 0)
j_ras = (0, 1, 0)
k_ras = (0, 0, 1)
changing data type from float to uchar (noscale = 0)...
MRIchangeType: Building histogram -1.64746 800745 1000, flo=0, fhi=0.999, dest_type=0
Reslicing using trilinear interpolation
writing to /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig.mgz...
mri_add_xform_to_header -c /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/transforms/talairach.xfm /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig.mgz /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig.mgz
INFO: extension is mgz
mri_info /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig.mgz
orig.mgz ========================================
Volume information for /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/orig.mgz
type: MGH
dimensions: 256 x 256 x 256
voxel sizes: 1.000000, 1.000000, 1.000000
type: UCHAR (0)
fov: 256.000
dof: 1
xstart: -128.0, xend: 128.0
ystart: -128.0, yend: 128.0
zstart: -128.0, zend: 128.0
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
nframes: 1
PhEncDir: UNKNOWN
FieldStrength: 0.000000
ras xform present
xform info: x_r = -1.0000, y_r = 0.0000, z_r = 0.0000, c_r = 105.9520
: x_a = 0.0000, y_a = 0.0000, z_a = 1.0000, c_a = 105.9520
: x_s = 0.0000, y_s = -1.0000, z_s = 0.0000, c_s = 75.0000
talairach xfm : /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/transforms/talairach.xfm
Orientation : LIA
Primary Slice Direction: coronal
voxel to ras transform:
-1.0000 0.0000 0.0000 233.9520
0.0000 0.0000 1.0000 -22.0480
0.0000 -1.0000 0.0000 203.0000
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform:
-1.0000 -0.0000 -0.0000 233.9520
-0.0000 -0.0000 -1.0000 203.0000
-0.0000 1.0000 -0.0000 22.0480
-0.0000 -0.0000 -0.0000 1.0000
#--------------------------------------------
#@# Talairach Wed Aug 16 01:58:36 EDT 2023
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
mri_nu_correct.mni --no-rescale --i orig.mgz --o orig_nu.mgz --ants-n4 --n 1 --proto-iters 1000 --distance 50
/usr/bin/bc
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
/opt/freesurfer/bin/mri_nu_correct.mni
--no-rescale --i orig.mgz --o orig_nu.mgz --ants-n4 --n 1 --proto-iters 1000 --distance 50
nIters 1
mri_nu_correct.mni 7.3.2
Linux compute-110.cm.cluster 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Wed Aug 16 01:58:36 EDT 2023
tmpdir is ./tmp.mri_nu_correct.mni.32430
cd /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
AntsN4BiasFieldCorrectionFs -i orig.mgz -o ./tmp.mri_nu_correct.mni.32430/nu0.mgz --dtype uchar
AntsN4BiasFieldCorrectionFs done
mri_convert ./tmp.mri_nu_correct.mni.32430/nu0.mgz orig_nu.mgz --like orig.mgz --conform
mri_convert ./tmp.mri_nu_correct.mni.32430/nu0.mgz orig_nu.mgz --like orig.mgz --conform
reading from ./tmp.mri_nu_correct.mni.32430/nu0.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
INFO: transform src into the like-volume: orig.mgz
writing to orig_nu.mgz...
Wed Aug 16 02:02:16 EDT 2023
mri_nu_correct.mni done
talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm
talairach_avi log file is transforms/talairach_avi.log...
mv -f /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/talsrcimg_to_711-2C_as_mni_average_305_t4_vox2vox.txt /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/transforms/talsrcimg_to_711-2C_as_mni_average_305_t4_vox2vox.txt
Started at Wed Aug 16 02:02:17 EDT 2023
Ended at Wed Aug 16 02:02:39 EDT 2023
talairach_avi done
cp transforms/talairach.auto.xfm transforms/talairach.xfm
lta_convert --src orig.mgz --trg /opt/freesurfer/average/mni305.cor.mgz --inxfm transforms/talairach.xfm --outlta transforms/talairach.xfm.lta --subject fsaverage --ltavox2vox
7.3.2
--src: orig.mgz src image (geometry).
--trg: /opt/freesurfer/average/mni305.cor.mgz trg image (geometry).
--inmni: transforms/talairach.xfm input MNI/XFM transform.
--outlta: transforms/talairach.xfm.lta output LTA.
--s: fsaverage subject name
--ltavox2vox: output LTA as VOX_TO_VOX transform.
LTA read, type : 1
0.99308 -0.04203 -0.01786 -99.60434;
-0.02070 1.01954 0.34062 -143.46477;
0.00457 -0.31989 1.04014 -40.56763;
0.00000 0.00000 0.00000 1.00000;
setting subject to fsaverage
Writing LTA to file transforms/talairach.xfm.lta...
lta_convert successful.
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/transforms /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
#--------------------------------------------
#@# Talairach Failure Detection Wed Aug 16 02:02:41 EDT 2023
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
talairach_afd -T 0.005 -xfm transforms/talairach.xfm
talairach_afd: Talairach Transform: transforms/talairach.xfm OK (p=0.6574, pval=0.3663 >= threshold=0.0050)
awk -f /opt/freesurfer/bin/extract_talairach_avi_QA.awk /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/transforms/talairach_avi.log
tal_QC_AZS /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri/transforms/talairach_avi.log
TalAviQA: 0.92288
z-score: -12
WARNING: Talairach QA check failed!
z-score of -12 is <= threshold of -9
Manual Talairach alignment may be necessary, or
include the -notal-check flag to skip this test,
making sure the -notal-check flag follows -all
or -autorecon1 in the command string.
See:
http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/Talairach
INFO: Retrying Talairach align using 3T-based atlas...
#--------------------------------------------
#@# Talairach Wed Aug 16 02:02:41 EDT 2023
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
mri_nu_correct.mni --no-rescale --i orig.mgz --o orig_nu.mgz --ants-n4 --n 1 --proto-iters 1000 --distance 50
/usr/bin/bc
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
/opt/freesurfer/bin/mri_nu_correct.mni
--no-rescale --i orig.mgz --o orig_nu.mgz --ants-n4 --n 1 --proto-iters 1000 --distance 50
nIters 1
mri_nu_correct.mni 7.3.2
Linux compute-110.cm.cluster 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Wed Aug 16 02:02:41 EDT 2023
tmpdir is ./tmp.mri_nu_correct.mni.1135
cd /ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
AntsN4BiasFieldCorrectionFs -i orig.mgz -o ./tmp.mri_nu_correct.mni.1135/nu0.mgz --dtype uchar
AntsN4BiasFieldCorrectionFs done
mri_convert ./tmp.mri_nu_correct.mni.1135/nu0.mgz orig_nu.mgz --like orig.mgz --conform
mri_convert ./tmp.mri_nu_correct.mni.1135/nu0.mgz orig_nu.mgz --like orig.mgz --conform
reading from ./tmp.mri_nu_correct.mni.1135/nu0.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
INFO: transform src into the like-volume: orig.mgz
writing to orig_nu.mgz...
Wed Aug 16 02:06:15 EDT 2023
mri_nu_correct.mni done
talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig
talairach_avi log file is transforms/talairach_avi.log...
ERROR: mpr2mni305 failed, see transforms/talairach_avi.log
Linux compute-110.cm.cluster 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s sub-SCN9747 exited with ERRORS at Wed Aug 16 02:06:15 EDT 2023
For more details, see the log file /ds/derivatives/smriprep/freesurfer/sub-SCN9747/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Stderr:
Traceback:
RuntimeError: subprocess exited with code 1.
With relevant log from FreeSurfer
$ cat derivatives/smriprep/freesurfer/sub-SCN9747/mri/transforms/talairach_avi.log
/ds/derivatives/smriprep/freesurfer/sub-SCN9747/mri
/opt/freesurfer/bin/talairach_avi
--i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig
talairach_avi 7.3.2
Linux compute-110.cm.cluster 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Wed Aug 16 02:06:15 EDT 2023
mri_convert orig_nu.mgz talsrcimg.img
reading from orig_nu.mgz...
TR=0.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
writing to talsrcimg.img...
Analyze Output Matrix
-1.00000 0.00000 0.00000 234.95200;
0.00000 0.00000 1.00000 -23.04800;
0.00000 -1.00000 0.00000 204.00000;
0.00000 0.00000 0.00000 1.00000;
--------------------
INFO: set hdr.hist.orient to -1
mpr2mni305 talsrcimg
Wed Aug 16 02:06:15 EDT 2023
/opt/freesurfer/bin/mpr2mni305 talsrcimg
mpr2mni305 7.3.2
target=3T18yoSchwartzReactN32_as_orig
ERROR: /opt/freesurfer/average/3T18yoSchwartzReactN32_as_orig.4dfp.img does not exist!
Visual reports of sMRIPrep
Not Applicable
Installation type (please complete the following information):
- "Bare-metal"
- Singularity
- Docker
Additional context
I'm working with a dataset that I expect to have difficulties with registration (the dataset comprises participants that have lesions).
effigies commented
Good catch. Would you be up for submitting a PR?
psadil commented
Will do