FreeSurfer: Difference between revisions

no edit summary
No edit summary
Line 20: Line 20:


Select a version (6.0.0 or newer) in the [https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/ download repository], and download the corresponding <code>freesurfer-Linux*vX.Y.Z.tar.gz</code> archive on your favorite cluster.
Select a version (6.0.0 or newer) in the [https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/ download repository], and download the corresponding <code>freesurfer-Linux*vX.Y.Z.tar.gz</code> archive on your favorite cluster.
==Checking the easybuild recipes==
You can check the easybuild recipes for freesurfer [https://github.com/ComputeCanada/easybuild-easyconfigs/tree/computecanada-master/easybuild/easyconfigs/f/FreeSurfer online] on GitHub or via a command line from any Compute Canada clusters:
{{Commands
eb -S FreeSurfer
CFGS1=/cvmfs/soft.computecanada.ca/easybuild/easyconfigs/f/FreeSurfer
CFGS2=/cvmfs/soft.computecanada.ca/easybuild/ebfiles_repo/2017/FreeSurfer
* $CFGS1/FreeSurfer-5.3.0-centos4_x86_64.eb
* $CFGS1/FreeSurfer-5.3.0-centos6_x86_64.eb
* $CFGS1/FreeSurfer-5.3.0-matlab-2013.patch
* $CFGS1/FreeSurfer-6.0.0-centos6_x86_64.eb
* $CFGS1/FreeSurfer-6.0.1-centos6_x86_64.eb
* $CFGS1/FreeSurfer-7.1.0-centos6_x86_64.eb
* $CFGS1/FreeSurfer-7.1.0-centos7_x86_64.eb
* $CFGS2/FreeSurfer-5.3.0-centos4_x86_64.eb
* $CFGS2/FreeSurfer-5.3.0-centos6_x86_64.eb
* $CFGS2/FreeSurfer-5.3.0-matlab-2013.patch
* $CFGS2/FreeSurfer-6.0.0-centos6_x86_64.eb
}}


==Installation in your Home with Easybuild==
==Installation in your Home with Easybuild==
Line 49: Line 70:


When this page was created, Compute Canada was supporting up to version 6.0.1. You can check for [https://github.com/ComputeCanada/easybuild-easyconfigs/tree/computecanada-master/easybuild/easyconfigs/f/FreeSurfer newer versions here].
When this page was created, Compute Canada was supporting up to version 6.0.1. You can check for [https://github.com/ComputeCanada/easybuild-easyconfigs/tree/computecanada-master/easybuild/easyconfigs/f/FreeSurfer newer versions here].
==Hippocampus and brainstem processing==
To perform processing of the hippocampus and brainstem, download and install matlab runtime 2012b from the freesurfer website:
<pre>
module load freesurfer/6.0.0
cd $FREESURFER_HOME
curl "http://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bLinux.tar.gz" -o "matlab_runtime2012bLinux.tar.gz"
tar xvf matlab_runtime2012bLinux.tar.gz
</pre>


==Installation in a shared folder==
==Installation in a shared folder==
Line 75: Line 85:
</pre>
</pre>


If it complains about checksums, add the option <code>--disable-enforce-checksums</code>
If it complains about '''checksums''', add the option <code>--disable-enforce-checksums</code> to the <code>eb</code> command.


To make the program accessible for all members of the group, two more steps are required:
To make the program accessible for all members of the group, two more steps are required:


* You need to give all members of your group read and exec access to the installation directory </home/$USER/projects/def-someuser/$USER>. To see how to give them access to this directory, please visit the [[Sharing data/en|data sharing]] page.
* You need to give all members of your group read and exec access to the installation directory <code>/home/$USER/projects/def-someuser/$USER,</code>. To see how to give them access to this directory, please visit the [[Sharing data/en|data sharing]] page.
* Each member of the group will need to put the module file in their own home directories. The module file is within the directory:  
* Each member of the group will need to put the module file in their own home directories. The module file is within the directory:  
<pre>
<pre>
/home/$USER/.local/easybuild/software/2017/Core/freesurfer/6.0.1/</code>
/home/$USER/.local/easybuild/software/2017/Core/freesurfer/6.0.1.lua</code>
</pre>
</pre>
Each member will need to create the directory /home/$USER/.local/easybuild/software/2017/Core/freesurfer/6.0.1/</code> and put the file "*.lua"


/home/kerrache/.local/easybuild/modules/2017/Core/freesurfer/6.0.1
Each member of the group will need to create the directory <code>/home/$USER/.local/easybuild/software/2017/Core/freesurfer</code> and put the file <code>6.0.1.lua</code>:


tar file "/home/mcorrito/software/modules.tar". You can send them this file and they should run the following:
{{Commands
 
|mkdir -p /home/$USER/.local/easybuild/software/2017/Core/freesurfer
mkdir -p /home/$USER/.local/easybuild
|cp 6.0.1.lua /home/$USER/.local/easybuild/software/2017/Core/freesurfer
 
}}
- upload the file "modules.tar" to their home directory
- Then create a directory if not already created:
mkdir -p /home/$USER/.local/easybuild
- Move the file "modules.tar" to "/home/$USER/.local/easybuild" and unpack it:
mv modules.tar /home/$USER/.local/easybuild/
cd /home/$USER/.local/easybuild/
tar -xvf modules.tar


The above will set the module (only the module file that points to the installation directory under project) in their own directory.
The above will set the module (only the module file that points to the installation directory under project) in their own directory.
Line 104: Line 106:
The module can be loaded from their own accounts using:
The module can be loaded from their own accounts using:


module load stata/15
{{Commands
|module load freesurfer/6.0.1
|cd $FREESURFER_HOME
}}


==Hippocampus and brainstem processing==


To perform processing of the hippocampus and brainstem, download and install matlab runtime 2012b from the freesurfer website:


 
<pre>
 
module load freesurfer/6.0.0
 
cd $FREESURFER_HOME
 
curl "http://surfer.nmr.mgh.harvard.edu/fswiki/MatlabRuntime?action=AttachFile&do=get&target=runtime2012bLinux.tar.gz" -o "matlab_runtime2012bLinux.tar.gz"
It is possible to install the ed files (with Easybuild) to the project space, but permissions have to be fixed.
tar xvf matlab_runtime2012bLinux.tar.gz
 
</pre>
* Recursively set the proper group ID of the freesurfer directory
* Move the data to the desired location in the project space
* Copy the module file to a shared location, and edit all paths in the module file.
rrrrrr


==Example of working batch script for freesurfer version >= 6.0.0==
==Example of working batch script for freesurfer version >= 6.0.0==
cc_staff
415

edits