[pymvpa] Error from pymvpa2-prep-afni-surf
Beau R. Sievers
Beau.R.Sievers.GR at dartmouth.edu
Mon Oct 12 21:57:14 UTC 2015
Hello, PyMVPA users,
I am running into an error (two, really) when running pymvpa2-prep-afni-surf to align the surfaces from FreeSurfer’s recon-all to my already-aligned anatomical images. It appears pymvpa2-prep-afni-surf tries to run 3dSurf2Vol with a non-existant option, “-surf” instead of “-surf_1D”, but correcting this apparent bug results in another error: 3dSurf2Vol rejects __tt.1D with a “bad surf data file” error.
Detail follows, including the errors copied from the output logs:
Running: makesurfmasks
** Will execute the following commands:
** - cd /flash/wheatley/bouncing_ball_testing/pymvpa_afni_surf_output_kk
** - 1deval -1D: -num 163841 -expr 1 > __t.1D
** - 1dtranspose __t.1D > __tt.1D
**>> Starting now:
**<< ... completed execution
** Will execute the following commands:
** - cd /flash/wheatley/bouncing_ball_testing/pymvpa_afni_surf_output_kk
** - 3dSurf2Vol -map_func mask2 -data_expr "a*2" -spec lh_ico128_al.spec -surf_A smoothwm -sv anat_final_kk_ss+orig -grid_parent anat_final_kk_ss+orig. -prefix __m2_lh -sdata __tt.1D -overwrite
**>> Starting now:
Traceback (most recent call last):
File "/afs/dbic.dartmouth.edu/usr/local/common/bin/pymvpa2-prep-afni-surf", line 25, in <module>
run_prep_afni_surf(vars(d))
File "/afs/dbic.dartmouth.edu/usr/pkg/python/python_v2.7/@sys/lib/python2.7/site-packages/mvpa2/support/afni/lib_prep_afni_surf.py", line 1208, in run_prep_afni_surf
run_all(config, environment)
File "/afs/dbic.dartmouth.edu/usr/pkg/python/python_v2.7/@sys/lib/python2.7/site-packages/mvpa2/support/afni/lib_prep_afni_surf.py", line 1116, in run_all
step2func[step](config, env)
File "/afs/dbic.dartmouth.edu/usr/pkg/python/python_v2.7/@sys/lib/python2.7/site-packages/mvpa2/support/afni/lib_prep_afni_surf.py", line 964, in run_makesurfmasks
utils.run_cmds('cd %s;%s' % (refdir, cmd))
File "/afs/dbic.dartmouth.edu/usr/pkg/python/python_v2.7/@sys/lib/python2.7/site-packages/mvpa2/support/afni/afni_utils.py", line 116, in run_cmds
subprocess.check_call(cmd, env=env, shell=True)
File "/afs/dbic.dartmouth.edu/usr/pkg/python/python_v2.7/@sys/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cd /flash/wheatley/bouncing_ball_testing/pymvpa_afni_surf_output_kk;3dSurf2Vol -map_func mask2 -data_expr "a*2" -spec lh_ico128_al.spec -surf_A smoothwm -sv anat_final_kk_ss+orig -grid_parent anat_final_kk_ss+orig. -prefix __m2_lh -sdata __tt.1D -overwrite' returned non-zero exit status 255
Running the 3dSurf2Vol command to determine the reason for failure gives this exit message error:
> 3dSurf2Vol -map_func mask2 -data_expr "a*2" -spec lh_ico128_al.spec -surf_A smoothwm -sv anat_final_kk_ss+orig -grid_parent anat_final_kk_ss+orig. -prefix __m2_lh -sdata __tt.1D -overwrite
invalid option <-sdata>
usage: 3dSurf2Vol [options] -spec SPEC_FILE -surf_A SURF_NAME \
-grid_parent AFNI_DSET -sv SURF_VOL \
-map_func MAP_FUNC -prefix OUTPUT_DSET
usage: 3dSurf2Vol -help
I created a new version of the pymvpa2-prep-afni-surf script that corrects this error, by changing “-sdata” to “-sdata_1D", but running this resulted in another set of errors:
Running: makesurfmasks
** Will execute the following commands:
** - cd /flash/wheatley/bouncing_ball_testing/pymvpa_afni_surf_output_kk
** - 1deval -1D: -num 163841 -expr 1 > __t.1D
** - 1dtranspose __t.1D > __tt.1D
**>> Starting now:
**<< ... completed execution
** Will execute the following commands:
** - cd /flash/wheatley/bouncing_ball_testing/pymvpa_afni_surf_output_kk
** - 3dSurf2Vol -map_func mask2 -data_expr "a*2" -spec lh_ico128_al.spec -surf_A smoothwm -sv anat_final_kk_ss+orig -grid_parent anat_final_kk_ss+orig. -prefix __m2_lh -sdata_1D __tt.1D -overwrite
**>> Starting now:
Traceback (most recent call last):
File "/afs/dbic.dartmouth.edu/usr/wheatley/beau/bouncing_ball_pipeline/pymvpa2-prep-afni-surf-fixed", line 25, in <module>
run_prep_afni_surf(vars(d))
File "/afs/dbic.dartmouth.edu/usr/wheatley/beau/bouncing_ball_pipeline/lib_prep_afni_surf_fixed.py", line 1186, in run_prep_afni_surf
run_all(config, environment)
File "/afs/dbic.dartmouth.edu/usr/wheatley/beau/bouncing_ball_pipeline/lib_prep_afni_surf_fixed.py", line 1097, in run_all
step2func[step](config, env)
File "/afs/dbic.dartmouth.edu/usr/wheatley/beau/bouncing_ball_pipeline/lib_prep_afni_surf_fixed.py", line 945, in run_makesurfmasks
utils.run_cmds('cd %s;%s' % (refdir, cmd))
File "/afs/dbic.dartmouth.edu/usr/pkg/python/python_v2.7/@sys/lib/python2.7/site-packages/mvpa2/support/afni/afni_utils.py", line 116, in run_cmds
subprocess.check_call(cmd, env=env, shell=True)
File "/afs/dbic.dartmouth.edu/usr/pkg/python/python_v2.7/@sys/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'cd /flash/wheatley/bouncing_ball_testing/pymvpa_afni_surf_output_kk;3dSurf2Vol -map_func mask2 -data_expr "a*2" -spec lh_ico128_al.spec -surf_A smoothwm -sv anat_final_kk_ss+orig -grid_parent anat_final_kk_ss+orig. -prefix __m2_lh -sdata_1D __tt.1D -overwrite' returned non-zero exit status 253
Now running the 3dSurf2Vol command manually to determine the problem gives this exit message:
> 3dSurf2Vol -map_func mask2 -data_expr "a*2" -spec lh_ico128_al.spec -surf_A smoothwm -sv anat_final_kk_ss+orig -grid_parent anat_final_kk_ss+orig. -prefix __m2_lh -sdata_1D __tt.1D -overwrite
** bad (163842 x 1) surf data 1D file '__tt.1D'
And now I’m in over my head. Any ideas about what the underlying issue might be?
Thanks!
Beau Sievers
More information about the Pkg-ExpPsy-PyMVPA
mailing list