[RESOLVED] Hcp_diffusion echospacing parameter not set

Description:
When running hcp_diffusion via turnkey, I got this ‘ERROR: echo-spacing not specified’ despite the parameter being specified in parameter file (attached) in “_hcp_dwi_echospacing” qunex parameter. All other parameters are specified correctly, only “–echospacing” parameter is missing. See:

/opt/HCP/HCPpipelines/DiffusionPreprocessing/DiffPreprocPipeline.sh
–path=“/storage/brno2/home/pe_so/qunex/quickstart/sessions/original/hcp”
–subject=“original”
–PEdir=2
–posData=“/storage/brno2/home/pe_so/qunex/quickstart/sessions/original/hcp/original/unprocessed/Diffusion/original_DWI_dir30_PA.nii.gz”
–negData=“/storage/brno2/home/pe_so/qunex/quickstart/sessions/original/hcp/original/unprocessed/Diffusion/original_DWI_dir30_AP.nii.gz”
–echospacing=“”
–gdcoeffs=“NONE”
–dof=“6”
–b0maxbval=“50”
–combine-data-flag=“1”
–printcom=“”

When I ran the hcp_diffusion command directly I got an error copied bellow.
Call:

  1. via turnkey:

qunex_container run_turnkey
–rawdatainput=“/data”
–dataformat=“DICOM”
–paramfile=“${INPUT_BATCH_FILE}”
–mappingfile=“${INPUT_MAPPING_FILE}”
–workingdir=“${WORK_DIR}”
–projectname=“${STUDY_NAME}”
–path=“${WORK_DIR}/${STUDY_NAME}”
–sessionsfoldername=“sessions”
–sessions=“${SESSIONS_LIST}”
–batchfile=“${WORK_DIR}/batch.txt”
–turnkeytype=“${RUNTURNKEY_TYPE}”
–container=“${HOME}/qunex/qunex_suite-0.93.6.sif”
–turnkeysteps=“${RUNTURNKEY_STEPS}”
–bind=“${RAW_DATA}:/data” \

  1. directly:

qunex_container hcp_diffusion
–batchfile=“/storage/brno2/home/pe_so/qunex/quickstart/processing/batch.txt”
–sessionsfolder=“/storage/brno2/home/pe_so/qunex/quickstart/sessions”
–sessions=“original”
–overwrite=“no”
–parsessions=“1”
–hcp_dwi_echospacing=“0.98”
–hcp_dwi_combinedata=“1”
–hcp_dwi_nogpu
–container=“/storage/brno2/home/pe_so/qunex/qunex_suite-0.93.6.sif”

Logs: when hcp_diffusion ran directly not via turnkey

Generated by QuNex 0.93.6 on 2022-08-10_18.03.32.972711

=================================================================
gmri hcp_diffusion
–sessionsfolder=“/storage/brno2/home/pe_so/qunex/quickstart/sessions”
–parsessions=“1”
–hcp_dwi_echospacing=“0.98”
–hcp_dwi_combinedata=“1”
–hcp_dwi_nogpu=“True”
–batchfile=“/storage/brno2/home/pe_so/qunex/quickstart/processing/batch.txt”
–sessions=“original” \

Starting multiprocessing sessions in original with a pool of 1 concurrent processes

---- Running local

Starting processing of sessions original at Wednesday, 10. August 2022 18:03:32


Session id: original
[started on Wednesday, 10. August 2022 18:03:32]
Running HCP DiffusionPreprocessing Pipeline [HCPStyleData] …
ERROR: Unknown error occured:

Traceback (most recent call last):
File “/opt/qunex/python/qx_utilities/hcp/process_hcp.py”, line 2161, in hcp_diffusion
hcp = getHCPPaths(sinfo, options)
File “/opt/qunex/python/qx_utilities/hcp/process_hcp.py”, line 114, in getHCPPaths
hcpbase = os.path.join(sinfo[‘hcp’], sinfo[‘id’] + options[‘hcp_suffix’])
KeyError: ‘hcp’

Many thanks for help.
Best,
Petr
dwi_parameters.txt (2.7 KB)

Hi, I assume that the session you are working on was successfully ran through the three FreeSurfer steps of HCP Pipelines?

The hcp_diffusion pipeline tries to first use the image specific echospacing parameter which is extracted from the batch file. If the information is not found in there it then uses the value defined by hcp_dwi_echospacing.

It seems like there might be some issues in your batch file. Could you please upload these files generated by QuNex:

  • the used batch.txt file,
  • comlogs from failed commands (both run_turnkey and hcp_diffusion),
  • runlogs from failed commands (both run_turnkey and hcp_diffusion).

Please upload full files, just attach them to your post. Also, please put code and outputs between triple backticks when posting here, it makes everything much easier to read, e.g.:

will look like

/opt/HCP/HCPpipelines/DiffusionPreprocessing/DiffPreprocPipeline.sh
–path=“/storage/brno2/home/pe_so/qunex/quickstart/sessions/original/hcp”
–subject=“original”
–PEdir=2

Thanks!

Hi Jure,
I am sorry for delayed reply. I spotted a typo in the batch file and echospacing parameter is set corretly now. However, I am getting some errors while running hcp_diffusion. HCP_pre_freesurfer finished with no errors.

I am attaching batch, comlog and runlog.

Issues start at row 302 in comlog in TOPUP, I am not able to say what happened there.
Another error is related to nodif_brain_mask during EDDY and FLIRT (rows 389 and 449 in comlog)

Thank you for your kind help. Petr

error_hcp_diffusion_1003_2022-08-15_14.07.10.773758.log (36.5 KB)
Log-hcp_diffusion-2022-08-15_13.52.16.224022.log (5.5 KB)
batch.txt (3.2 KB)

You say that you completed hcp_pre_freesurfer. Did you also complete hcp_freesurfer and hcp_post_freesurfer. Those two are also mandatory steps in the whole HCP FreeSurfer pipeline?

Later errors (e.g. lines 389 and 449) are most likely related to the first one (line 300). The issue is Topup: msg=topup_clp::topup_clp: Subsampling levels incompatible with image data. It seems like an input data/parameter issue.

Hi Jure,
thank you for your reply. I found my data has an odd size in one direction so --hcp_dwi_even_slices flag did the trick. Also, using alternative topup config files solves the error (changes subsampling)

Thank you once again, Petr