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
- 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
ofstrings
) – A length N list of file paths of the nifti files of subjectsmask_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
ofstrings:strings
) – A length N dict of id and file paths of the nifti files of subjectsmask_file (
string
) – Path to a mask file in nifti formatregressor_file (
string
) – file path to regressor CSV or TSV file (phenotypic info)columns_string (
string
) – comma-separated string of regressor labelspermutations (
integer
) – Number of pseudo f values to sample using a random permutation testvoxel_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 voxelp_file (
string
) – .npy file of significance probabilities of pseudo-F valuesvoxel_range (
tuple
) – Passed on by the voxel_range provided in parameters, used to make parallelization easier