Summary of what happened:
My colleague ran qsiprep successfully, but qsirecon is not writing most of its output to derivatives.
Command used (and if a helper script was used, a link to the helper script or the command generated):
export SIF=${SIF:-/contrib/singularity/shared/neuroimaging}
# Which container do you want to run
export APP=${SIF}/qsiprep_v0.21.2.sif
# Define variables to point to the directories you want to work in
# bids and derivatives directories are siblings in this scheme under a directory referred to as MRIS
export MRIS=/groups/akielar/analysis3
export DATA=${MRIS}/nifti
# Define the output directories used by this app:
# The qsirecon dir will be created under this dir:
export APP_DERIV_DIR=${MRIS}/derivatives
# This is the location of the qsiprep output
export APP_PREP_DERIV_DIR=${MRIS}/derivatives/qsiprep
# If you've run fmriprep, you may have a freesurfer directory.
# qsirecon can use that.
export FREESURFER_DIR=${MRIS}/derivatives/fmriprep/sourcedata/freesurfer
# define a unique work dir to separate recon from prep work
export WORK_DIR=${MRIS}/qsirecon_work
export RECON_SPEC=pyafq_tractometry
# Just to be safe, create the derivatives subdirectory if it does not exist.
if [ ! -d ${APP_DERIV_DIR} ]; then
mkdir -p ${APP_DERIV_DIR}
fi
# Just to be safe, create the work directory if it does not exist.
# This should be outside the bids input dir.
if [ ! -d ${WORK_DIR} ]; then
mkdir ${WORK_DIR}
fi
##############
apptainer run --cleanenv \
--bind ${DATA}:/data:ro \
--bind ${APP_PREP_DERIV_DIR}:/qsiprep-output:ro \
--bind ${APP_DERIV_DIR}:/out \
--bind ${WORK_DIR}:/work \
${APP} /data /out participant \
--participant_label ${Subject} \
--recon-input /qsiprep-output \
--recon-spec ${RECON_SPEC} \
--stop-on-first-crash \
--output-resolution 1.3 -w /work -v -v \
--n-cpus 16 --omp-nthreads 15 \
--skip-odf-reports --recon-only \
--fs-license-file ${HOME}/license.txt \
--freesurfer_input ${FREESURFER_DIR}
Version:
qsiprep v0.21.2.dev0+g8fd846e.d20240425
Environment:
HPC SLURM Apptainer
Data formatted according to a validatable standard? Please provide the output of the validator:
Yes, the data validated and successfully ran through qsiprep before trying qsirecon
Relevant SLURM log outputs (up to 20 lines):
[Node] Finished "run_afq", elapsed time 6011.803694s.
IMPORTANT:cli:QSIrecon finished without errors
/opt/conda/envs/qsiprep/lib/python3.10/site-packages/joblib/externals/loky/backend/resource_tracker.py:314: UserWarning: resource_tracker: There appear to be 22 leaked folder objects to clean up at shutdown
warnings.warn(
INFO:cli:No additional workflows to run.
Contents of derivatives/qsirecon directory:
|-- dataset_description.json
|-- dwiqc.json
|-- logs
| |-- CITATION.html
| |-- CITATION.md
| `-- CITATION.tex
|-- sub-230
| `-- figures
`-- sub-230.html
Contents of qsirecon_work/qsirecon_wf/sub-230_pyafq_tractometry/sub_230_dir_AP_space_T1w_desc_preproc_recon_wf/pyafq_tractometry/run_afq
appear to have the expected directory structure, tracts, html reports etc.
I’ve run qsirecon myself many times and never had a problem with the outputs ending up in derivatives where they belong. I’m not seeing the problem here. Any insights would be appreciated!
-Dianne