Skip to content

Commit

Permalink
RF: Split fMRIPrep into fit and derivatives workflows (#2913)
Browse files Browse the repository at this point in the history
This begins on #2207.

Todo:

* [x] Validate correct operation of sMRIPrep integration with shim
workflow
* [x] Use smriprep fit and derivatives workflows separately, working
toward `--minimal` derivatives mode
* [x] Sink sdcflows' preprocessed fieldmap and fetch from derivatives
directory
* [x] Refactor BOLD stages to use the `input -> proc -> derivatives ->
buffer` pattern
* [x] Reduce fit stages to generate minimal files
* [ ] Thorough documentation of `--minimal`
  • Loading branch information
effigies authored Aug 21, 2023
2 parents 8b0347f + 1c40fb9 commit 1e9e70b
Show file tree
Hide file tree
Showing 20 changed files with 1,602 additions and 354 deletions.
32 changes: 7 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,9 @@ _setup_fmriprep_docker: &setup_fmriprep_docker
pip install --upgrade /tmp/src/fmriprep/wrapper/
_check_outputs: &check_outputs
name: Checking outputs of fMRIPrep run
name: Show outputs of fMRIPrep run
command: |
set +e -x
mkdir -p /tmp/${DATASET}/test
find /tmp/${DATASET}/${SUBDIR:-derivatives} \( -path '*/figures' -o -path '*/log' -o -path '*/sourcedata' \) -prune -o -name "*" -print | cut -d/ -f 5- | sort > /tmp/${DATASET}/test/outputs.out
FASTTRACK_OUTPUTS="${DATASET}${VARIANT}_fasttrack_outputs.txt"
FULL_OUTPUTS="${DATASET}${VARIANT}_outputs.txt"
RET=1
if [ ! -f /tmp/.nofasttrack ]; then
echo "Checking fasttrack..."
diff /tmp/src/fmriprep/.circleci/${FASTTRACK_OUTPUTS} /tmp/${DATASET}/test/outputs.out
RET=$?
fi
if [ $RET -ne 0 ]; then
echo "Checking full..."
diff /tmp/src/fmriprep/.circleci/${FULL_OUTPUTS} /tmp/${DATASET}/test/outputs.out
RET=$?
fi
exit $RET
find /tmp/${DATASET}/${SUBDIR:-derivatives} \( -path '*/figures' -o -path '*/log' -o -path '*/sourcedata' \) -prune -o -name "*" -print | cut -d/ -f 5- | sort
version: 2.1
aliases:
Expand Down Expand Up @@ -488,7 +470,7 @@ jobs:
name: Run full fMRIPrep on ds005 (LegacyMultiProc plugin)
no_output_timeout: 2h
command: |
FASTRACK_ARG="--anat-derivatives /tmp/${DATASET}/smriprep"
FASTRACK_ARG="--derivatives anat=/tmp/${DATASET}/smriprep"
if [ -f /tmp/.nofasttrack ]; then
FASTRACK_ARG=""
fi
Expand Down Expand Up @@ -536,7 +518,7 @@ jobs:
name: Re-run with BIDS layout
no_output_timeout: 2h
command: |
FASTRACK_ARG="--anat-derivatives /tmp/${DATASET}/smriprep"
FASTRACK_ARG="--derivatives anat=/tmp/${DATASET}/smriprep"
if [ -f /tmp/.nofasttrack ]; then
FASTRACK_ARG=""
fi
Expand All @@ -562,7 +544,7 @@ jobs:
no_output_timeout: 2h
command: |
rm /tmp/data/${DATASET}/sub-01/func/*_run-01_*
FASTRACK_ARG="--anat-derivatives /tmp/${DATASET}/smriprep"
FASTRACK_ARG="--derivatives anat=/tmp/${DATASET}/smriprep"
if [ -f /tmp/.nofasttrack ]; then
FASTRACK_ARG=""
fi
Expand Down Expand Up @@ -669,7 +651,7 @@ jobs:
name: Run full fMRIPrep on ds054
no_output_timeout: 2h
command: |
FASTRACK_ARG="--anat-derivatives /tmp/${DATASET}/smriprep"
FASTRACK_ARG="--derivatives anat=/tmp/${DATASET}/smriprep"
if [ -f /tmp/.nofasttrack ]; then
FASTRACK_ARG=""
fi
Expand Down Expand Up @@ -791,7 +773,7 @@ jobs:
name: Run full fMRIPrep on ds000210
no_output_timeout: 2h
command: |
FASTRACK_ARG="--anat-derivatives /tmp/${DATASET}/smriprep"
FASTRACK_ARG="--derivatives anat=/tmp/${DATASET}/smriprep"
if [ -f /tmp/.nofasttrack ]; then
FASTRACK_ARG=""
fi
Expand Down
33 changes: 0 additions & 33 deletions .circleci/ds005_bids_fasttrack_outputs.txt

This file was deleted.

42 changes: 0 additions & 42 deletions .circleci/ds005_legacy_fasttrack_outputs.txt

This file was deleted.

59 changes: 0 additions & 59 deletions .circleci/ds005_legacy_partial_fasttrack_outputs.txt

This file was deleted.

68 changes: 0 additions & 68 deletions .circleci/ds054_fasttrack_outputs.txt

This file was deleted.

Loading

0 comments on commit 1e9e70b

Please sign in to comment.