ASL Prep JSON Files Background Suppression

Hello!

I am trying to run ASL Prep and am having some trouble getting my json files to pass the BIDS validator. Specifically I get the error that the BackgroundSuppression and BolusCutOffFlag should be boolean. When I follow the guidance at this link GitHub - PennLINC/aslbids: New asl bids conversion it says the Background Suppression value should be Yes or No. I have tried entering No, 0, and False, all of which yield the same error as above. Any advice would be greatly appreciated!

Thanks!
Emily

For JSONs, the boolean flags are true and false. Can you try changing it to false and then rerun the validator?

That worked, thank you!

Hello!

I am now encountering another similar BIDS issue. The ArterialSpinLabelingType is PASL, when I include the LabelingDuration in the json file I get the following BIDS validator error:

[ERR] You defined one of the not allowed fields in case of PASL ‘ArterialSpinLabelingType’. Please verify which field among ‘CASLType’, ‘PCASLType’ ‘LabelingPulseAverageGradient’, ‘LabelingPulseMaximumGradient’, ‘LabelingPulseAverageB1’, ‘LabelingPulseDuration’, ‘LabelingPulseFlipAngle’, ‘LabelingPulseInterval’, ‘LabelingDuration’ you have filled. (code: 190 - PASL_NOT_ALLOWED_FIELDS)

So I removed Labeling Duration from the json file (it is the only one of the not allowed fields that I had included). However, once I do this I get the below error:

“Metadata term {!r} unavailable for file {}.”.format(key, self._source_file))
KeyError: "Metadata term ‘LabelingDuration’ unavailable

Any suggestions would be greatly appreciated!

Emily

Does the second error come from the validator or from something else? Can you share the full traceback?

The second error does not come from the BIDS validator, when I remove the Labeling duration it does pass the BIDS validator. Below is the full traceback:

Running ASLPREP version 0.2.8:
* BIDS dataset path: /data/rawdata.
* Participant list: [‘2001’].
* Run identifier: 20230412-144330_cc36e934-3f7e-4755-bb87-dc72bdd5dfc3.
* Output spaces: MNI152NLin2009cAsym:res-native.
230412-14:45:33,688 nipype.workflow INFO:
No single-band-reference found for sub-2001_ses-01_asl.nii.gz.
Process Process-2:
Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/utils.py”, line 17, in getitem
return super().getitem(key)
KeyError: ‘LabelingDuration’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.7/multiprocessing/process.py”, line 297, in _bootstrap
self.run()
File “/usr/local/miniconda/lib/python3.7/multiprocessing/process.py”, line 99, in run
self._target(*self._args, **self._kwargs)
File “/usr/local/miniconda/lib/python3.7/site-packages/aslprep/cli/workflow.py”, line 80, in build_workflow
retval[“workflow”] = init_aslprep_wf()
File “/usr/local/miniconda/lib/python3.7/site-packages/aslprep/workflows/base.py”, line 53, in init_aslprep_wf
single_subject_wf = init_single_subject_wf(subject_id)
File “/usr/local/miniconda/lib/python3.7/site-packages/aslprep/workflows/base.py”, line 277, in init_single_subject_wf
asl_preproc_wf = init_asl_preproc_wf(asl_file)
File “/usr/local/miniconda/lib/python3.7/site-packages/aslprep/workflows/asl/base.py”, line 528, in init_asl_preproc_wf
metadata=metadata)
File “/usr/local/miniconda/lib/python3.7/site-packages/aslprep/workflows/asl/cbf.py”, line 114, in init_cbf_compt_wf
basilcbf = pe.Node(BASILCBF(m0scale=M0Scale, bolus=metadata[“LabelingDuration”],
File “/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/utils.py”, line 20, in getitem
“Metadata term {!r} unavailable for file {}.”.format(key, self._source_file))
KeyError: “Metadata term ‘LabelingDuration’ unavailable for file /data/rawdata/sub-2001/ses-01/perf/sub-2001_ses-01_asl.nii.gz.”

Ah, I see. That was a bug in ASLPrep that should be fixed in the most recent release (0.3.0). However, I have had to temporarily disable multi-PostLabelingDelay support, along with Q2TIPS support. I will hopefully be able to fix issues related to those two paradigms for the next release.

Got it, I will test out 0.3.0, thank you!

1 Like

Hello! I am encountering another ASL prep/json related issue —
I have gotten my script to start running and everything passes the BIDS validator, but it runs for about 10-20 minutes, then throws the following error
elif metadata[“BolusCutOffTechnique”] == “QUIPSS”:
KeyError: ‘BolusCutOffTechnique’
I have my BolusCutOffFlag set to false, so I did not include the BolusCutOffTechnique in my json file. Any advice on how to fix this error would be greatly appreciated! Thanks!

@Emily_DeLuca ASLPrep doesn’t currently support PASL without a bolus cutoff method. However, I’m happy to work on implementing that if it’s a priority. Could you open an issue in the repository requesting this?

1 Like

@tsalo We figured out that the PASL does use a bolus cutoff method, thanks!

1 Like