I am trying to extract my subjects’ beta values with 3dbucket so that I can use 3dmaskave to plot my regression. However, I am running into issues with my script. it is running, but returns ‘3dbucket: No match’ for each subject… I’ve double checked that the sub-brick used is correct. What might be causing the “no match”?
set datapath = /Volumes/NENS01/Sullivan/math_preproc
set subjects = (sub*)
foreach subj ( $subjects )
set output = /Volumes/NENS02/Sullivan/math_results
3dbucket -aglueto $output/mathrest_betas+tlrc.HEAD $subj/$subj.results/stats.sub-0??_REML+tlrc
thank you in advnace for your help!
The “no match” is a shell error (not an AFNI one) which means the shell is trying to match file names to your wildcard expression (one using *, ? or ). In this case, there is no file ending in +tlrc (meaning either 3 or 7).
In this case, you do not want the shell to treat  as a wildcard expression,
but rather want to pass that on to 3dbucket to extract that volume index. To do
so, put it in quotes (either single or double) to “hide” it from the shell.
3dbucket -aglueto $output/mathrest_betas+tlrc.HEAD "$subj/$subj.results/stats.sub-0??_REML+tlrc.HEAD"
But note that you can actually extract volume #37 from all subjects directly in
AFNI. This miiiight urge some caution, but consider the command (without a foreach loop, but still using quotes):
3dbucket -prefix $output/ALL_BETAS "sub*/sub*.results/stats.sub-0??_REML+tlrc.HEAD"
You could check that they produce the same output.
Also, note that instead of using 37, it might be possible to use the label, for example “…_REML+tlrc.HEAD[PICKLE_BETA#0_Coef]”
Note that I used .HEAD in wildcard examples. When using wildcards, it is generally required to use a complete file name, so that the shell can fully match the names. Does that seem reasonable?