ASLprep using included M0scan images cant work well

Summary of what happened:

I cant run ASLprep using included M0scan images.
I always have the following problem, after two minutes of aslprep running normally.
I configured all the .json files with .tsv files, which are formatted with reference to the bids standard.Also I tried changing the working path and that didn’t solve the problem.

</traits.trait_errors.TraitError: The 'm0scan_mat_files' trait of a _CombineMotionParametersInputSpec instance must be a list of items which are a pathlike object or string representing an existing file or None, but a value of '/wd/aslprep_wf/single_subject_53_wf/asl_preproc_acq_DE_wf/asl_hmc_wf/mcflirt_m0scan/sub-53_acq-DE_asl_reduced_m0scan_mcf.nii.gz.mat/MAT_0000' <class 'str'> was specified.>

Command used (and if a helper script was used, a link to the helper script or the command generated):

singularity run --cleanenv \
	-B $aslprep_wd:/wd \
	-B $BidsDir:/BIDS \
	-B $aslprep_output:/output \
	-B $fs_license:/fs_license \
	-B $fs_dir:/fs_dir \
	-B $templateflow:$templateflow \
	/ibmgpfs/****/****/.singularity/aslprep-0.4.0.simg \
	/BIDS /output participant \
	--participant_label ${subj} \
	-w /wd \
	--fs-license-file /fs_license/license.txt \
	--output-spaces T1w  MNI152NLin6Asym \
	--notrack --verbose \
	--skip-bids-validation \
	--stop-on-first-crash \
	--resource-monitor \
	--basil \
	--ignore sbref fieldmaps \
	--use-syn-sdc \
	--nthreads $nthreads \
	--omp-nthreads $nthreads \
    --mem-mb 160000 \

here is part of my .json

	"ArterialSpinLabelingType":"PCASL",
	"PostLabelingDelay":1.99,
	"BackgroundSuppression":"false",
	"M0Type":"Included",
	"TotalAcquiredPairs":135,
	"LabelingDuration":0.7

and _aslcontext.tsv

volume_type
m0scan
label
control
label
control

Version:

aslprep-0.4.0.simg

Environment (Docker, Singularity, custom installation):

Singularity

Data formatted according to a validatable standard? Please provide the output of the validator:

Relevant log outputs (up to 20 lines):

nipype.workflow WARNING:
	 Error while checking node hash, forcing re-run. Although this error may not prevent the workflow from running, it could indicate a major problem. Please report a new issue at https://github.com/nipy/nipype/issues adding the following information:

	Node: aslprep_wf.single_subject_53_wf.asl_preproc_acq_DE_wf.asl_hmc_wf.combine_motpars
	Interface: aslprep.interfaces.utility.CombineMotionParameters
	Traceback:
Traceback (most recent call last):

  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/plugins/base.py", line 376, in _local_hash_check
    cached, updated = self.procs[jobid].is_cached()

  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 342, in is_cached
    hashed_inputs, hashvalue = self._get_hashval()

  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 548, in _get_hashval
    self._get_inputs()

  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 619, in _get_inputs
    self.set_input(key, deepcopy(output_value))

  File "/usr/local/miniconda/lib/python3.8/site-packages/nipype/pipeline/engine/nodes.py", line 312, in set_input
    setattr(self.inputs, parameter, deepcopy(val))

  File "/usr/local/miniconda/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
    raise TraitError(

traits.trait_errors.TraitError: The 'm0scan_mat_files' trait of a _CombineMotionParametersInputSpec instance must be a list of items which are a pathlike object or string representing an existing file or None, but a value of '/wd/aslprep_wf/single_subject_53_wf/asl_preproc_acq_DE_wf/asl_hmc_wf/mcflirt_m0scan/sub-53_acq-DE_asl_reduced_m0scan_mcf.nii.gz.mat/MAT_0000' <class 'str'> was specified.

Screenshots / relevant information:

Hi @Zhilin,

Thanks for reporting this. It looks like this is possibly fixed in Fix CombineMotionParameters to support single-volume volume types by tsalo · Pull Request #316 · PennLINC/aslprep · GitHub. Would you mind trying out 0.5.0 to see if that works?

1 Like

In fact, a while back when I was using version 0.4.0, 0.5.0 wasn’t out yet. I am now configuring the latest 0.5.0 environment. I hope it works.
Thanks so much!