tutorials: cortical-based morphometry analysis

Cortical-based morphometry (CBM) is a neuroimaging method to assess cortical thickness differences in brains.

BSS should already be installed on your computer. If you have not done so, you can go here for download/installation.

For this tutorial, we will be looking at the effect of age (via ANOVA) on cortical thickness within the left hemisphere, when controlled for sex, in 25 subjects.

 

Pre-Requisites

You do not need to run these steps for this tutorial. This section outlines the necessary steps to prepare the data for BSS-Cortical Based Morphometry analysis. All these processes have been run for this tutorial and are available here. Please download this file and unzip this file in a convenient location, such as your desktop. It contains the folder USC2015_BrainSuiteWorkshop, in which you will find the ICBM25 folder containing the necessary files to run this tutorial.
  1. Prior to running CBM in BrainSuite Statistics toolbox (BSS), Cortical Surface Extraction and Surface/Volume Registration need to be run on your subject data.
  2. Next, thicknessPVC has to be run to obtain cortical thickness data*. This script computes the cortical thickness using partial fraction volume. Moreover, it stores these thickness measures into separate hemisphere files and maps the subject thickness surfaces to the atlas hemisphere surfaces. For this tutorial, the following command line was run:
    thicknessPVC.sh file_prefix
  3. Lastly, smoothing has to be performed on the surface files. The script svreg_smooth_surf_function is used to smooth function defined on surface*. Surface based smoothing is typically required for compensating for the results of mis-registration. For this tutorial, the following command line was run:
    svreg_smooth_surf_function.sh atlas.pvc-thickness_0-6mm.left.mid.cortex.dfs atlas.pvc-thickness_0-6mm.smooth2.5mm.left.mid.cortex.dfs 2.5

    where the smoothing parameter is roughly, 2.5 (kernel FWHM in mm).

  4. *For more information regarding thicknessPVC and svreg_smooth_surf_function, please go here and look under thicknessPVC under “Modules Usage and Descriptions”.

BSS: CBM Analysis Tutorial

BSS analyzes each hemisphere separately, so we will be performing the CBM analysis separately on each hemisphere.

<Left Hemisphere>

Data Preparation

This step modifies the demographics file, which contains data regarding subjects (i.e. gender, age, etc.), for analysis. It also writes out a modelspec.ini file, in which you can specify your model of interest.

  1. Open the terminal and navigate to your ICBM25 folder, located in the USC2015_BrainSuiteWorkshop directory.
    For example, in Mac:

    cd ~/Desktop/USC2015_BrainSuiteWorkshop/ICBM25
  2. On the command line, run (all in one line):
    If Mac or Linux:

    /Application/BSS/bin/bss_prepare_data_for_cbm.py ~/Desktop/USC2015_BrainSuiteWorkshop/ICBM25 ICBM_demographics.csv modelspec_skeleton_cbm_left.ini left -sigma 2.5

    bss_prepare_data_for_cbm.py will add the full paths of each *atlas.pvc-thickness_0-6mm.left.mid.cortex.dfs into the demographics file, under the column header “File_cbm_left”. The usage for this script is the following (all in one line):

    <path to bss installation>/bin/bss_prepare_data_for_cbm.py master_subj_dir demographics_csv modelspec {left, right} [-sigma]smoothing_kernel_(mm)

Model Specification

  1. The modelspec_skeleton_cbm_left.ini describes subject and model information.
    First, change the atlas= to reflect the locations of your mri.left.mid.cortex.dfs atlas file.
    Next, since we will be testing for the effect of age as main effect while controlling for sex, our full model will be Age+Sex and our null model will be Sex. These variables need to be in the demographics file as column names (case-sensitive). Type in the full model next to full model= and null model next to null model= in the [model] section. Save this file.
    Important!! The modelspec_skeleton_cbm_left.ini can only contain either the [model] or the [measure] section but not both. So delete the entire [measure] section.

Run Group Analysis

  1. Finally, run bss_run.py in the terminal. If Mac or Linux:
    /Applications/BSS/bin/bss_run.py modelspec_skeleton_cbm_left.ini ~/Desktop/cbm_out

<Right Hemisphere>

Data Preparation

Again, this step modifies the demographics file, which contains data regarding subjects (i.e. gender, age, etc.), for analysis. It also writes out a modelspec.ini file, in which you can specify your model of interest.

  1. Open the terminal and navigate to your ICBM25 folder, located in the USC2015_BrainSuiteWorkshop directory.
    For example, in Mac:

    cd ~/Desktop/USC2015_BrainSuiteWorkshop/ICBM25
  2. On the command line, run (all in one line):
    If Mac or Linux:

    /Application/BSS/bin/bss_prepare_data_for_cbm.py ~/Desktop/USC2015_BrainSuiteWorkshop/ICBM25 ICBM_demographics.csv modelspec_skeleton_cbm_right.ini right -sigma 2.5

    bss_prepare_data_for_cbm.py will add the full paths of each *atlas.pvc-thickness_0-6mm.left.mid.cortex.dfs into the demographics file, under the column header “File_cbm_right”.

Model Specification

  1. Same as modelspec_skeleton_cbm_left.ini, the modelspec_skeleton_cbm_right.ini describes subject and model information.
    First, again, change the atlas= to reflect the locations of your mri.right.mid.cortex.dfs atlas file.
    Next, since we will be testing for the effect of age as main effect while controlling for sex, our full model will be Age+Sex and our null model will be Sex. These variables need to be in the demographics file as column names (case-sensitive). Type in the full model next to full model= and null model next to null model= in the [model] section. Save this file.
    Important!! The modelspec_skeleton_cbm_right.ini can only contain either the [model] or the [measure] section but not both. So delete the entire [measure] section.

Run Group Analysis

  1. Finally, run bss_run.py in the terminal. If Mac or Linux:
    /Applications/BSS/bin/bss_run.py modelspec_skeleton_cbm_right.ini ~/Desktop/cbm_out

Visualization of results

  1. Drag and drop anova_Age_mri.left.mid.cortex_atlas_log_pvalues.dfs and anova_Age_mri.right.mid.cortex_atlas_log_pvalues.dfs into BrainSuite. These files contain logarithmic p-values denoting the significance of main effect Age. This file and the files mentioned below are located in the cbm_out folder.

  2. Open the anova_Age_mri.left.mid.cortex_atlas_log_pvalues_cbar.pdf to see the color bar for the left hemisphere surface. For the right hemisphere, open the anova_Age_mri.right.mid.cortex_atlas_log_pvalues_cbar.pdf

    Color bar for left hemisphere.


    Color bar for right hemisphere.

  3. Open anova_Age_mri.left.mid.cortex_unadjusted_pvalue_range.txt for the range of logarithmic p-values.
  4. P-value range for left hemisphere.


    P-value range for right hemisphere

  5. To view the adjusted logarithmic p-values, load in anova_Age_mri.*.mid.cortex_atlas_log_pvalues_adjusted.dfs as surface file on BrainSuite. anova_Age_mri.*.mid.cortex_adjusted_pvalue_range.txt file will hold the adjusted logarithmic p-value range. There are also t-value outputs as well (i.e. anova_Age_mri.*.mid.cortex_atlas_tvalues_all.dfs (all t-values) and anova_Age_mri.*.mid.cortex_atlas_tvalues_adjusted.dfs (adjusted)).