FreeSurfer: Difference between revisions
(FreeSurfer app: initial stub) |
(FreeSurfer: add post job steps) |
||
Line 15: | Line 15: | ||
FreeSurfer run its process in a non-parallel environment, so you won't have benefit from a dual/quad/hex core machine for a single case analysis. However you can start a number of FreeSurfer recon-all process in the same machine and theoretically you can reduce the time to analyze your group of cases. | FreeSurfer run its process in a non-parallel environment, so you won't have benefit from a dual/quad/hex core machine for a single case analysis. However you can start a number of FreeSurfer recon-all process in the same machine and theoretically you can reduce the time to analyze your group of cases. | ||
This is a simple SGE script to submit recon-all process. This script first copies your subjects directory form your $HOME containing the MRI data to Cheaha's high performance file system, $UABGRID_SCRATCH, so as to ramp the speed of recon-all process. The recon-all process is then executed on $UABGRID_SCRATCH | This is a simple SGE script to submit recon-all process. This script first copies your subjects directory form your $HOME containing the MRI data to Cheaha's high performance file system, $UABGRID_SCRATCH, so as to ramp the speed of recon-all process. The recon-all process is then executed on $UABGRID_SCRATCH | ||
<pre> | <pre> | ||
#!/bin/bash | #!/bin/bash | ||
Line 57: | Line 57: | ||
run_recon-all | run_recon-all | ||
</pre> | |||
After the completion of the recon-all process, copy the results back to your $HOME and delete the contents from scratch | |||
<pre> | |||
cp -r $UABGRID_SCRATCH/subjects $HOME/subjects-results | |||
rm -rf $UABGRID_SCRATCH/subjects | |||
</pre> | </pre> |
Revision as of 22:16, 15 December 2009
FreeSurfer is a freely available software package developed by investigators at the Athinoula A. Martinos Center for Biomedical Imaging used for a number of procedures including:
- Creation of computerized models of the brain from magnetic resonance imaging (MRI) data.
- Processing of functional magnetic resonance imaging (fMRI) data.
- Measuring a number of morphometric properties of the brain including cortical thickness and regional volumes.
- Intersubject averaging of structural and functional data using a procedure that aligns individuals based on their cortical folding patterns for optimal alignment of homologous neural regions.
Steps to run FreeSurfer
Once you log into Cheaha, set up your environment with the command:
module load freesurfer/freesurfer-4.5
FreeSurfer run its process in a non-parallel environment, so you won't have benefit from a dual/quad/hex core machine for a single case analysis. However you can start a number of FreeSurfer recon-all process in the same machine and theoretically you can reduce the time to analyze your group of cases.
This is a simple SGE script to submit recon-all process. This script first copies your subjects directory form your $HOME containing the MRI data to Cheaha's high performance file system, $UABGRID_SCRATCH, so as to ramp the speed of recon-all process. The recon-all process is then executed on $UABGRID_SCRATCH
#!/bin/bash function run_recon-all() { for patient in `ls -1` do cat > submit_recon-all-$patient.sh <<EOF #!/bin/bash #$ -S/bin/bash #$ -cwd # #$ -N recon-all-job$patient # Set the hard and soft run time limits (ex: 1hour/58 min) #$ -l h_rt=30:00:00,s_rt=29:55:00 #$ -j y # #$ -M YOUR_EMAIL_ADDRESS #$ -m eas # Load the appropriate module file(s) for your job . /etc/profile.d/modules.sh module load freesurfer/freesurfer-4.5 export SUBJECTS_DIR=$UABGRID_SCRATCH/subjects/$patient mri_convert -oi -os $patient.nii $patient.mgz recon-all -s $patient &> /dev/null & EOF qsub submit_recon-all-$patient.sh done } cp -r $HOME/subjects $UABGRID_SCRATCH/ cd $UABGRID_SCRATCH/subjects run_recon-all
After the completion of the recon-all process, copy the results back to your $HOME and delete the contents from scratch
cp -r $UABGRID_SCRATCH/subjects $HOME/subjects-results rm -rf $UABGRID_SCRATCH/subjects