COPAIN

Connectivity-based parcellation using and Infinite Mixture Model

Intro   -   Running COPAIN - Single subject   -   Running COPAIN - Multiple subjects   -  


Introduction

The motivation behind connectivity-based parcellation using tractography data is that regions that differ in their connections differ in their functions. Hence, a segregation of brain regions according to their connections is likely to represent a functional segregation. COPAIN uses the output of a probtrackx analysis to segment a seed region into clusters that have different connectivity patterns.

The main features of COPAIN are: (1) possibility of inferring the number of different subregions; (2) inclusion of spatial prior to get spatially smooth clusters; (3) multiple subjects mode that allows you to combine tractography results from different subjects.

COPAIN assumes you have run tractography using probtrackx with at least one "classification target". Then it will use the output of probtrackx (the files called "seeds_to_[blah]" to perform the parcellation.

Reference:

S. Jbabdi, M.W. Woolrich, T.E.J. Behrens
   Multiple-subjects connectivity-based parcellation using hierarchical Dirichlet process mixture models.
   NeuroImage, 44:373-384, 2009.

Important notes:
COPAIN assumes you have run a tractography analysis using probtrackx and classification targets. For instructions on how to run probtrackx with classification targets see ProbtrackxDoc.

We will assume in the following that you have N subjects, each one has an associated directory called subject1, subject2, etc. Within each subject's directory, we assume you have created a tractography results directory called ptx_results (same name for all subjects).

We will also assume that for each subject, the classification targets were the same (and in the same order) for all subjects (they do not need to be the same files or size, they just need to refer to the same brain area and have the same name for all subjects). We will assume the number of targets is T, and the target files are in the subject's directories, and called subject1/target1.nii.gz, subject1/target2.nii.gz, etc. And the same for the rest of the subjects.

Finally, we will assume that the seed masks are also in the subject's directories, and are called: subject1/seed.nii.gz, subject2/seed.nii.gz, etc.


Running COPAIN - Single subject

Suppose we want to run COPAIN for subject1. The first thing to do is create a text file containing target names. For example:

rm -f targets.txt
for ((i=1;i<=T;i++));do
  echo target$i >> targets.txt
done


Then the minimal command line to run COPAIN is:

copain -d subject1/ptx_results -o copain -s subject1/seed -t targets.txt

This command will produce a single file: subject1/ptx_results/copain_clusters.nii.gz. This file contains the hard classification results, i.e. a volume file with non-zero values within the seed voxels, each value being an integer coding for the cluster index.

Other options (also valid for multiple subjects):



For other options, simply type copain in a terminal window and press return.


Running COPAIN - Multiple subjects

Running COPAIN in multiple subjects mode is as easy as running it in single subject mode. All you need to do is input a list of probtrackx directories instead of a single one, and a list of seeds instead of a single one. (The list of targets is supposed to be the same across subjects, so we only need a single list - you can use the same as created above for subject1).

Create a list of directories in a text file:

rm -f ptx_dirs.txt
for ((i=1;i<=N;i++));do
  echo subject${i}/ptx_results >> ptx_dirs.txt
done


Then creat a list of seed files:

rm -f ptx_seeds.txt
for ((i=1;i<=N;i++));do
  echo subject${i}/seed.nii.gz >> ptx_seeds.txt
done


Finally, run COPAIN using the following command (all the other options are also available in this mode):

copain -d ptx_dirs.txt -o copain -s ptx_seeds.txt -t targets.txt

The output of this command will be a single file per subject: subject1/ptx_results/copain_clusters.nii.gz, subject2/ptx_results/copain_clusters.nii.gz, etc.


Copyright © 2005-2009, University of Oxford. Written by S. Jbabdi.