Use the UCLA Multimodal Connectivity Package

From Center for Cognitive Neuroscience
Jump to navigation Jump to search

NOTE: This code is in beta and assurances will not be made as to its quality. Use at your own risk.

The UCLA Multimodal Connectivity Package is a set of Python programs used to calculate connectivity metrics from a variety of neuroimaging modalities including diffusion weighted MRI, fMRI, and structural MRI. It is available for download here: http://www.ccn.ucla.edu/~jbrown/Downloads/umcp.tar

Setup

Before using these programs, the following should be done:

  1. For diffusion data (eg DTI): preprocessing (eddy correction, etc.), tensor calculation, and tractography with Diffusion Toolkit to create a .trk file. In order to do standard space voxelwise comparisons, the track file should be registered to standard space using track_transform.
  2. For fMRI data: preprocessing (motion correction, skull stripping, high pass filtering, spatial smoothing, etc.) to prepare the 4D BOLD .nii file and optionally, registration to standard space.
  3. For structural data (eg T1, MPRAGE): preprocessing (skull stripping, etc.), parcellation into separate regions of interest saved as .nii masks files (binary or not). Alternatively, regions of interest can be obtained from an atlas like AAL or Harvard-Oxford.

Contents

  • nifti_functions.py: Functions which use the PyNifti library (http://niftilib.sourceforge.net/pynifti/) in order to perform helper operations on .nii files.
  • tracks.py: Functions which operate on Diffusion Toolkit (http://www.trackvis.org/dtk/) .trk files. Options include calculating connectivity matrices between a set of masks and calculating track density files for a set of masks.
  • run_tracks.py: A command-line callable function which takes a .trk files and a list of masks as input and outputs a connectivity matrix text file and a 4D .nii density file.
Usage: 
$ run_tracks.py dti.trk output_density_filename output_connectmat_filename mask1.nii.gz mask2.nii.gz mask3.nii.gz ...

Note that fiber counts from this program are highly similar but not identical to the counts found in TrackVis (95-99% similar). It's best to observe the number of fibers between two masks in TrackVis and then compare that to the number counted by this program and make sure the values are similar enough for your needs.

  • timeseries.py: Functions which operate on 4D fMRI .nii files in order to calculate various connectivity metrics. Options include correlating all voxels with a seed region, calculating the connectivity matrix based on correlation for a list of seed regions, and mutual information equivalent measures. These are especially untested.

Suggestions

For analyzing connectivity matrices and network characterization, the Brain Connectivity Toolbox (http://sites.google.com/a/brain-connectivity-toolbox.net/bct/Home) is a good choice.

For performing voxelwise image analysis on density/timeseries correlations .nii files created with these programs, FSL tools like randomise (http://www.fmrib.ox.ac.uk/fsl/randomise/index.html) are well suited.