-
Notifications
You must be signed in to change notification settings - Fork 21
Subtyping pipeline
The goal of this pipeline is to cluster subjects together based on similarity on a given measure (e.g. functional connectivity, cortical thickness, etc) and then perform subsequent statistical analyses.
The steps of the pipeline are as follows:
- Preprocessing of the data to create a "stack" map as input for the rest of the pipeline, with the option of regressing confounds prior to subtyping. The stack map contains a Subjects x Voxels x Networks array. See niak_brick_network_stack.m for more info.
- Generating the similarity matrix, a Subjects x Subjects matrix to illustrate how similar subjects are to one another and how subjects can be clustered together. See niak_brick_similarity_matrix.m for more info.
- Clustering the subjects to form subtypes (or subgroups) within the dataset See niak_brick_subtyping.m for more info.
- Calculating the subtype "weights" for each subject, a measure of the strength of the association between each subject to a given subtype. See niak_brick_subtype_weight.m for more info.
- Statistical tests of association, to test how subtypes may be related to variables of interest. See niak_brick_association_test.m for more info.
The command to run the pipeline in a Matlab/Octave session is:
niak_pipeline_subtype(files_in,opt)
where "files_in" is a structure describing how the dataset is organized, and "opt" is a structure describing the options of the pipeline. See this test script for an example of how to write your own script to call the pipeline.
- Individual maps (e.g. rmap_part, stability_maps, etc).
- A 3D binary mask
- A model file (optional)
These inputs must be specified in a structure, with required subfields for data
and mask
, and optionally, model
.
These maps can be any type of preprocessed map (for example, rmap_part or stability_maps generated from niak_brick_scores_fmri
). N.B. The pipeline assumes there is only one (1) mnc.gz or nii.gz per subject.
To grab the individual maps, you will have to build a structure. For example:
files_in.data.subject1 = 'data/subject1_session1_stability_maps.mnc.gz';
files_in.data.subject2 = 'data/subject2_session1_stability_maps.mnc.gz';
The "mask" field is the name of a 3D binary volume serving as a mask for the analysis. It can be a mask of the brain common to all subjects, or a mask of a specific brain area, e.g. the thalami. It is important to make sure that this segmentation is in the same space and resolution as the fMRI datasets. If not, use SPM/SPM or MINCRESAMPLE to resample the mask at the correct resolution.
To specify the mask, add a subfield for the mask to the files_in
structure. For example:
files_in.mask = '/home/pbellec/demo_niak_preproc/quality_control/group_coregistration/func_mask_group_stereonl.mnc.gz';
The model file is a .csv file containing demographic information, including variables of interest and confound variables, for each subject specified in files_in.data
. This input is optional.
To specify the model files, add a subfield to the files_in
structure. For example:
files_in.mask = 'data/model.csv';
The different options are passed through fields in the structure "opt".
The first option is the name of the folder where the results will be stored. Note that this folder does not need to be created before hand. Example:
opt.folder_out = 'data/subtype_results/'; % Where to store results
The second option is the scale of the networks specified in files_in.data
(e.g. a brain partition of 5 networks is considered to be at scale 5). Example:
opt.scale = 5;
Brought to you by the SIMEXP lab