[RESOLVED] Running hcp_fmri_volume with Legacy Style Data

Hi,

I am using legacy style data to run “hcp_fmri_volume”, but it comes out a strange error:

Session id: FCS_035_AMC1 
[started on Thursday, 17. April 2025 05:27:13]
Running HCP fMRI Volume pipeline [LegacyStyleData] ... 
ERROR: Unknown error occured: 
...................................
Traceback (most recent call last):
  File "/opt/qunex/python/qx_utilities/hcp/process_hcp.py", line 4576, in hcp_fmri_volume
    hcp = getHCPPaths(sinfo, options)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/qunex/python/qx_utilities/hcp/process_hcp.py", line 170, in getHCPPaths
    raise ge.CommandFailed(
general.exceptions.CommandFailed: Error 'No sufficient input data, perhaps you did not provide the batch file?' occured in hcp_fmri_volume
...................................


HCP fMRIVolume completed on Thursday, 17. April 2025 05:27:13
------------------------------------------------------------
ERROR: HCP path does not exists, check your parameters and the batch file!
ERROR: HCP path does not exists, check your parameters and the batch file!
ERROR: HCP path does not exists, check your parameters and the batch file!
ERROR: HCP path does not exists, check your parameters and the batch file!
ERROR: HCP path does not exists, check your parameters and the batch file!
ERROR: HCP path does not exists, check your parameters and the batch file!
ERROR: HCP path does not exists, check your parameters and the batch file!

------------------------------------------------------------

My full command is:

qunex_container hcp_fmri_volume \
          --sessionsfolder="${WORK_DIR}/${STUDY_NAME}/sessions" \
	  --batchfile="${WORK_DIR}/${STUDY_NAME}/processing/batch.txt" \
	  --parsessions="${PARSES}" \
          --hcp_bold_topupconfig="b02b0.cnf" \
          --hcp_bold_sephaseneg="AP" \
	  --hcp_bold_unwarpdir="PA=y" \
	  --hcp_bold_res="2" \
	  --hcp_bold_doslicetime="FALSE" \
          --hcp_processing_mode="LegacyStyleData" \
	  --hcp_bold_dcmethod="NONE" \
          --bind="/hdd1:/hdd1" \
          --container="${QUNEX_CONTAINER}";

Could you help me find out what is the reason for this error? Always thanks for your kindly help!
script_hcp_fmri_volume_2025.04.17-13.27.11.txt (229.6 KB)

Best,
Acacius

Hi Acacius,

At a glance it seems like na issue with your batch file. Could you upload

/mnt/hdd1/yumingz/code/processing/batch.txt

Thanks!

Best, Jure

Sure, here it is:
batch.txt (727.3 KB)

Best,
Acacius

Did commands before hcp_fmri_volume work fine with the same batch file? Please paste one of those commands, maybe the last one - hcp_post_freesurfer.

One thing that sticks out is that you are binding /hdd1 but the correct path is /mnt/hdd1/yumingz/...?

I also see you are using a parameter-less batch file. On paper this is fine, but we most often do not run commands like this, so there might be some hidden bugs there.

If the above binding conundrum does not resolve the issue, I will dig deeper.

Best, Jure

Hi, Jure

Sorry for the late reply. Yes, the commands before hcp_fmri_volume work fine with the same batch file:

                qunex_container hcp_post_freesurfer \
                    --sessionsfolder="${WORK_DIR}/${STUDY_NAME}/sessions" \
                    --batchfile="${WORK_DIR}/${STUDY_NAME}/processing/batch.txt" \
                    --parsessions="${PARSES}" \
                    --hcp_processing_mode="${hcp_processing_mode}" \
                    --hcp_t2="${hcp_t2}" \
		    --hcp_regname="MSMSulc" \
	 	    --hcp_grayordinatesres="2" \
		    --hcp_hiresmesh="164" \
		    --hcp_lowresmesh="32" \
                    --bind="${WORK_DIR}:${WORK_DIR}" \
                    --container="${QUNEX_CONTAINER}" \
                    --overwrite="no"

I have try to modified the bind path from /hdd… to “${WORK_DIR}:${WORK_DIR}” , however it still have some errors:

			qunex_container hcp_fmri_volume \
          --sessionsfolder="${WORK_DIR}/${STUDY_NAME}/sessions" \
			    --batchfile="${WORK_DIR}/${STUDY_NAME}/processing/batch.txt" \
			    --parsessions="${PARSES}" \
          --hcp_bold_topupconfig="b02b0.cnf" \
          --hcp_bold_sephaseneg="AP" \
			    --hcp_bold_unwarpdir="PA=y" \
			    --hcp_bold_res="2" \
			    --hcp_bold_doslicetime="FALSE" \
          --hcp_processing_mode="LegacyStyleData" \
			    --hcp_bold_dcmethod="NONE" \
          --bind="${WORK_DIR}:${WORK_DIR}" \
          --container="${QUNEX_CONTAINER}";

The log files is attached below:
script_hcp_fmri_volume_2025.04.20-16.44.55.txt (209.3 KB)

Thanks for your kindly help!

Best
Acacius

Hi, Jure

I found that the error is similar with the problem that I met before (ref: https://forum.qunex.yale.edu/t/resolved-unknown-error-occur-attributeerror-nonetype-object-has-no-attribute-lower/1246). Could this be the same type of bug?

Best,
Acacius

I just tested this on my end and this is indeed a similar same bug. The issue is that you should be getting a more descriptive error:

ERROR: The hcp_avgrdcmethod parameter needs to be set manually!
Since QuNex cannot robustly extract the information needed to set this
from the data, you need to set this parameter by yourself

So, you need to set hcp_avgrdcmethod parameter:

--hcp_avgrdcmethod (str):
    Averaging and readout distortion correction method.
    Can take the following values:

    - 'NONE' (average any repeats with no readout correction)
    - 'FIELDMAP' (average any repeats and use Siemens field map for
      readout correction)
    - 'SiemensFieldMap' (average any repeats and use Siemens field map
      for readout correction)
    - 'GEHealthCareFieldMap' (average any repeats and use GE field
      map for readout correction)
    - 'GEHealthCareLegacyFieldMap' (average any repeats and use GE field
      map for readout correction, for legacy, combined GE field maps)
    - 'PhilipsFieldMap' (average any repeats and use Philips field map
      for readout correction)
    - 'TOPUP' (average any repeats and use spin echo field map for
      readout correction).

Based on our previous discussions I think NONE is the correct option.

Note that the same holds for the hcp_bold_dcmethod parameter.

Best, Jure

The bug has been now fixed and will be released in the next version. For the time being, please try the above workaraound and let me know how it goes.

Best, Jure

Everything goes well now. Thanks for the help!

Best,
Acacius