Skip to content

00. prepare the analysis environment

Fa-Hsuan Lin edited this page Jan 6, 2024 · 4 revisions

1. Access the tools

1.1 Matlab toolbox requirement

Install our toolbox.

1.2 FreeSurfer

We used FreeSurfer for structural MRI analysis, which provides 3D brain models of cortical surfaces and subcortical segmentation. The source analysis of MEG data is done by the MNE toolbox, which is related to FreeSurfer by using the brain/head models.

On a Linux server, these tools have been set up and can be accessed by sourcing the environment setup. You have to have the tcsh shell first.

> source /space/maki/1/pubsw/bme-dev-env-fs6.csh 

-------- freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c --------
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /space/maki/1/pubsw/packages/freesurfer/stable6
FSFAST_HOME       /space/maki/1/pubsw/packages/freesurfer/stable6/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR      /space/maki/1/pubsw/packages/freesurfer/stable6/subjects
MNI_DIR           /space/maki/1/pubsw/packages/freesurfer/stable6/mni
-------

MNE software location set to:    /space/maki/1/pubsw/packages/MNE-2.7.0-3103-Linux-x86_64
MATLAB software location set to: /opt/matlab/

/space/maki/1/pubsw/packages/MNE-2.7.0-3103-Linux-x86_64/bin added to PATH
/space/maki/1/pubsw/packages/MNE-2.7.0-3103-Linux-x86_64/lib added to LD_LIBRARY_PATH
/space/maki/1/pubsw/packages/MNE-2.7.0-3103-Linux-x86_64/share/app-defaults/%N added to XUSERFILESEARCHPATH

Note: Remember to set SUBJECTS_DIR and SUBJECT environment variables correctly.
Note: FreeSurfer environment is needed to access tkmedit from mne_analyze.

-------

2. Access the FreeSurfer reconstructions

Remember to set up the environment variable SUBJECTS_DIR to allow the access of FreeSurfer files/models. For example:

> setenv SUBJECTS_DIR /space/maki7/1/fhlin/social_eegmri/subjects

Clone this wiki locally