Preparing data for ASLPrep

Summary of what happened:

Hi I’m an ASL newbie here. i’ve downloaded the PREVENTAD stage 1 dataset (see https://www.sciencedirect.com/science/article/pii/S2213158221001777)

i would like to preprocess the asl data using ASLprep, but it seems that the asl data is quite far from being BIDS compliant

here are the files for a single subject. I’ve removed the dwi and func folders in this file directory tree

sub-1000173
└── ses-NAPBL00
    ├── anat
    │   ├── sub-1000173_ses-NAPBL00_run-001_T1w.json
    │   └── sub-1000173_ses-NAPBL00_run-001_T1w.nii.gz
    ├── asl
    │   ├── sub-1000173_ses-NAPBL00_run-001_asl.json
    │   └── sub-1000173_ses-NAPBL00_run-001_asl.nii.gz
    ├── fmap
    │   ├── sub-1000173_ses-NAPBL00_run-001_magnitude1.json
    │   ├── sub-1000173_ses-NAPBL00_run-001_magnitude1.nii.gz
    │   ├── sub-1000173_ses-NAPBL00_run-001_magnitude2.json
    │   ├── sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz
    │   ├── sub-1000173_ses-NAPBL00_run-001_phasediff.json
    │   └── sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz
    ├── sub-1000173_ses-NAPBL00_scans.json
    └── sub-1000173_ses-NAPBL00_scans.tsv

and here’s the contents of sub-1000173_ses-NAPBL00_run-001_asl.json

{
   "InitialPostLabelDelay" : 0.9,
   "PulseSequenceType" : "epfid2d1_64  ",
   "EffectiveEchoSpacing" : 0.00020999932800215,
   "PhaseEncodingSteps" : 56,
   "TotalReadoutTime" : 0.0132299576641355,
   "ScanningSequence" : "EP ",
   "SeriesNumber" : 4,
   "SeriesDescription" : "single_echo_pCASL  ",
   "SoftwareVersions" : "syngo MR B17 ",
   "VascularCrushing" : "False",
   "ASLContext" : "(Label-Control)*40",
   "SequenceName" : "epfid2d1_64  ",
   "LabelingDuration" : 1.5,
   "MRAcquisitionType" : "2D ",
   "EchoTime" : 0.01,
   "SAR" : 0.37847380390632,
   "ManufacturerModelName" : "TrioTim  ",
   "FlipAngle" : 90,
   "MagneticFieldStrength" : 3,
   "DeviceSerialNumber" : "35442  ",
   "SliceOrder" : "ascending ",
   "M0" : {
      "WithinASL" : "False"
   },
   "RepetitionTime" : 4,
   "ProtocolName" : "single_echo_pCASL  ",
   "ReceiveCoilName" : "32Ch_Headad\\\\  ",
   "SliceThickness" : 7,
   "AcquisitionNumber" : 1,
   "PixelBandwidth" : 3005,
   "InPlanePhaseEncodingDirectionDICOM" : "COL  ",
   "SliceTiming" : [
      0,
      0.0325,
      0.065,
      0.095,
      0.1275,
      0.16,
      0.19,
      0.2225,
      0.2525,
      0.285,
      0.3175,
      0.3475,
      0.38,
      0.41250000001,
      0.4425,
      0.47500000001
   ],
   "LabelingType" : "PCASL",
   "SequenceVariant" : "SK ",
   "ImagingFrequency" : 123.251308,
   "PatientPosition" : "HFS  ",
   "BackgroundSuppression" : "False",
   "PercentPhaseFOV" : 100,
   "ImageOrientationPatientDICOM" : [
      "0.99880415442019",
      "-0.0316933672272",
      "0.03722622176328",
      "0.02569754867831",
      "0.98808539578647",
      "0.15174612556969  "
   ],
   "PhaseEncodingDirection" : "j-",
   "Manufacturer" : "SIEMENS  ",
   "ImageType" : [
      "ORIGINAL",
      "PRIMARY",
      "M",
      "ND",
      "MOSAIC "
   ],
   "EchoNumber" : 1,
   "Modality" : "MRI__ "
}

may i know what needs to be done in order to preprocess the data with ASLprep?

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

singularity run --cleanenv \
-B /usr/local/freesurfer-7.4.1/license.txt:/opt/freesurfer/license.txt,$bids_dir,$output_dir,$work_dir \
$HOME/aslprep \
  $bids_dir $output_dir participant -w $work_dir \
  --output-spaces MNI152NLin6Asym \
  --cifti-output 91k \
  --participant-label 1002928 \
  --nthreads 1 --omp-nthreads 1 --md-only-boilerplate

Version:

25.1.0

Environment (Docker, Singularity / Apptainer, custom installation):

Singularity

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

bids validation was run outside of aslprep with bids-validator-deno

    [WARNING] README_FILE_MISSING The recommended file /README is missing.
See Section 03 (Modality agnostic files) of the BIDS specification.
                /dataset_description.json

        Please visit https://neurostars.org/search?q=README_FILE_MISSING for existing conversations about this issue.

        [WARNING] TOO_FEW_AUTHORS The 'Authors' field of 'dataset_description.json' should contain an array of values -
with one author per value.
This was triggered based on the presence of only one author field.
Please ignore if all contributors are already properly listed.
                /dataset_description.json

        Please visit https://neurostars.org/search?q=TOO_FEW_AUTHORS for existing conversations about this issue.

        [WARNING] EMPTY_DATASET_NAME The Name field of dataset_description.json is present but empty of visible characters.
                /dataset_description.json

        Please visit https://neurostars.org/search?q=EMPTY_DATASET_NAME for existing conversations about this issue.

        [WARNING] JSON_KEY_RECOMMENDED A JSON file is missing a key listed as recommended.
                GeneratedBy
                /dataset_description.json - Field description: Used to specify provenance of the dataset.

                SourceDatasets
                /dataset_description.json - Field description: Used to specify the locations and relevant attributes of all source datasets.
Valid keys in each object include "URL", "DOI" (see
URI (https://bids-specification.readthedocs.io/en/stable/common-principles.md#uniform-resource-indicator)), and
"Version" with
string (https://www.w3schools.com/js/js_json_datatypes.asp)
values.

        Please visit https://neurostars.org/search?q=JSON_KEY_RECOMMENDED for existing conversations about this issue.

        [WARNING] GZIP_HEADER_MTIME The gzip header contains a non-zero timestamp.
This may leak sensitive information or indicate a non-reproducible conversion process.
                /sub-1000173/ses-NAPBL00/asl/sub-1000173_ses-NAPBL00_run-001_asl.nii.gz
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz

                2 more files with the same issue

        Please visit https://neurostars.org/search?q=GZIP_HEADER_MTIME for existing conversations about this issue.

        [WARNING] GZIP_HEADER_FILENAME The gzip header contains a non-empty filename.
This may leak sensitive information or indicate a non-reproducible conversion process.
                /sub-1000173/ses-NAPBL00/asl/sub-1000173_ses-NAPBL00_run-001_asl.nii.gz
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz

                2 more files with the same issue

        Please visit https://neurostars.org/search?q=GZIP_HEADER_FILENAME for existing conversations about this issue.

        [WARNING] NIFTI_UNIT NIfTI file's header field for unit information for x, y, z, and t dimensions is underspecified.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz

                1 more files with the same issue

        Please visit https://neurostars.org/search?q=NIFTI_UNIT for existing conversations about this issue.

        [WARNING] B0_FIELD_IDENTIFIER_RECOMMENDED File is missing B0FieldIdentifier metadata and IntendedFor metadata,
so it will not be possible to use to perform susceptibility distortion correction.
B0FieldIdentifier metadata permits the flexible selection of images
for estimating B0 inhomogeneity fields, and B0FieldSource permits EPI
images to indicate the identifier of the estimated field to use.
                B0FieldIdentifier
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: The presence of this key states that this particular 3D or 4D image MAY be
used for fieldmap estimation purposes.
Each "B0FieldIdentifier" MUST be a unique string within one participant's tree,
shared only by the images meant to be used as inputs for the estimation of a
particular instance of the B<sub>0</sub> field estimation.
It is RECOMMENDED to derive this identifier from DICOM Tags, for example,
DICOM tag 0018, 1030 Protocol Name, or DICOM tag 0018, 0024 Sequence Name
when the former is not defined (for example, in GE devices.)
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude1.nii.gz - Field description: The presence of this key states that this particular 3D or 4D image MAY be
used for fieldmap estimation purposes.
Each "B0FieldIdentifier" MUST be a unique string within one participant's tree,
shared only by the images meant to be used as inputs for the estimation of a
particular instance of the B<sub>0</sub> field estimation.
It is RECOMMENDED to derive this identifier from DICOM Tags, for example,
DICOM tag 0018, 1030 Protocol Name, or DICOM tag 0018, 0024 Sequence Name
when the former is not defined (for example, in GE devices.)

        Please visit https://neurostars.org/search?q=B0_FIELD_IDENTIFIER_RECOMMENDED for existing conversations about this issue.

        [WARNING] SIDECAR_KEY_RECOMMENDED A data file's JSON sidecar is missing a key listed as recommended.
                ManufacturersModelName
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: Manufacturer's model name of the equipment that produced the measurements.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: Manufacturer's model name of the equipment that produced the measurements.

                2 more files with the same issue

                StationName
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: Institution defined name of the machine that produced the measurements.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: Institution defined name of the machine that produced the measurements.

                2 more files with the same issue

                ReceiveCoilActiveElements
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: Information describing the active/selected elements of the receiver coil.
This does not correspond to a tag in the DICOM ontology.
The vendor-defined terminology for active coil elements can go in this field.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: Information describing the active/selected elements of the receiver coil.
This does not correspond to a tag in the DICOM ontology.
The vendor-defined terminology for active coil elements can go in this field.

                2 more files with the same issue

                MatrixCoilMode
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: (If used)
A method for reducing the number of independent channels by combining in
analog the signals from multiple coil elements.
There are typically different default modes when using un-accelerated or
accelerated (for example, "GRAPPA", "SENSE") imaging.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: (If used)
A method for reducing the number of independent channels by combining in
analog the signals from multiple coil elements.
There are typically different default modes when using un-accelerated or
accelerated (for example, "GRAPPA", "SENSE") imaging.

                2 more files with the same issue

                CoilCombinationMethod
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: Almost all fMRI studies using phased-array coils use root-sum-of-squares
(rSOS) combination, but other methods exist.
The image reconstruction is changed by the coil combination method
(as for the matrix coil mode above),
so anything non-standard should be reported.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: Almost all fMRI studies using phased-array coils use root-sum-of-squares
(rSOS) combination, but other methods exist.
The image reconstruction is changed by the coil combination method
(as for the matrix coil mode above),
so anything non-standard should be reported.

                2 more files with the same issue

                PulseSequenceDetails
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: Information beyond pulse sequence type that identifies the specific pulse
sequence used (for example,
"Standard Siemens Sequence distributed with the VB17 software",
"Siemens WIP ### version #.##," or
"Sequence written by X using a version compiled on MM/DD/YYYY").
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: Information beyond pulse sequence type that identifies the specific pulse
sequence used (for example,
"Standard Siemens Sequence distributed with the VB17 software",
"Siemens WIP ### version #.##," or
"Sequence written by X using a version compiled on MM/DD/YYYY").

                2 more files with the same issue

                NonlinearGradientCorrection
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: Boolean stating if the image saved has been corrected for gradient
nonlinearities by the scanner sequence.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: Boolean stating if the image saved has been corrected for gradient
nonlinearities by the scanner sequence.

                2 more files with the same issue

                DwellTime
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: Actual dwell time (in seconds) of the receiver per point in the readout
direction, including any oversampling.
For Siemens, this corresponds to DICOM field 0019, 1018 (in ns).
This value is necessary for the optional readout distortion correction of
anatomicals in the HCP Pipelines.
It also usefully provides a handle on the readout bandwidth,
which isn't captured in the other metadata tags.
Not to be confused with "EffectiveEchoSpacing", and the frequent mislabeling
of echo spacing (which is spacing in the phase encoding direction) as
"dwell time" (which is spacing in the readout direction).
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: Actual dwell time (in seconds) of the receiver per point in the readout
direction, including any oversampling.
For Siemens, this corresponds to DICOM field 0019, 1018 (in ns).
This value is necessary for the optional readout distortion correction of
anatomicals in the HCP Pipelines.
It also usefully provides a handle on the readout bandwidth,
which isn't captured in the other metadata tags.
Not to be confused with "EffectiveEchoSpacing", and the frequent mislabeling
of echo spacing (which is spacing in the phase encoding direction) as
"dwell time" (which is spacing in the readout direction).

                2 more files with the same issue

                InstitutionName
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: The name of the institution in charge of the equipment that produced the
measurements.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: The name of the institution in charge of the equipment that produced the
measurements.

                2 more files with the same issue

                InstitutionAddress
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: The address of the institution in charge of the equipment that produced the
measurements.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: The address of the institution in charge of the equipment that produced the
measurements.

                2 more files with the same issue

                InstitutionalDepartmentName
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.nii.gz - Field description: The department in the institution in charge of the equipment that produced
the measurements.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: The department in the institution in charge of the equipment that produced
the measurements.

                2 more files with the same issue

                EchoTime
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz - Field description: The echo time (TE) for the acquisition, specified in seconds.
Corresponds to DICOM Tag 0018, 0081 (https://dicomlookup.com/dicomtags/(0018,0081)) Echo Time
(please note that the DICOM term is in milliseconds not seconds).
The data type number may apply to files from any MRI modality concerned with
a single value for this field, or to the files in a
file collection (https://bids-specification.readthedocs.io/en/stable/appendices/file-collections.md)
where the value of this field is iterated using the
`echo` entity (https://bids-specification.readthedocs.io/en/stable/appendices/entities.md#echo).

        Please visit https://neurostars.org/search?q=SIDECAR_KEY_RECOMMENDED for existing conversations about this issue.

        [ERROR] JSON_SCHEMA_VALIDATION_ERROR Invalid JSON sidecar file. The sidecar is not formatted according the schema.
                Funding
                /dataset_description.json - must be array

Field description: List of sources of funding (grant numbers).

                MRAcquisitionType
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.json - must be equal to one of the allowed values

Field description: Type of sequence readout.
Corresponds to DICOM Tag 0018, 0023 (https://dicomlookup.com/dicomtags/(0018,0023)) MR Acquisition Type.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.json - must be equal to one of the allowed values

Field description: Type of sequence readout.
Corresponds to DICOM Tag 0018, 0023 (https://dicomlookup.com/dicomtags/(0018,0023)) MR Acquisition Type.

                2 more files with the same issue

        Please visit https://neurostars.org/search?q=JSON_SCHEMA_VALIDATION_ERROR for existing conversations about this issue.

        [ERROR] SCANS_FILENAME_NOT_MATCH_DATASET Filenames in scans.tsv file do not match what is present in the BIDS dataset.
                /sub-1000173/ses-NAPBL00/sub-1000173_ses-NAPBL00_scans.tsv

        Please visit https://neurostars.org/search?q=SCANS_FILENAME_NOT_MATCH_DATASET for existing conversations about this issue.

        [ERROR] NOT_INCLUDED Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore (https://github.com/bids-standard/bids-validator#bidsignore) for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
                /sub-1000173/ses-NAPBL00/asl/

        Please visit https://neurostars.org/search?q=NOT_INCLUDED for existing conversations about this issue.

        [ERROR] HED_ERROR The validation on this HED string returned an error.
                INTERNAL_ERROR
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_magnitude2.json - TypeError: Cannot read properties of null (reading 'HED')
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.json - TypeError: Cannot read properties of null (reading 'HED')

                2 more files with the same issue

        Please visit https://neurostars.org/search?q=HED_ERROR for existing conversations about this issue.

        [ERROR] INTENDED_FOR 'IntendedFor' field needs to point to an existing file.
Files must be subject-relative paths or BIDS URIs.
                /sub-1000173/ses-NAPBL00/fmap/sub-1000173_ses-NAPBL00_run-001_phasediff.nii.gz
                /sub-1000173/ses-NAPBL00/anat/sub-1000173_ses-NAPBL00_run-001_T1w.nii.gz

        Please visit https://neurostars.org/search?q=INTENDED_FOR for existing conversations about this issue.


          Summary:                         Available Tasks:        Available Modalities:
          13 Files, 13.7 MB                                        MRI
          1 - Subjects 1 - Sessions

Relevant log outputs (up to 20 lines):

bids-validator does not appear to be installed
260116-21:29:23,293 nipype.workflow IMPORTANT:
	 Running ASLPrep version 25.1.0

         License NOTICE ##################################################
         ASLPrep 25.1.0
         Copyright 2023 The PennLINC Team and the NiPreps Developers.
         
         This product is primarily developed by the PennLINC team,
         but it is also a part of the NiPreps community.
         
         This product includes software developed by
         the NiPreps Community (https://nipreps.org/).
         
         Portions of this software were developed at the Department of
         Psychology at Stanford University, Stanford, CA, US.
         
         This software is also distributed as a Docker container image.
         The bootstrapping file for the image ("Dockerfile") is licensed
         under the MIT License.
         
         This software may be distributed through an add-on package called
         "Docker Wrapper" that is under the BSD 3-clause License.
         #################################################################
260116-21:29:23,468 nipype.workflow IMPORTANT:
	 Building ASLPrep's workflow:
           * BIDS dataset path: /gekko_home/junhong.yu/testdat.
           * Participant list: ['1000173'].
           * Run identifier: 20260116-212827_25230a85-4f9d-4c9b-a7a2-4606aa24c022.
           * Output spaces: MNI152NLin6Asym:res-native.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /scratch/junhong.yu/PREVENTAD/output/sourcedata/freesurfer.
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/aslprep/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/envs/aslprep/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/aslprep/cli/workflow.py", line 101, in build_workflow
    retval['workflow'] = init_aslprep_wf()
                         ^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/aslprep/workflows/base.py", line 69, in init_aslprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/aslprep/workflows/base.py", line 189, in init_single_subject_wf
    raise RuntimeError(
RuntimeError: No ASL images found for participant 1000173. All workflows require ASL images.

Screenshots / relevant information:


Hi @gerardyu,

Wha does the validator say? Does ASLPrep give you errors? I have re added the Software Support post template to your post so you can provide this information.

Best,
Steven