Difference between revisions of "Freesurfer"

From UFRC
Jump to navigation Jump to search
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Environment Variables==
+
[[Category:Software]][[Category:Bioinformatics]][[Category:Neuroscience]][[Category:Biology]][[Category:Imaging]]
In order for Freesurfer to work, the followings environment variables need to be set:
+
{|<!--CONFIGURATION: REQUIRED-->
 +
|{{#vardefine:app|freesurfer}}
 +
|{{#vardefine:url|http://surfer.nmr.mgh.harvard.edu/}}
 +
<!--CONFIGURATION: OPTIONAL (|1}} means it's ON)-->
 +
|{{#vardefine:conf|}}          <!--CONFIGURATION-->
 +
|{{#vardefine:exe|1}}            <!--ADDITIONAL INFO-->
 +
|{{#vardefine:pbs|}}            <!--PBS SCRIPTS-->
 +
|{{#vardefine:policy|}}        <!--POLICY-->
 +
|{{#vardefine:testing|}}      <!--PROFILING-->
 +
|{{#vardefine:faq|}}            <!--FAQ-->
 +
|{{#vardefine:citation|1}}      <!--CITATION-->
 +
|{{#vardefine:installation|}} <!--INSTALLATION-->
 +
|}
 +
<!--BODY-->
 +
<!--Description-->
 +
{{#if: {{#var: url}}|
 +
{{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}}
  
In bash:
+
Freesurfer is a set of automated tools for reconstruction of the brain’s cortical surface from structural MRI data, and overlay of functional MRI data onto the reconstructed surface.<!--Modules-->
<pre>
+
==Environment Modules==
$ export FREESURFER_HOME=/apps/freesurfer
+
Run <code>module spider {{#var:app}}</code> to find out what environment modules are available for this application.
$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
+
==System Variables==
</pre>
+
* HPC_{{uc:{{#var:app}}}}_DIR - installation directory
In tcsh:
 
<pre>
 
$ setenv FREESURFER_HOME /apps/freesurfer
 
$ source $FREESURFER_HOME/SetUpFreeSurfer.csh
 
</pre>
 
  
In fact, you are going to have to grab the SetUpFreeSurfer script and copy it to your home directory so that it can be modified, as we do not have space in the installation area of the software for you to copy your image files to.
+
<!--Configuration-->
 +
{{#if: {{#var: conf}}|==Configuration==
 +
See the [[{{PAGENAME}}_Configuration]] page for {{#var: app}} configuration details.
 +
|}}
 +
<!--Run-->
 +
{{#if: {{#var: exe}}|==Additional Information==
 +
Starting with freesurfer/6.0.0 the software is available as a Singularity container. To run any executable use the 'launch_freesurfer' wrapper after loading the module.
  
It is recommended that you copy your image files over to /scratch/ufhpc/$username and work on the files there, as that is where the fastest filesystem is located.
+
E.g.
  
==Optional Configuration Settings==
+
launch_freesurfer dcmunpack
The defaults declared in the SetUpFreeSurfer.csh script should work for most installations. However, users should feel free to edit this file to customize certain environment variables:
 
  
1. Your declaration of the FREESURFER_HOME variable could be moved within the SetUpFreeSurfer.csh script.
+
'''NOTE:'''
  
2. The default SUBJECTS_DIR, which is $FREESURFER_HOME/subjects, is most likely the first variable that you will want to customize, as you may keep different groups of subjects in different directories. You may include the following either directly in the SetUpFreeSurfer.csh script, or prior to calling it:
+
Freesurfer comes with Freeview software. Freeview is a completely separate software from Freesurfer and is used purely for data visualization. Freesurfer 6 includes Freeview 2.0.
  
      setenv SUBJECTS_DIR <full path to subject dir>
+
|}}
 +
<!--PBS scripts-->
 +
{{#if: {{#var: pbs}}|==PBS Script Examples==
 +
See the [[{{PAGENAME}}_PBS]] page for {{#var: app}} PBS script examples.
 +
|}}
 +
<!--Policy-->
 +
{{#if: {{#var: policy}}|==Usage Policy==
 +
WRITE USAGE POLICY HERE (Licensing, usage, access).
 +
|}}
 +
<!--Performance-->
 +
{{#if: {{#var: testing}}|==Performance==
 +
WRITE_PERFORMANCE_TESTING_RESULTS_HERE
 +
|}}
 +
<!--Faq-->
 +
{{#if: {{#var: faq}}|==FAQ==
 +
*'''Q:''' **'''A:'''|}}
 +
<!--Citation-->
 +
{{#if: {{#var: citation}}|==Citation==
 +
If you publish research that uses {{#var:app}} you have to cite it as follows:
  
3. If you do NOT intend to use the functional tools, then add the following line to the additional configuration section:
+
See [http://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferMethodsCitation] in the Freesurfer wiki on how to correctly cite Freesurfer tools.
 
+
|}}
      setenv NO_FSFAST
+
<!--Installation-->
 
+
{{#if: {{#var: installation}}|==Installation==
If you do intend to use the functional tools, then add these lines to your ~/matlab/startup.m file:
+
See the [[{{PAGENAME}}_Install]] page for {{#var: app}} installation notes.|}}
 
+
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
      fsfasthome = getenv('FSFAST_HOME');
+
__NOTOC____NOEDITSECTION__
      fsfasttoolbox = sprintf('%s/toolbox',fsfasthome);
 
      path(path,fsfasttoolbox);
 
 
 
4. You may also wish to declare a path to an FSL installation you might have:
 
 
 
      setenv FSL_DIR /usr/local/fsl
 
 
 
5. Save the file. You will need to source this file (SetUpFreeSurfer.csh) every time you want to use Freesurfer.
 
==Sample PBS Job Script==
 
<pre>
 
#!/bin/tcsh -f
 
#
 
#PBS -N freesurfer
 
#PBS -r n
 
#PBS -o dnet.out
 
#PBS -e dnet.err
 
#PBS -j oe
 
#PBS -m abe
 
#PBS -M <email address>
 
#PBS -q submit@iogw2.local
 
#PBS -l nodes=1:ppn=1
 
#PBS -l walltime=24:00:00
 
 
 
setenv FREESURFER_HOME /apps/freesurfer
 
source $FREESURFER_HOME/SetUpFreeSurfer.csh
 
 
 
setenv EXE /apps/freesurfer/bin/recon-all
 
 
 
$EXE -s bert -all
 
</pre>
 

Latest revision as of 20:44, 10 June 2022

Description

freesurfer website  

Freesurfer is a set of automated tools for reconstruction of the brain’s cortical surface from structural MRI data, and overlay of functional MRI data onto the reconstructed surface.

Environment Modules

Run module spider freesurfer to find out what environment modules are available for this application.

System Variables

  • HPC_FREESURFER_DIR - installation directory


Additional Information

Starting with freesurfer/6.0.0 the software is available as a Singularity container. To run any executable use the 'launch_freesurfer' wrapper after loading the module.

E.g.

launch_freesurfer dcmunpack

NOTE:

Freesurfer comes with Freeview software. Freeview is a completely separate software from Freesurfer and is used purely for data visualization. Freesurfer 6 includes Freeview 2.0.



Citation

If you publish research that uses freesurfer you have to cite it as follows:

See [1] in the Freesurfer wiki on how to correctly cite Freesurfer tools.