hcp_post_fix#

qx_utilities.hcp.process_hcp.hcp_post_fix(sinfo, options, overwrite=False, thread=0)#

hcp_post_fix [... processing options]

Runs the PostFix step of HCP Pipeline (PostFix.sh).

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>_hp<highpass>_clean.nii.gz

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.

--parelements (int, default 1):

How many elements (e.g. bolds) 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.

--hcp_icafix_bolds (str, default ''):

Specify a list of bolds for ICAFix. You should specify how to group/concatenate bolds together along with bolds, e.g. "<group1>:<boldname1>,<boldname2>| <group2>:<boldname3>,<boldname4>", in this case multi-run HCP ICAFix will be executed, which is the default. Instead of full bold names, you can also use bold tags from the batch file. If this parameter is not provided ICAFix will bundle all bolds together and execute multi-run HCP ICAFix, the concatenated file will be named fMRI_CONCAT_ALL. Alternatively, you can specify a comma separated list of bolds without groups, e.g. "<boldname1>,<boldname2>", in this case single-run HCP ICAFix will be executed over specified bolds. This is a legacy option and not recommended.

--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.

--hcp_matlab_mode (str, default default detailed below):

Specifies the Matlab version, can be 'interpreted', 'compiled' or 'octave'. Inside the container 'compiled' will be used, outside 'interpreted' is the default.

--hcp_postfix_dualscene (str, default ''):

Path to an alternative template scene, if empty HCP default dual scene will be used.

--hcp_postfix_singlescene (str, default ''):

Path to an alternative template scene, if empty HCP default single scene will be used.

--hcp_postfix_reusehighpass (bool, default True):

Whether to reuse highpass.

Output files

The results of this step will be generated and populated in the MNINonLinear folder inside the same sessions's root hcp folder.

The final output files are:

MNINonLinear/Results/<boldname>/
<session id>_<boldname>_hp<highpass>_ICA_Classification_singlescreen.scene

where highpass is the used value for the highpass filter. The default highpass value is 0 for multi-run HCP ICAFix and 2000 for single-run HCP ICAFix.

Notes

Runs the PostFix step of HCP Pipeline (PostFix.sh). This step creates Workbench scene files that can be used to visually review the signal vs. noise classification generated by ICAFix.

If the hcp_icafix_bolds parameter is not provided ICAFix will bundle all bolds together and execute multi-run HCP ICAFix, the concatenated file will be named fMRI_CONCAT_ALL. WARNING: if session has many bolds such processing requires a lot of computational resources.

hcp_post_fix parameter mapping:

QuNex parameter

HCPpipelines parameter

hcp_icafix_highpass

high-pass

hcp_postfix_singlescene

template-scene-single-screen

hcp_postfix_dualscene

template-scene-dual-screen

hcp_postfix_reusehighpass

reuse-high-pass

hcp_matlab_mode

matlabrunmode

Examples

qunex hcp_post_fix \
    --batchfile=processing/batch.txt \
    --sessionsfolder=sessions \
    --hcp_matlab_mode="interpreted"
qunex hcp_post_fix \
    --batchfile=processing/batch.txt \
    --sessionsfolder=sessions \
    --hcp_icafix_bolds="GROUP_1:BOLD_1,BOLD_2|GROUP_2:BOLD_3,BOLD_4" \
    --hcp_matlab_mode="interpreted"