We’ve been trying to run the hcp_diffusion pipeline using QuNex, but we consistently encounter errors during execution.
All previous steps in the HCP pipeline (PreFreeSurfer, FreeSurfer, and PostFreeSurfer) completed successfully.
The DWI data we use was acquired using these protocols:
(1) dMRI_MB4_185dirs_d15D45_AP
(2) dMRI_MB4_6dirs_d15D45_PA
(3) two SBRef scans
We use FSL version is 6.0.7.1 and run it on an external Docker version 18.09.2, build 6247962.
We keep getting error messages.
we’ve tried to run the hcp_diffusion command both with --hcp_nogpu flag and without it.
From the log files, it appears that the PreEddy step completes , but the pipeline fails during run_eddy.sh .
This is the section of the log where things begin to go wrong:
To use CUDA/GPU for processing, you have to add a --nv flag to the qunex_container call. This will give the container access to the GPU. On some systems this does not work, you can also try --cuda flag which does things a bit differently. The werid symbols in the error log are probably because of issues related to that.
As outlined in the log file:
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: Wrong Input! No pairs of phase encoding directions have been found!
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: Wrong Input! No pairs of phase encoding directions have been found!
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: At least one pair is needed!
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: At least one pair is needed!
Your data is not HCP compliant. HCP Diffusion processing needs to have at least one pair of images. Pair being pos+neg images with the same dir count. In your case you do not have this, dir count missmatches (6 vs 185). For such processing, we offer the dwi_legacy_gpu command which works on a single diffusion image.
In the past, we used HCP-pipeline scripts to run the entire DWI preprocessing (including TOPUP) on a dMRI dataset with the exact same number of volumes in each direction as the current one. That was before we started working with QuNex. Is there possibly a workaround we can use, with QuNex, to run the TOPUP correction?
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: Wrong Input! No pairs of phase encoding directions have been found!
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: Wrong Input! No pairs of phase encoding directions have been found!
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: At least one pair is needed!
Mon Jun 30 09:26:10 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: At least one pair is needed!
are not printed out by QuNex, but by the HCP pipelines. The constraints that you have a full POS+NEG pair with the same number of dirs is on their end. I am not familiar with the exact details of this constraint, but as they are printing ERROR not WARNING this is something that probably should not be ignored as the results are probably invalid.
You are saying that you ran the exact same data as you have right now through their Diffusion pipeline? It could be that they added this error check for exactly this reason. I guess you could by pass it by renaming 10002_DWI_dir6_PA.nii.gz to 10002_DWI_dir185_PA.nii.gz. But like I said there is probably a solid reason that HCP folks are not allowing such processing.
The error check above was added to HCP Pipelines approximately a year and a half ago. Maybe you processed your similar data before that point when HCP pipelines did not have this check in place?
I did (it was 2021), and it worked perfectly. I will have to look forward into this.
If you have any more ideas on how I can carry on with the preprocessing with the TOPUP correction (which is an essential part of our image preprocessing), please let me know.
I just saw your post on the HCP users group. I am not and expert on diffusion processing, sorry for that. Per M. Harms’ suggestions, you might be able to process the data after all.
To set --combine-data-flag=2 set --hcp_dwi_combinedata=2 in the QuNex call.
Furthermore, the QuNex flag --hcp_dwi_selectbestb0 will set --select-best-b0 on the HCP side.
Maybe try first with the no GPU mode to check if this works without using the GPU and then once you are sure that all is good you can try also with the GPU mode (add --nv flag to the qunex_container call here).
You do not need the mappingfile parameter that is from a completely different command.
EMPTY is inserted since that is the correct way to use HCP Diffusion pipelines. When there is no Pos/Neg pair, you are supposed to insert EMPTY for the missing one.
The outgoing call to HCP Pipelines looks OK. There is still the error of missing pairs:
Mon Jul 7 06:39:26 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: Wrong Input! No pairs of phase encoding directions have been found!
Mon Jul 7 06:39:26 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: Wrong Input! No pairs of phase encoding directions have been found!
Mon Jul 7 06:39:26 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: At least one pair is needed!
Mon Jul 7 06:39:26 EDT 2025:DiffPreprocPipeline_PreEddy.sh: ERROR: At least one pair is needed!
So this might be an issue on the HCP side. Let me add this info tn the HCP users group post.
Hello, I have run into this same issue and have added to the thread in the HCP users group to inquire on whether a solution has been found. I wanted to include a note with a link to that thread here in case it’s helpful for others who also run into this in the future.
Using the hcp_dwi_*data didn’t seem to do anything for me - at one point i jsut set them to random strings and it didn’t change anything. The solution ended up being to make sure that I had “paired” nii.gzs in my data dir / hcp mapping file (e.g. 0223_DWI_dir0_AP and 0223_DWI_dir0_PA, in addition to the 0223_DWI_dir139_AP file), and qunex seemed to detect the pairs automatically then.