Problems with BIDS format

Dear all,

I attached a screenshot from the error we are receiving. We are at a loss and do not know what is going wrong… We put the structure into an online bids validator and everything seems to be fine and according to BIDS structure. However, when wanting to run fmriprep it does not work… Anybody having experiences with the first error and tips how to work around it?

Cheers, Julia and Joey

my hunch is that you might not be pointing fMRIprep to the correct folder (that has happened… almost every single time)

could you paste the singularity command you used because the print screen is actually a bit hard to read for my aging eyes? :wink:

It looks like the actual bids dataset is in /BIDS/5007. Also, any files/directory you want the bids validation to ignore (such as dcm2bids temp files) can go in a .bidsignore in the main bids folder.

Hey,

Thanks so much for responding so fast!!

This is the command:

singularity exec --bind /dbstore/Rijnstate/SYNAPSE:/BIDS/ /dbstore/Rijnstate/fmriprep-20.2.6.simg fmriprep /BIDS /BIDS/sub-007/ses01/preproc_test participant --participant_label 007 --boilerplate -v --skip_bids_validation --error-on-aroma-warnings --longitudinal --output-spaces MNI152NLin2009cAsym --bold2t1w-dof 12 --fs-no-reconall --use-aroma --return-all-components --fs-license-file license.txt

When using --skip_bids_validation, I actually do get something different now and it seems that it is working? However, in the designated output map I do not see any output… I will apply the tips that you suggested!
This is the folder with the data: dbstore/Rijnstate/SYNAPSE/BIDS/sub-007/ses-01/ (in right BIDS format), so ’ BIDS’ would be the root map that I bound to the singularity container. However, when running BIDS validator, I also get the error that fmriprep is validating other maps that are not in BIDS, but one map higher (SYNAPSE). I do not quite understand why it is doing that… but I will put all unnecessary data in another map (.bidsignore).

Have a nice evening!

Cheers,
Julia

Other possibility to what Steven said: put your code (either related to BIDS conversion or to the code your used to run the experiment) in a code folder rather than in a script folder.

See where the code was put in this example: https://github.com/bids-standard/bids-examples/tree/master/eeg_matchingpennies

OK I might be wrong but it seems you are putting the output of your fmriprep run inside the same subject folder that contains the raw data.

singularity exec \
    --bind /dbstore/Rijnstate/SYNAPSE:/BIDS/ \
    /dbstore/Rijnstate/fmriprep-20.2.6.simg \
    fmriprep \
    /BIDS \                                 <-- input
    /BIDS/sub-007/ses01/preproc_test \      <-- output
    participant \
    --participant_label 007 \
    --boilerplate -v \
    --skip_bids_validation \
    --error-on-aroma-warnings \
    --longitudinal \
    --output-spaces MNI152NLin2009cAsym \
    --bold2t1w-dof 12 \
    --fs-no-reconall \
    --use-aroma \
    --return-all-components \
    --fs-license-file license.txt

You most likely don’t want to do that because you are then mixing raw and derivatives data (and will very likely make the validator complain).
Using something like /BIDS/derivatives for the output should be sufficient.

Hi Remi.

This was indeed the case, I changed it to BIDS/derivatives. And fmriprep was finally running for 4 hours, which is good. However, what I do not understand is that it put the derivatives folder in the map that is one level higher than the BIDS map, even though the BIDS map is my root map… The structure is like this ~/SYNAPSE/BIDS/[raw data structure], and fmriprep made a new folder derivatives in /SYNAPSE/derivatives. Any idea why? My commmand for the output was /BIDS/derivatives, so I assumed that it would make a new folder in folder BIDS.

I assume that we need to get some sort of preprocessed file out of fmriprep, but we only got the logs… Without any warning or error messages in this path:

/dbstore/Rijnstate/SYNAPSE/derivatives/fmriprep/sub-007/log/

I guess something is still going wrong. Could you help us with that?
Thanks in advance.

Best, Julia

Hi.

In your singularity container, you mounted the folder SYNAPSE AS BIDS. So within the singularity container BIDS will point to your local folder SYNAPSE.

In regards to only seeing the logs, are the jobs still running? Outputs are copied over at the end of the process (intermediary files are made in the work directory).

Best,
Steven

Hi Steven,

Oh now I get it! That explains why there is a derivatives folder in the SYNAPSE folder.

It says:
fMRIPrep workslow graph with 386 nodes built successfully. It was running for 6 hours. So it seemed that something was done.

Best,
Julia

successfully

fMRIPrep can take a long time to run, depending on your computational resources, number of scans per subject, and processing options. I would give it a day, and if you still see nothing or if there’s a crash, then we can debug further.

you should get back to your regurlar prompt in the command line when everything is done (or if something fails)

if you want more feedback to know what it going on, you can use the verbose flags: Usage Notes — fmriprep version documentation