COPAINConnectivity-based parcellation using and Infinite Mixture ModelIntro - Running COPAIN - Single subject - Running COPAIN - Multiple subjects - | ![]() |
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.
rm -f targets.txt
for ((i=1;i<=T;i++));do
echo target$i >> targets.txt
done
copain -d subject1/ptx_results -o copain -s subject1/seed -t targets.txt
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.
index.html
from within the specified directory.
copain
in a terminal window and press return.
rm -f ptx_dirs.txt
for ((i=1;i<=N;i++));do
echo subject${i}/ptx_results >> ptx_dirs.txt
done
rm -f ptx_seeds.txt
for ((i=1;i<=N;i++));do
echo subject${i}/seed.nii.gz >> ptx_seeds.txt
done
copain -d ptx_dirs.txt -o copain -s ptx_seeds.txt -t targets.txt
subject1/ptx_results/copain_clusters.nii.gz
, subject2/ptx_results/copain_clusters.nii.gz
, etc.