Well, it is possible to do at least part of what you want with a combination of AFNI programs, provided you understand what you are doing with each piece. We certainly let you put together the pieces-parts of AFNI in any way you like, but of course you are responsible (like MacGyver) for making it useful and correct. In particular, this means reading and understanding the '-help' output for each program being used.
To turn a collection of datasets into ranks, you can do the following:
- Combine all the datasets into one big one
3dTcat -prefix AllOfThem Stats*+tlrc.HEAD - Turn that dataset into ranks at each voxel
3dTsort -rank -prefix AllRanks AllOfThem+tlrc.HEAD
I would recommend looking at the results to make sure they are correct!
To use -covariates in 3dttest++, you have to break the AllRanks dataset back into individual datasets, so their names can be used as labels in the covariates table. We don't actually have a single program for that operation, since it doesn't arise much. You can do it with a csh loop, as in
set nbrik = `3dnvals AllRanks+tlrc.HEAD`
@ ntop = $nbrik - 1
foreach nnn ( `count -dig 3 0 $ntop` )
3dcalc -a AllRanks+tlrc.HEAD"[$nnn]" -expr a -prefix Ranked${nnn}
end
Note the use of the different quote operators: ` = backward single quote, and " = double quote. These are critically different!
The results of this little loop should be datasets named Ranked000+tlrc, Ranked001+tlrc, etc. You can use these as inputs to 3dttest++
Of course, you'll have to change the names in the above to something perhaps more meaningful to you. And if you have 2 groups of subjects, then you obviously need distinct naming schemes for the files for each group, such as ControlRanked000 and PatientRanked000 (etc.).
It's a little work, and requires some assembly (like Ikea, but with the shell rather than cute little wrench). I hope this is enough to do it properly. Please make sure you understand the steps before hooking up the detonator -- I mean, before running the shell script that you will create.