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  

|
Jim Bjork
September 24, 2009 09:37AM
Dear AFNI gurus,

Time to do some VOI analysis of trial-type-averaged signal (HRF responses) thru a VOI mask.

To do the VOI dumpouts of raw signal change, averaged over time, I would generate the trial-averaged 3d+time dataset thus:

1) Create a map file (.txt format), where the time series dataset would be coded at each volume based on the event type of interest, e.g.

A1
A2
A3
-
-
-
-
C1
C2
C3
-
-
B1
B2
B3
-
Etc….

2) Enter AFNI GUI, go to Define Datamode, then to “Plugins”
3) Select “Reorder”
4) Under the Input, I would select my 3d+time dataset of concatenated runs of the behavioral experiment
5) Under the output, I would enter my desired filename, e.g. “Trial-type-averaged”
6) Under Map File, I would enter the txt file that is my map file.
7) Under “Duplicates” pull-down menu, select “Average”
8) Click Run+Close to make the new, shorter 3d+time dataset consisting of three volumes per every letter-coded trial event type

Now, I need to do this about 120 times. This is because I need to dump out THREE outputs per subject with three mapfiles, where the subsequent mapfiles would be progressively delayed by three additional volumes, e.g.

-
-
-
A2
A2
A3
-
-
-
-
C1
C2
Etc.

This is because the timing of events in my task is jittered, and there is spillover of the HRF of one event type across the onset of another stimulus/event type, which would need its own unique coding. Doing the progressively-shifting map files can get around this, with the VOI maskave text outputs concatentated so that I end up with a whole HRF (where latter timepoints are contaminated with radomized jittered other trial events). It’s time consuming but it works.

I’d LOVE a script based method to do this! Like:

3dReorder –input timeseries123+tlrc –mapfile eventmapping.txt –average –prefix trialaveraged

This would be an immense time-saver! Is there such a thing? If not, could you program one? It shouldn’t be too hard for you guys.
Subject Author Posted

Is there a script-based method for reordering 3d+time datasets with a mapfile?

Jim Bjork September 24, 2009 09:37AM

Re: Is there a script-based method for reordering 3d+time datasets with a mapfile?

Daniel Glen September 24, 2009 05:04PM

Re: Is there a script-based method for reordering 3d+time datasets with a mapfile?

rick reynolds September 29, 2009 09:04AM