I would like to fit a separate GLM on each scanning run of my experiment. But my stimtime files have all runs concatenated (one run per line, as tradition). Is there a way to build a GLM on each run separately, without generating new stimtime files? That is, is there a way to specify, within the 3dDeconvolve command, the line (run) from which to read stimtime files? (Or some other convenient trick?)
The most convenient way that comes to mind is to simply script the action of breaking the stim times files into one per run. In such a case, the now empty runs would have asterisks there (one, or maybe two, to be safe).
For example, this one file:
10 20 30 40 50
11 21 31 41 51
12 22 32 42 52
might change into these 3 files:
10 20 30 40 50
* *
* *
* *
11 21 31 41 51
* *
* *
* *
12 22 32 42 52
That shouldn’t be too hard to script. Note that there are multiple ways to extract a specific row from a text file, such as getting row 3 from stim.txt:
awk 'NR == 3 {print}' stim.txt
or
column_cat -line 3 stim.txt
rick
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.