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

hcp_asl [... processing options]

hcpa [... processing options]

Runs the HCP ASL Pipeline (https://github.com/physimals/hcp-asl).


The code expects the first three HCP preprocessing steps (hcp_pre_freesurfer, hcp_freesurfer and hcp_post_freesurfer) to have been run and finished successfully.


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

--overwrite (str, default 'no'):

Whether to overwrite existing data (yes) or not (no).

--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_gdcoeffs (str, default ''):

Path to a file containing gradient distortion coefficients, alternatively a string describing multiple options (see below) can be provided.

--hcp_asl_mtname (str, default ''):

Filename for empirically estimated MT-correction scaling factors.

--hcp_asl_territories_atlas (str, default ''):

Atlas of vascular territories from Mutsaerts.

--hcp_asl_territories_labels (str, default ''):

Labels corresponding to territories_atlas.

--hcp_asl_cores (int, default 1)

Number of cores to use when applying motion correction and other potentially multi-core operations.

--hcp_asl_use_t1 (flag, optional):

If specified, the T1 estimates from the satrecov model fit will be used in perfusion estimation in oxford_asl. The flag is not set by default.

--hcp_asl_interpolation (int, default 1):

Interpolation order for registrations corresponding to scipy’s map_coordinates function.

--hcp_asl_nobandingcorr (flag, optional):

If this option is provided, MT and ST banding corrections won’t be applied. The flag is not set by default.

Output files

The results of this step will be present in the ASL folder in the sessions's root hcp folder.


Gradient coefficient file specification:

--hcp_gdcoeffs parameter can be set to either "NONE", a path to a specific file to use, or a string that describes, which file to use in which case. Each option of the string has to be divided by a pipe "|" character and it has to specify, which information to look up, a possible value, and a file to use in that case, separated by a colon ":" character. The information too look up needs to be present in the description of that session. Standard options are e.g.:

institution: Yale
device: Siemens|Prisma|123456

Where device is formatted as <manufacturer>|<model>|<serial number>.

If specifying a string it also has to include a default option, which will be used in the information was not found. An example could be:


With the information present above, the file /data/gc/Prisma.conf would be used.

Mapping of QuNex parameters onto HCP ASL pipeline parameters:

Below is a detailed specification about how QuNex parameters are mapped onto the HCP ASL parameters.

QuNex parameter

HCP ASL parameter


















Example run:

qunex hcp_asl \
    --sessionsfolder="<path_to_study_folder>/sessions" \

Run with scheduler, while bumbing up the number of used cores:

qunex hcp_asl \
    --sessionsfolder="<path_to_study_folder>/sessions" \
    --batchfile="<path_to_study_folder>/processing/batch.txt" \
    --hcp_asl_cores="8" \