Summary of what happened:
can't find T1w images when pointing to fMRIprep derivatives folder? More than 1 session folder per subject · Issue #454 · PennLINC/aslprep · GitHub - also posted here, but including here if anyone has any advice…
I have 3 sessions per subject (for example)
sub-lsa123
-ses-01
-ses-02
-ses-03
sub-lsa146
-ses-01
-ses-02
-ses-03
Aslprep is forcing me to point specifically to the subject and session rather than the larger fmriprep output folder because when I try to point asl to the top of my fmriprep output folder it pulls all the T1w images in for each session and errors. This happens even when I try to use a bidsfilter file to specify the session.
This inputs all three session T1w images and errors
--derivatives /scratch/06953/jes6785/fmriprep_asl_ref
So currently, I am using bids filter file to process each session of asl data separately and pointing to the subject and session specific fmriprep output like this…
--derivatives /scratch/06953/jes6785/fmriprep_asl_ref2/sub-lsa123/ses-02
This pulls the output from fMRIprep anatomy folders into the aslprep/sub-lsa123/ses-02/anat/ folder but I am still getting an error that it can’t find the T1w images??? I don’t understand.
Command used (and if a helper script was used, a link to the helper script or the command generated):
module load tacc-apptainer
BIDS_DIR="/scratch/06953/jes6785/short_cal"
ASL_OUTPUT="${BIDS_DIR}/asl_prep"
SUB="lsa123"
SESSION="02"
#SUB_LIST=("a006" "a008")
DEP=""
STUDY_NAME="project_laser"
# Create output directory if it doesn't exist
#THIS DIRECTORY SHOULD BE /work/06950/jalmeida/CONTAINERS/fmriprep_23.1.3.sif - but I can't write into this one
ASLPREP_CONTAINER="/work/06953/jes6785/Containers/aslprep_0.7.2.sif" # this is where you docker for singularity .sif lives
FSL_LICENSE_DIR="/scratch/06953/jes6785/license.txt" # location of your FSL license, see documentation, needed for fMRI prep to run
FREESURFER_LOCATION="/scratch/06953/jes6785/fmriprep_asl_ref" # This is wherever you have fMRIprep output folder - looks for a sourcedata/freesurfer folder and outputs are there are no differences in outputs for each session here
FMRIPREP_ANAT_LOCATION="/scratch/06953/jes6785/fmriprep_asl_ref2/sub-${SUB}/ses-${SESSION}" # you have to point directly to the session location because ASL prep will input all the sessions otherwise
BIDS_FILTER="/scratch/06953/jes6785/short_cal/ses_${SESSION}.json"
WORK="/scratch/06953/jes6785/work" # Wherever you want the intermediate data processed
# NO CHNAGES NECESSARY BELOW HERE
#----------------------------------------------------------------------------------------------------------------------
mkdir -p "$ASL_OUTPUT"
apptainer run -e
"$ASLPREP_CONTAINER"
"${BIDS_DIR}"
"${ASL_OUTPUT}"
participant
--participant-label "${SUB}"
--fs-license-file "${FSL_LICENSE_DIR}"
--skip_bids_validation
--derivatives "${FMRIPREP_ANAT_LOCATION}"
--bids-filter-file "${BIDS_FILTER}"
--basil
--scorescrub
-w "${WORK}"
Version:
- ASLPrep version: aslprep_0.7.2
- Apptainer version: 1.1.8-2.el8
Environment (Docker, Singularity / Apptainer, custom installation):
Apptainer
Data formatted according to a validatable standard? Please provide the output of the validator:
PASTE VALIDATOR OUTPUT HERE
Relevant log outputs (up to 20 lines):
Error File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node bidssrc.
Traceback:
Traceback (most recent call last):
File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 397, in run
runtime = self._run_interface(runtime)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/aslprep/interfaces/bids.py", line 68, in _run_interface
raise FileNotFoundError(
FileNotFoundError: No T1w images found for subject sub-lsa123
241030-16:03:32,84 cli ERROR:
Preprocessing did not finish successfully. Errors occurred while processing data from participants: lsa123 (1). Check the HTML reports for details.