information is very old...most machines where this stuff were
installed are gone...still, it is a lot of information, so I'd hate
to just delete it when it might be useful to someone, somewhere.
Dianne Patterson 10/25/2006
mkmgh script (available in Local
Resources) creates all of the directory structure and files
that the mgh (and freesurfer) expect. Below is a usage message,
sample command and list of what mkmgh creates. Make sure you run
mkmgh from inside your parent subject directory (e.g., /data/video).
See the main mgh page for more information.
Utility to setup MGH directories
Run this script from inside your parent subject directory.
mkmgh args subjectdirs...
-nr num =number of runs
-ns num =number of slices
-ntr num =number of TRs
-tr num =length of TRs
-z num =slice thickness
-p path =path to the talairach directory (optional)
-v =set verbose mode (optional)
mkmgh -nr 3 -ns 17 -ntr 250 -tr 2.5 -z 5 -v e22000 e23456
In your parent subject directory (e.g., /data/video), the script
creates a file called "sessidfile". The sessidfile includes
the name of each primary subject directory, e.g.,
The mgh programs use the sessidfile to determine what data they
should operate on, so you need only list the directories you want
preprocessed and analyzed, not necessarily all the directories
you have in the parent area.
Link: The mkmgh script creates a link from your parent subject
directory (e.g., /data/video) to the main freesurfer talairach
directory. You only have to set up a link once when you set up
your parent subject directory. cd to your parent subjects directory
and type the following on charlie (substitute the correct path
if you are on a different machine):
->ln -s /data/freesurfer_alpha/subjects/talairach talairach
link "talairach" will
appear in your parent subject directory.
directories: Under the parent subject directory, you will
have 2 main directories for each subject:
-a primary one for raw and functional files (e.g., /data/video/e25996)
-a secondary one for anatomical (COR) files, (e.g., /data/video/e25996_anat).
contains a huge number of subdirectories that freesurfer expects.
We create those directories (following the mksubjdirs script distributed
with the mgh tools) in case users might later use to manipulate
their brains in freesurfer.
file: In the primary subject directory, you need a file called
"subjectname" that contains one line naming the directory
where the COR files will be stored. e.g., In /data/video/e25996
create the file subjectname which contains one line, e.g.,
You will need one such subjectname file for each primary subject
directory. Modify the line in the subjectname file appropriately.
directory: In addition to the subjectname file, you should
have a bold directory in each primary subject directory (e.g.,
/data/video/e25996/bold). You are free to have other directories
file: Create seq.info in each bold directory (mkmgh will set
ntrs, TR and nslcs based on the input you provide at the command
also in the bold directory with appropriate header info and unity
(Slice thickness, 4.5 in the example below, is set to the value
you provide mkmgh at the command line):
1.000000 0.000000 0.000000 0.000000
0.000000 1.000000 0.000000 0.000000
0.000000 0.000000 1.000000 0.000000
0.000000 0.000000 0.000000 1.000000
In each bold directory, create numbered directories for each run
(e.g., 001, 002, 003 etc.) for
that subject (mkmgh will create as many of these as you tell it
to (nr, number of runs).
Within each run directory (e.g., 001, 002) of the bold directory
you need to create f.bhdr file, which should look like this
(mkmgh will set nslices, and slice_thick to the values you provide
at the command line):