Multivariate Distance Matrix Regression (MDMR)#
- CPAC.cwas.create_cwas(name='cwas', working_dir=None, crash_dir=None)[source]#
Connectome Wide Association Studies
This workflow performs CWAS on a group of subjects.
- Parameters
name (string, optional) – Name of the workflow.
- Returns
cwas – CWAS workflow.
- Return type
nipype.pipeline.engine.Workflow
Notes
Workflow Inputs:
inputspec.subjects : dict (subject id: nifti files) 4-D timeseries of a group of subjects normalized to MNI space inputspec.roi : string (nifti file) Mask of region(s) of interest inputspec.regressor : list (float) Corresponding list of the regressor variable of shape (`N`) or (`N`,`1`), `N` subjects inputspec.cols : list (int) todo inputspec.f_samples : int Number of permutation samples to draw from the pseudo F distribution inputspec.parallel_nodes : integer Number of nodes to create and potentially parallelize over
Workflow Outputs:
outputspec.F_map : string (nifti file) Pseudo F values of CWAS outputspec.p_map : string (nifti file) Significance p values calculated from permutation tests outputspec.z_map : string (nifti file) Significance p values converted to z-scores
CWAS Procedure:
Calculate spatial correlation of a voxel
Correlate spatial z-score maps for every subject pair
Convert matrix to distance matrix, 1-r
Calculate MDMR statistics for the voxel
Determine significance of MDMR statistics with permutation tests
Workflow Graph:
Detailed Workflow Graph:
References
- 1
Shehzad Z, Kelly C, Reiss PT, Cameron Craddock R, Emerson JW, McMahon K, Copland DA, Castellanos FX, Milham MP. A multivariate distance-based analytic framework for connectome-wide association studies. Neuroimage. 2014 Jun;93 Pt 1(0 1):74-94. doi: 10.1016/j.neuroimage.2014.02.024. Epub 2014 Feb 28. PMID: 24583255; PMCID: PMC4138049.
- CPAC.cwas.joint_mask(subjects, mask_file=None)[source]#
Creates a joint mask (intersection) common to all the subjects in a provided list and a provided mask
- Parameters
subjects (dict of strings) – A length N list of file paths of the nifti files of subjects
mask_file (string) – Path to a mask file in nifti format
- Returns
joint_mask – Path to joint mask file in nifti format
- Return type
string
- CPAC.cwas.nifti_cwas(subjects, mask_file, regressor_file, participant_column, columns_string, permutations, voxel_range)[source]#
Performs CWAS for a group of subjects
- Parameters
subjects (dict of strings:strings) – A length N dict of id and file paths of the nifti files of subjects
mask_file (string) – Path to a mask file in nifti format
regressor_file (string) – file path to regressor CSV or TSV file (phenotypic info)
columns_string (string) – comma-separated string of regressor labels
permutations (integer) – Number of pseudo f values to sample using a random permutation test
voxel_range (ndarray) – Indexes from range of voxels (inside the mask) to perform cwas on. Index ordering is based on the np.where(mask) command
- Returns
F_file (string) – .npy file of pseudo-F statistic calculated for every voxel
p_file (string) – .npy file of significance probabilities of pseudo-F values
voxel_range (tuple) – Passed on by the voxel_range provided in parameters, used to make parallelization easier