Expected is actually not a BIDS dataset
Documented in this issue: #2
The following does not work does work because the package expects files ending
with a preproc.nii
and not *preproc_bold.nii
input_dir=../../derivatives/fmriprep
output_dir=../../derivatives/rsHRF
input_dir=/home/remi/gin/olfaction_blind/derivatives/fmriprep
output_dir=/home/remi/gin/olfaction_blind/derivatives/rsHRF
mkdir $output_dir
docker run -ti --rm \
-v $input_dir:/input_dir:ro \
-v $output_dir:/results \
bids/rshrf --bids_dir input_dir \
--output_dir results \
--analysis_level participant \
--brainmask \
--estimation canon2dd \
--participant_label blnd01
This gives the following error
rsHRF: error: There are no files of type *preproc.nii / *preproc.nii.gz Please make sure to have at least one file of the above type in the BIDS specification
I suspect the error is due to the fact that the BIDS app actually expect data
that does in fact NOT conform to the BIDS specifications.
BIDS files have the general format:
sub-<label>_entity1-<label>_entity2-<label>[...]_suffix.ext
The general form for BIDS derivatives data is described here:
https://bids-specification.readthedocs.io/en/stable/05-derivatives/02-common-data-types.html#preprocessed-or-cleaned-data
<pipeline_name>/
sub-<participant_label>/
<datatype>/
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<ext>
Which means that preprocessed bold data should have the suffix bold
and not
the preproc
one that rsHRF expects. Something like this:
sub-01/func/sub-01_task-rest_desc-preproc_bold.nii.gz
sub-01/func/sub-01_task-rest_desc-preproc_bold.json
Another issue is that rsHRF
expects the task label to be rest
. This is
indeed the "suggested" label by the BIDs specification and makes for a good
default but resting state dataset can technically have any task label.
Those should be fixed to make the app work on most valid derivatives BIDS
datasets. I suspect it would also be preferable to have the following as
defaults:
- desc: preproc
- suffix: bold
- task: rest but to give the possibility to let users modify them in their
docker run
command.
Bot issues could be tested on the ds002790 dataset from open neuro that should
be accessible from openeuro with datalad.
datalad clone ///
cd datasets.datalad.org/
datalad install openneuro datalad
install openneuro/ds002790
cd openneuro/ds002790
# get rest data first subject
datalad get /derivatives/fmriprep/sub-0001/func/sub-0001*task-restingstate_acq-seq*\*
Additonally when processing a BIDS data set, it would be preferable to generate
a dataset_description.json
that helps track the provenance of the of the
input.
See here for more details:
https://bids-specification.readthedocs.io/en/stable/03-modality-agnostic-files.html#derived-dataset-and-pipeline-description
Finally, one little extra: it could be nice when dealing with BIDS dataset to
make sure that the input data is a derivatives dataset (this information should
be included in the DatasetType
of the dataset_description.json
of a
dataset): the reason for this is to prevent users from running rsHRF on data
that has not been minimally preprocessed (i.e realigned).