AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
February 03, 2015 10:57AM
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:
  1. Combine all the datasets into one big one
    3dTcat -prefix AllOfThem Stats*+tlrc.HEAD
  2. 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.
Subject Author Posted

3dttest++ rankize

kkerr February 02, 2015 01:38PM

Re: 3dttest++ rankize

Emperor Zhark February 02, 2015 02:48PM

Re: 3dttest++ rankize

kkerr February 02, 2015 02:56PM

Re: 3dttest++ rankize

Emperor Zhark February 03, 2015 10:57AM

Re: 3dttest++ rankize

kkerr February 03, 2015 11:20AM