hcp_dedrift_and_resample
hcp_dedrift_and_resample#
- qx_utilities.hcp.process_hcp.hcp_dedrift_and_resample(sinfo, options, overwrite=True, thread=0)#
hcp_dedrift_and_resample [... processing options]
Runs the DeDriftAndResample step of the HCP Pipeline.
Warning
The code expects the input images to be named and present in the QuNex folder structure. The function will look into folder:
<session id>/hcp/<session id>
for files:
MNINonLinear/Results/<boldname>/ <boldname>_<hcp_cifti_tail>_hp<hcp_highpass>_clean.dtseries.nii
Parameters
- --batchfile (str, default ''):
The batch.txt file with all the sessions information.
- --sessionsfolder (str, default '.'):
The path to the study/sessions folder, where the imaging data is supposed to go.
- --parsessions (int, default 1):
How many sessions to run in parallel.
- --hcp_suffix (str, default ''):
Specifies a suffix to the session id if multiple variants are run, empty otherwise.
- --logfolder (str, default ''):
The path to the folder where runlogs and comlogs are to be stored, if other than default.
- --log (str, default 'keep'):
Whether to keep ('keep') or remove ('remove') the temporary logs once jobs are completed. When a comma or pipe ('|') separated list is given, the log will be created at the first provided location and then linked or copied to other locations. The valid locations are:
'study' (for the default: <study>/processing/logs/comlogs location)
'session' (for <sessionid>/logs/comlogs)
'hcp' (for <hcp_folder>/logs/comlogs)
'<path>' (for an arbitrary directory).
- --hcp_icafix_bolds (str, default detailed below):
List of bolds on which ICAFix was applied, with the same format as for ICAFix. Typically, this should be identical to the list used in the ICAFix run [same default as for hcp_icafix and hcp_msmall].
- --hcp_resample_concatregname (str, default 'MSMAll'):
Output name of the dedrifted registration.
- --hcp_resample_regname (str, default '<hcp_msmall_outregname>_2_d40_WRN'):
Registration sphere name.
- --hcp_icafix_highpass (int, default detailed below):
Value for the highpass filter, [0] for multi-run HCP ICAFix and [2000] for single-run HCP ICAFix. Should be identical to the value used for ICAFix.
- --hcp_hiresmesh (int, default 164):
High resolution mesh node count.
- --hcp_lowresmeshes (str, default 32):
Low resolution meshes node count. To provide more values separate them with commas.
- --hcp_resample_reg_files (str, default detailed below):
Comma separated paths to the spheres output from the MSMRemoveGroupDrift pipeline [<HCPPIPEDIR>/global/templates/MSMAll/<file1>, <HCPPIPEDIR>/global/templates/MSMAll/<file2>]. Where <file1> is equal to: DeDriftingGroup.L.sphere.DeDriftMSMAll. 164k_fs_LR.surf.gii and <file2> is equal to DeDriftingGroup.R.sphere.DeDriftMSMAll. 164k_fs_LR.surf.gii
- --hcp_resample_maps (str, default 'sulc,curvature,corrThickness,thickness'):
Comma separated paths to maps that will have the MSMAll registration applied that are not myelin maps.
- --hcp_resample_myelinmaps (str, default 'MyelinMap,SmoothedMyelinMap'):
Comma separated paths to myelin maps.
- --hcp_bold_smoothFWHM (int, default 2):
Smoothing FWHM that matches what was used in the fMRISurface pipeline.
- --hcp_matlab_mode (str, default 'compiled'):
Specifies the Matlab version, can be: - 'interpreted' - 'compiled' or - 'octave'.
- --hcp_icafix_domotionreg (bool, default detailed below):
Whether to regress motion parameters as part of the cleaning. The default value after a single-run HCP ICAFix is [TRUE], while the default after a multi-run HCP ICAFix is [FALSE].
- --hcp_resample_dontfixnames (str, default 'NONE'):
A list of comma separated bolds that will not have HCP ICAFix reapplied to them. Only applicable if single-run ICAFix was used. Generally not recommended.
- --hcp_resample_inregname (str, default 'NONE'):
A string to enable multiple fMRI resolutions (e.g._1.6mm).
- --hcp_resample_use_ind_mean (str, default 'YES'):
Whether to use the mean of the individual myelin map as the group reference map's mean.
- --hcp_resample_extractnames (str, default 'NONE'):
List of bolds and concat names provided in the same format as the hcp_icafix_bolds parameter. Defines which bolds to extract. Exists to enable extraction of a subset of the runs in a multi-run HCP ICAFix group into a new concatenated series.
- --hcp_resample_extractextraregnames (str, default 'NONE'):
Extract multi-run HCP ICAFix runs for additional surface registrations, often MSMSulc
- --hcp_resample_extractvolume (str, default 'NONE'):
Whether to also extract the specified multi-run HCP ICAFix from the volume data, requires hcp_resample_extractnames to work.
- --hcp_msmall_templates (str, default <HCPPIPEDIR>/global/templates/MSMAll):
Path to directory containing MSMAll template files.
- --hcp_msmall_myelin_target (str, default 'Q1-Q6_RelatedParcellation210.MyelinMap_BC_MSMAll_2_d41_WRN_DeDrift.32k_fs_LR.dscalar.nii'):
Myelin map target, will use Q1-Q6_RelatedParcellation210.MyelinMap_BC_MSMAll_2_d41_WRN_DeDrift.32k_fs_LR.dscalar.nii by default.
Output files
The results of this step will be populated in the MNINonLinear folder inside the same session's root hcp folder.
Notes
- Mapping of QuNex parameters onto HCP Pipelines parameters:
Below is a detailed specification about how QuNex parameters are mapped onto the HCP Pipelines parameters.
hcp_dedrift_and_resample parameter mapping:
QuNex parameter
HCPpipelines parameter
hcp_resample_concatregname
concat-reg-name
hcp_resample_regname
registration-name
hcp_icafix_highpass
high-pass
hcp_hiresmesh
high-res-mesh
hcp_lowresmeshes
low-res-meshes
hcp_resample_reg_files
dedrift-reg-files
hcp_resample_maps
maps
hcp_resample_myelinmaps
myelin-maps
hcp_bold_smoothFWHM
smoothing-fwhm
hcp_matlab_mode
matlab-run-mode
hcp_icafix_domotionreg
motion-regression
hcp_msmall_myelin_target
myelin-target-file
hcp_resample_dontfixnames
dont-fix-names
hcp_resample_inregname
input-reg-name
hcp_resample_extractnames
multirun-fix-extract-names
hcp_resample_extractnames
multirun-fix-extract-concat-names
hcp_resample_extractextraregnames
multirun-fix-extract-extra-regnames
hcp_resample_extractvolume
multirun-fix-extract-volume
hcp_resample_use_ind_mean
use-ind-mean
Examples
HCP DeDriftAndResample after application of single-run ICAFix:
qunex hcp_dedrift_and_resample \ --batchfile=processing/batch.txt \ --sessionsfolder=sessions \ --hcp_icafix_bolds="REST_1,REST_2,TASK_1,TASK_2" \ --hcp_matlab_mode="interpreted"
HCP DeDriftAndResample after application of multi-run ICAFix:
qunex hcp_dedrift_and_resample \ --batchfile=processing/batch.txt \ --sessionsfolder=sessions \ --hcp_icafix_bolds="GROUP_1:REST_1,REST_2,TASK_1|GROUP_2:REST_3,TASK_2" \ --hcp_matlab_mode="interpreted"