FUNC:Scripts

From Center for Cognitive Neuroscience
Revision as of 00:51, 19 February 2016 by Mmonti (talk | contribs) (Created page with "== setup_subject == To import data from dicom servers at brainmpapping using setup_subject: Use the command '''setup_subject''' followed by this info: -b (base directory) -g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

setup_subject

To import data from dicom servers at brainmpapping using setup_subject:

Use the command setup_subject followed by this info: -b (base directory) -g (group, lieberman) -s (subject code) -u (user, lieber) -n or -r (convention, radiologic or neurologic) -I /Volumes/BMC5/dicom2 (this is new for importing data from the Trio- and note that it is uppercase I, not lowercase L!).

For example, if your study is called 'examplestudy'and you are importing data for subject1:

setup_subject -b /space/raid6/data/lieber/examplestudy -g lieberman -s subject1 -u lieber -r -I /Volumes/BMC5/dicom2

A note about convention: radiologists use R=L, neurologists use R=R. In SPM, though, it automatically flips it, so if you want the final data to be neurologic (R=R), you need to import using radiologic.

When prompted for a password enter Matt's brainmapping password.

setup_subject_nifti

Imports data from dicom servers at the brainmapping center, but makes the files into nifti files. Nifti files are nice because you don't need to worry about image/header pairs (like you do with ANALYZE files imported by the original setup_subject (above)). setup_subject_nifti also cleans up the folder and file names in a nice way. Setup a subject each way and you'll see!

Use the command 'setup_subject_nifti' followed by: Required arguments:

 -b base_dir: the project directory in which the subject's
              dir will be created
              (this MUST be an absolute path, i.e., starting with /)
 -g group:    the name of the group under which the scan was performed
              (this MUST be in lowercase, and must also match the
              account name under which the data are stored on DNS0)
 -s subject:  the subject code that was entered when scanning

Optional arguments: [general flags]:

 -t:          run in test mode - don't execute commands

[processing operations]:

 -c:          run MCLFIRT motion correction on 4D image
 -m:          run MELODIC ICA on motion-corrected 4D image
 -x:          run BET on the motion-corrected 4D data
 -w:          Preprocess MP-RAGE (align, BET, and bias correction)
 -D:          Run raw data diagnostics
 -z:          name of file specifying definitions for MCFLIRT_ARGS and MELODIC_ARGS
 -h:          unwarp allegra MP-RAGE using MGH code (for Allegra 3T only)

[debabeler options]:

 -d:          skip debabeling
 -j:          location of debabeler .jar file

[data input options]:

 -u username  specify a username for dns0 account (defaults to group name)
 -y:          read data from dicom backup (for data collected prior to 9/17/05)

[file output options]:

 -k:          don't automatically delete DICOM data after conversion
 -3:          Keep 3D data after 4D conversion
 -f:          don't fix raw directory names (leave extra numbers)
 -e:          skip downloading of data from dns0 (assumes existing data)
 -a:          tag to denote BOLD directories (defaults to BOLD)
 -q           skip entry of DICOM info into database
 -I           specify a dicom server directory

[grid options]:

 -G           submit compute tasks to the Grid (default)
 -L           run Locally (do not submit compute tasks to the Grid)

see www.func.ucla.edu for more info


For example, if your study is called 'examplestudy' and you are importing data for subject1 and also want to keep the dicom files (the raw files that you could later use to re-run setup_subject or setup_subject_nifti):

setup_subject_nifti -b /space/raid8/data/lieber/examplestudy -g lieberman -s subject1 -u lieber -k -I /Volumes/BMC5/dicom2

When prompted for a password enter Matt's brainmapping password.

Note: for -I, use /Volumes/BMC5/dicom2 for data collected on the trio. Some of the old Allegra data is at: /Volumes/BMC1/dicom