3dttest++: Argument list too long

Hi all,

I am trying to run a 3dttest, however, I keep getting the following error: 3dttest++: Argument list too long. How to I fix this issue? I am running the script on a Mac El Capitan with updated versions of R and AFNI (Sept 4th). An example of my script is below- However, instead of 2 subjects, I have 2,000.

3dttest++ -overwrite
-setA GroupA
000000022453 /Users/bfair/Documents/Im/Im_Task_Activations/Con_10_arc001/processed/spmstatsintra/000000022453/SessionB/EPI_short_MID/swea/con_0010.nii
000000075717 /Users/bfair/Documents/Im/Im_Task_Activations/Con_10_arc001/processed/spmstatsintra/000000075717/SessionB/EPI_short_MID/swea/con_0010.nii \

Best,
~BFair

Hi BFair,

What shell are you using, and is the script really
specific to that shell? It is possible that you
could try with with either bash or tcsh, if it is
generic, and maybe the other would work.

Alternatively, IF all of the datasets can be listed
with a single wildcard, even if there are 2 groups
and 2 wildcard listings, and IF you are not using
covariates (in which case, the subject IDs are not
needed in the command), the datasets could be listed
on the command line with quoted wildcards, as in:

3dttest++ -setA '/PATH_TO_DATA/spmstatsintra/*/SessionB/EPI_short_MID/swea/con_0010.nii' \
          -setB '/PATH_TO_DATA/spmstatsintra/*/SessionC/EPI_short_MID/swea/con_0010.nii' \
          ...

Is that an option?

  • rick

Hi BFair,

Bob just added an ability to 3dttest++ that should
alleviate this problem. Like perhaps 26 other
programs now, if the final argument to 3dttest++
is “-@”, then it will read the contents of a text
file as if it were provided on the command line.

So given your sample command in the post, you
should be able to do some thing like putting the
following in a text file, say 3dttest++.args.txt:

-setA GroupA 
000000022453 /Users/bfair/Documents/Im/Im_Task_Activations/Con_10_arc001/processed/spmstatsintra/000000022453/SessionB/EPI_short_MID/swea/con_0010.nii 
000000075717 /Users/bfair/Documents/Im/Im_Task_Activations/Con_10_arc001/processed/spmstatsintra/000000075717/SessionB/EPI_short_MID/swea/con_0010.nii 

(and note that there are no '' characters at the
ends of the lines in the text file), and then run
3dttest++ as follows:

3dttest++ -overwrite -@ < 3dttest++.args.txt

If you give that a try, please let us know how it goes.
For that to work, please use the now updated AFNI
binaries.

To repeat, that -@ option should be the last one
passed to the main program, as is done with this
example.

Thanks,

  • rick

Hi Rick,

I updated my binaries and Bob’s change seems to have fixed the problem. I am now problem-shooting some other errors, but I will let you know if I run into this argument error again.

Thank you for all of your help.

Best,
~BFair

Hi Rick,

I am not confident that the -@ fixed my problems on the previous script. And I am running into the same issue on a current 3dttest++ with 1,800 participants using a functional dataset. The script will only run on around 1,400 participants before I receive the error “argument list too long.” If I use -@, I receive an error reading “cannot load dataset.” The script runs OK if I split it into smaller groups and run it (eg. 1,000 and 800)–> it just doesn’t seem to handle all of my participants at one time. Any suggestions?

My binaries were updated 12/8/16 and I am using a Mac OS X El Capitan Version 10.11.6

Best,
~Brittany

I found the issue! Problem resolved and -@ does work on my larger datatset.

Best,
~B

1800 participants! What kind of study is that? I never designed or thought of 3dttest++ as working with so many datasets at once. I’m a little surprised it worked.