@chauffeur_afni wouldn't take -clusterize as input

Hello folks,

I am using AFNI version 20.3.02 ‘Vespasian’ from Nov 12 2020

I am trying to automatize image generation following the processing of my data, but I cannot use the example in AFNI with @chauffeur_afni :

set opref = QC/ca007a_Vrel

@chauffeur_afni                                                       \
    -ulay              strip+orig.HEAD                                \
    -box_focus_slices  AMASK_FOCUS_ULAY                               \
    -olay              func_slim+orig.HEAD                            \
    -cbar              Reds_and_Blues_Inv                             \
    -ulay_range        0% 130%                                        \
    -func_range        3                                              \
    -set_subbricks     -1 "Vrel#0_Coef"  "Vrel#0_Tstat"               \
    -clusterize        "-NN 1 -clust_nvox 200"                        \
    -thr_olay_p2stat   0.001                                          \
    -thr_olay_pside    bisided                                        \
    -olay_alpha        Yes                                            \
    -olay_boxed        Yes                                            \
    -opacity           5                                              \
    -prefix            ${opref}                                       \
    -set_xhairs        OFF                                            \
    -montx 3 -monty 3                                                 \
    -label_mode 1 -label_size 4

I get the following error : ** unexpected option #18 = ‘clusterize’

I tried to change the order of the options, which didn’t help.

Have you got any advice ?

Howdy-

It looks like your version of AFNI (from Nov, 202) predates the inclusion of that option, which was added in Sept, 2021. And some further updates to improve the clusterizing there were added in Sept, 2022. (Apparently, these options are highly correlated with Northern Hemisphere autumn.)

Anyways, updating your local version of AFNI should sort that out.

–pt

1 Like

Thanks for your reply.

I think AFNI teams organises automn hackaton. THis might be why.

Is it safe to update AFNI when you have several scripts of few hundred lines ?

Ha, that might explain the timing of the optionizing, indeed.

Re. updating scripts:
Yes, that should be safe. We generally recommend that people script all their processing (e.g., setting up afni_proc.py commands, etc.) so that they can update their code base and still use them easily. We strongly try to maintain compatability over time, and we also add features/options/programs over time (and, of course, code fixes, too). For example, if you are using afni_proc.py, you will notice a lot more features in the quality control (APQC) HTML, like interactive buttons and automatic notes-saving, easy-run InstaCorr and more.

If something does go awry, please do ping, but we often recommend that users update their code every six months or so, to get new features.

–pt

okay, i’ll trust the afni teams.

I just had so many problems with Python, I’m update-phobic now

Thanks

Indeed, Python has a lot of quirks with compatability across versions. Sigh.

I’ll note that for having Python and necessary modules on my own systems, I like using conda/miniconda, and we have notes for using this (including recipes for AFNI, which can be expanded pretty easily further) in the AFNI docs:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/miniconda.html
I like conda environments in particular because if something goes wrong with one, it can be purged—it is well-sandboxed. I also like that the recipes in *yml files can be propagated easily across computers or reinstalls, as well as shared with others, and permuted/added to.

–pt

1 Like