# Running the HCP pipeline ````{admonition} Prerequisites * [Preparing data for the HCP pipeline](../UsageDocs/PreparingDataHCP) ```` For an overview on how to prepare data and run the HCP preprocessing steps, see [Overview of steps for running the HCP pipeline](../UsageDocs/HCPPreprocessing). HCP minimal preprocessing pipeline implements the processing steps prepared by the Human Connectome Project. The pipelines are described in detail in [Glasser et al. (2013)](http://www.sciencedirect.com/science/article/pii/S1053811913005053), whereas the general approach is presented in [Glasser et al. (2016)](https://www.nature.com/articles/nn.4361). QuNex includes a modified branch of the HCP that enables additional flexibility and application of the pipelines on wider array of datasets that would not meet HCP minimum acquisition requirements. Overall the preprocessing is organized in a series of steps that are run consecutively. For full details, please consult [Glasser et al. (2013)](http://www.sciencedirect.com/science/article/pii/S1053811913005053). Here is a brief list of the pipelines and the corresponding QuNex commands: * [_General information on running the HCP pipeline_](../UsageDocs/HCPPreprocessGeneral) Information on general settings, folder structure, running commands, and logging. ## Processing of structural images * [_PreFreeSurfer_](../UsageDocs/HCPPreFreeSurfer) [command: [`hcp_pre_freesurfer`](../../api/gmri/hcp_pre_freesurfer.rst)] Processes the T1w and T2w images and aligns them to the MNI atlas space. * [_FreeSurfer_](../UsageDocs/HCPFreeSurfer) [command: [`hcp_freesurfer`](../../api/gmri/hcp_freesurfer.rst)] Runs optimized FreeSurfer processing for tissue segmentation, reconstruction of cortical mantle and identification of major cortical and subcortical anatomical structures. * [_PostFreeSurfer_](../UsageDocs/HCPPostFreeSurfer) [command: [`hcp_post_freesurfer`](../../api/gmri/hcp_post_freesurfer.rst)] Computes additional surface files, converts them to CIFTI format, and generates myelin maps. * [_Longitudinal FreeSurfer_](../UsageDocs/HCPLongitudinalFreeSurfer) [command: [`hcp_longitudinal_freesurfer`](../../api/gmri/hcp_longitudinal_freesurfer.rst)] Runs the longitudinal HCP FreeSurfer pipeline. ## Processing of BOLD images * [_fMRIVolume_](../UsageDocs/HCPfMRIVolume) [command: [`hcp_fmri_volume`](../../api/gmri/hcp_fmri_volume.rst)] Processes BOLD images and registers them to MNI atlas space. * [_fMRISurface_](../UsageDocs/HCPfMRISurface) [command: [`hcp_fmri_surface`](../../api/gmri/hcp_fmri_surface.rst)] Maps the BOLD signal to a combined surface and volume, grayordinate representation stored in CIFTI format. ## Processing of Diffusion Weighted images (DWI) * [_Diffusion_](../UsageDocs/HCPDiffusion) [command: [`hcp_diffusion`](../../api/gmri/hcp_diffusion.rst)] Computes motion correction, distortion correction, eddy current correction and registration to native T1 space. Assumes presence of phase-encoding reversed DWI pairs. After this step data are ready for FSL's dtifit, bedpostx and probtrackx. * [_DiffusionLegacy_](../UsageDocs/DWILegacyPreprocessing) [command: [`dwi_legacy_gpu`](../../api/gmri/dwi_legacy_gpu.rst)] Computes motion correction, distortion correction, eddy current correction and registration to native T1 space. Works with 'legacy' data that is not phase-encoding reversed. It accepts standard field maps or runs if no field maps are present (results will be worse). After this step legacy data are ready for FSL's dtifit, bedpostx and probtrackx. Each of the steps is run using the specified `qunex` command. The processing is optimized so that multiple processes can be run in parallel, and the processing can be distributed over multiple nodes on a supercomputer cluster (please refer to [General information on running the HCP pipeline](../UsageDocs/HCPPreprocessGeneral) How to run each of the steps is described in detail along with the list of relevant parameters that can or need to be specified on the respective pages. In addition to the HCP minimal preprocessing pipeline, the QuNex suite also implements the following HCP pipelines. * [_ICAFix_](../UsageDocs/HCPICAFix) [commands: [`hcp_icafix`](../../api/gmri/hcp_icafix.rst), [`hcp_post_fix`](../../api/gmri/hcp_post_fix.rst), [`hcp_reapply_fix`](../../api/gmri/hcp_reapply_fix.rst)] Prepares and runs ICA-based classifier for identifying signal vs. noise components of fMRI data. * [_MSMAll_](../UsageDocs/HCPMSMAll) [commands: [`hcp_msmall`](../../api/gmri/hcp_msmall.rst), [`hcp_dedrift_and_resample`](../../api/gmri/hcp_dedrift_and_resample.rst)] Runs multi-modal surface-based functional alignment of individual sessions' cortical data to group template. * [_Task fMRI analyses_](../UsageDocs/HCPTask) [command: [`hcp_task_fmri_analysis`](../../api/gmri/hcp_task_fmri_analysis.rst)] Runs GLM analyses on HCP preprocessed data. ```{toctree} :hidden: HCPPreFreeSurfer HCPFreeSurfer HCPPostFreeSurfer HCPLongitudinalFreeSurfer HCPfMRIVolume HCPfMRISurface HCPDiffusion DWILegacyPreprocessing HCPICAFix HCPMSMAll HCPTask ```