3dClustSim script error


I am trying to run a 3dClustSim script with the -niml flag to get the clusterized table to adjust in AFNI.

My script is the following:
3dClustStim -mask MNI152_mask+tlrc -acf __ __ __ -LOTS -niml -both -prefix [filepath]/ClustSim/ClustSim_WholeBrain_ACF

The error that I am getting is attached. I also get a .cmd output file - the content of which is also attached.

I would greatly appreciate any suggestions.

Hi, Stephanie-

I wonder if your output file path doesn’t exist on your computer (e.g., has a typo). For example, is there a missing “/” before “home”? The error message implies that after computing everything, it can’t access the specified location for output.

For example, I tried running this code from the AFNI Bootcamp output directory of afni_proc.py “~/AFNI_data6/FT_analysis/FT.results”, where the output prefix includes a path that does not exist:

set acf_errts = `1dcat blur_est.FT.1D"{3}[0..2]"`

echo "++ The there ACF params for the errts are: ${acf_errts}"

3dClustSim                                   \
    -mask    mask_epi_anat.FT+tlrc.HEAD      \
    -acf     ${acf_errts}                    \
    -LOTS                                    \
    -niml -both                              \
    -prefix  doesnt_exist/test_csim

and got similar error output to yours:

NIML: fail to open file doesnt_exist/test_csim.NN3_bisided.niml for writing

But when I changed the output to a location that existed, I did not get that error.

What is the output of (I expect this gives an error):

\ls home/tzking/king_shared/fMRI_Analyses/Stephanie/AFNI_processing/ClustSim

vs the output of, say:

\ls /home/tzking/king_shared/fMRI_Analyses/Stephanie/AFNI_processing/ClustSim

? NB: I am only guessing at what the correct location might be. The top of the file tree should start with “/”.


ps: Just for future Message Board posts: copy+pasting terminal text would be more helpful than snapshotting images. For example, I hope I typed your example path correctly on my computer. It is also easier to read. Thanks.

That did it, thank you very much!