Summary of what happened:
Hello,
I am using ASLprep to process PASL data. I have a separate M0 scan to my asl scan, but I am getting this error: File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/aslprep/utils/bids.py", line 100, in collect_run_data raise FileNotFoundError(f'M0 file for {asl_file} not found.') FileNotFoundError: M0 file for /(includes whole pathway)/sub-003S4288/ses-init/perf/sub-003S4288_ses-init_acq-2000_asl.nii.gz not found.
Command used
# --- Pathways ---
sASL="singularity run --cleanenv \
-B (rest of pathway) \
-B /(rest of pathway)/templateflow:/templateflow \
--env TEMPLATEFLOW_HOME=/templateflow \
/(pathway)/mycontainers/aslprep-0.7.5.sif"
freesurfer_license="/(pathway)/freesurfer_license/license.txt"
input_dir="/(rest of pathway)/BIDS"
output_dir="/(rest of pathway)/BIDS/derivatives"
# --- Participant ID ---
participant_id=$1
# --- ASLprep call ---
$sASL \
$input_dir \
$output_dir \
participant \
--participant-label ${participant_id} \
--fs-license-file $freesurfer_license \
--skip-bids-validation \
--basil \
--scorescrub \
-w /(rest of pathway)/work/aslprep/sub-${participant_id} \
--omp-nthreads 2 --nthreads 4
Version:
aslprep-0.7.5
Environment (Docker, Singularity / Apptainer, custom installation):
Singularity, downloaded on bash.
Data formatted according to a validatable standard? Please provide the output of the validator:
Passes validator. This is the tree:
sub-003S4288
└── ses-init
├── anat
│ ├── sub-003S4288_ses-init_T1w.json
│ └── sub-003S4288_ses-init_T1w.nii.gz
├── dwi
│ ├── sub-003S4288_ses-init_dwi.bval
│ ├── sub-003S4288_ses-init_dwi.bvec
│ ├── sub-003S4288_ses-init_dwi.json
│ └── sub-003S4288_ses-init_dwi.nii.gz
└── perf
├── sub-003S4288_ses-init_acq-2000_aslcontext.tsv
├── sub-003S4288_ses-init_acq-2000_asl.json
├── sub-003S4288_ses-init_acq-2000_asl.nii.gz
├── sub-003S4288_ses-init_acq-2000_m0scan.json
└── sub-003S4288_ses-init_acq-2000_m0scan.nii.gz
Relevant information:
In the asl json it includes:
- "M0Scan": "/(rest ofpathway)/BIDS/sub-003S4288/ses-init/perf/sub-003S4288_ses-init_acq-2000_m0scan.nii.gz",
- "InformedBy": "/(rest ofpathway)/BIDS/sub-003S4288/ses-init/perf/sub-003S4288_ses-init_acq-2000_m0scan.nii.gz",
- "M0Type": "Separate"
And for the M0 json it includes:
"M0Type": "Separate",
"InformedBy": ["bids::/BIDS/sub-003S4288/ses-init/perf/sub-003S4288/ses-init/perf/sub-003S4288_ses-init_acq-2000_asl.nii.gz"],
"IntendedFor": ["bids::sub-003S4288/ses-init/perf/sub-003S4288_ses-init_acq-2000_asl.nii.gz"]
I have tried different formatting, such as with the [bids::], without, etc. I also have tried with and without the ‘Informedby’ for both the asl and m0 json, as I saw it was in the /opt/conda/envs/aslprep/lib/python3.11/site-packages/aslprep/utils/bids.py
script, which is apart of the error.
Are there any other things I could try to fix this error?
Thanks!
Claire