ERROR ~ Error executing process > 'Read_BIDS (Read_BIDS)'

Hi there,

I’m running tractoflow pipeline to process the DTI and T1 data. And I got the errors as shown below:

tangxc@R940xa:/Data/FreeSurfer20200402/test$ nextflow run tractoflow/main.nf --bids ./ --dti_shells “0 1000” --fodf_shells “0 1000” -with-singularity tractoflow_2.1.1_650f776_2020-07-15.img -resume

N E X T F L O W ~ version 19.04.0

Launching tractoflow/main.nf [nostalgic_pike] - revision: 798dc71854

TractoFlow pipeline

===================

Start time: Thu Jan 14 15:47:48 CST 2021

Input BIDS: ./

executor > local (3)

executor > local (4)

[ad/38aa66] process > README [100%] 1 of 1 :heavy_check_mark:

executor > local (5)

[ad/38aa66] process > README [100%] 1 of 1 :heavy_check_mark:

[0d/784884] process > Read_BIDS [ 75%] 3 of 4, failed: 3

executor > local (5)

[ad/38aa66] process > README [100%] 1 of 1 :heavy_check_mark:

[0d/784884] process > Read_BIDS [100%] 4 of 4, failed: 4 ✘

Pipeline completed at: Thu Jan 14 15:48:00 CST 2021

Execution status: failed

Execution duration: 12.3s

[dc/645ea2] NOTE: Process Read_BIDS (Read_BIDS) terminated with an error exit status (1) – Execution is retried (1)

[06/bdb62c] NOTE: Process Read_BIDS (Read_BIDS) terminated with an error exit status (1) – Execution is retried (2)

[3a/24012b] NOTE: Process Read_BIDS (Read_BIDS) terminated with an error exit status (1) – Execution is retried (3)

ERROR ~ Error executing process > ‘Read_BIDS (Read_BIDS)’

Caused by:

Process Read_BIDS (Read_BIDS) terminated with an error exit status (1)

Command executed:

scil_validate_bids.py test tractoflow_bids_struct.json --readout 0.062

Command exit status:

1

Command output:

(empty)

Command error:

Traceback (most recent call last):

File “/usr/local/bin/scil_validate_bids.py”, line 4, in

import (‘pkg_resources’).run_script(‘scilpy==0.2.dev0’, ‘scil_validate_bids.py’)

File “/usr/local/lib/python3.7/dist-packages/pkg_resources/ init .py”, line 667, in run_script

self.require(requires)[0].run_script(script_name, ns)

File “/usr/local/lib/python3.7/dist-packages/pkg_resources/ init .py”, line 1464, in run_script

exec(code, namespace, namespace)

File “/usr/local/lib/python3.7/dist-packages/scilpy-0.2.dev0-py3.7-linux-x86_64.egg/EGG-INFO/scripts/scil_validate_bids.py”, line 267, in

main()

File “/usr/local/lib/python3.7/dist-packages/scilpy-0.2.dev0-py3.7-linux-x86_64.egg/EGG-INFO/scripts/scil_validate_bids.py”, line 230, in main

layout = BIDSLayout(args.bids_folder, index_metadata=False)

File “/usr/local/lib/python3.7/dist-packages/bids/layout/layout.py”, line 230, in init

self._validate_root()

File “/usr/local/lib/python3.7/dist-packages/bids/layout/layout.py”, line 466, in _validate_root

“‘dataset_description.json’ is missing from project root.”

ValueError: ‘dataset_description.json’ is missing from project root. Every valid BIDS dataset must have this file.

Work dir:

/Data/FreeSurfer20200402/test/work/0d/784884f9d27b13d78acc420d408cb9

Tip: view the complete command output by changing to the process work dir and entering the command cat .command.out

– Check ‘.nextflow.log’ file for details

My bids inputs folder is like: (Those files and folders are generated directly from dcm2bids without any transformations):

sub-001

  • T1
    sub-001_T1_MPRAGE_T1.json
    sub-001_T1_MPRAGE_T1.nii.gz
  • dti
    sub-001_diff_dti.bval
    sub-001_dif_dti.bvec
    sub-001_dif_dti.json
    sub-001_dif_dti.nii.gz
    sub002
  • T1
    sub-002_T1_MPRAGE_T1.json
    sub-002_T1_MPRAGE_T1.nii.gz
  • dti
    sub-002_diff_dti.bval
    sub-002_dif_dti.bvec
    sub-002_dif_dti.json
    sub-002_dif_dti.nii.gz
    sub003

However, after I moved the T1 and DTI files into every subjects’ folders and ran by --input instead of --bids, it was working:

tangxc@R940xa:/Data/FreeSurfer20200402/test$ nextflow run tractoflow/main.nf --input …/test-data/ --dti_shells “0 1000” --fodf_shells “0 1000” -with-singularity tractoflow_2.1.1_650f776_2020-07-15.img -resume
N E X T F L O W ~ version 19.04.0
Launching tractoflow/main.nf [scruffy_hilbert] - revision: 798dc71854
TractoFlow pipeline

Start time: Thu Jan 14 17:13:19 CST 2021

Input: …/test-data/
executor > local (23)
[ee/e4ad03] process > Denoise_DWI [100%] 3 of 3 :heavy_check_mark:
[1b/da7765] process > Bet_Prelim_DWI [100%] 3 of 3, cached: 2 :heavy_check_mark:
[58/4104ea] process > README [100%] 1 of 1 :heavy_check_mark:
[63/bedc8d] process > Denoise_T1 [100%] 3 of 3 :heavy_check_mark:
[2a/e1b353] process > Eddy [ 0%] 0 of 3
[8c/37c5fb] process > N4_T1 [100%] 3 of 3 :heavy_check_mark:
[96/803d96] process > Resample_T1 [100%] 3 of 3 :heavy_check_mark:
[83/2d09b2] process > Bet_T1 [100%] 3 of 3 :heavy_check_mark:
[ac/b683a6] process > Crop_T1 [100%] 3 of 3 :heavy_check_mark:

My --input folder is like:

sub-001
bval
bvec
dwi.nii.gz
t1.nii.gz
sub002
bval
bvec
dwi.nii.gz
t1.nii.gz
sub003

Anyone knows how to fix the --bids to make it work? Thank you!

Dear @Shirley_Su,

From what I see, your bids inputs folder is not bids compatible.
You can use bids-standard.github.io/bids-validator/ to validate your bids structure.

Have a good day
Arnaud

Hi @Shirley_Su,

Did you find a way to fix your issue? If so, can you tag this thread as solved ? It helps us sort all @tractoflow threads.

Thank you in advance
Arnaud

Hi Shirley,
It sounds like I have the same issue. Did you find a proper way to resolve it? My folder seems bids compatible (I checked with the online validator) but tractoflow cannot read my bids file.

Hi @Ophelie_Martinie

Could you create an empty dataset_description.json in your bids directory. I think this file is mandatory in the bids structure and is required by TractoFlow.

Best

Guillaume

Hi @Guillaumeth
I already have created a json file (not really sure if its format is correct though). It contains the following information :

{
“Name”: “MotorPlanning”,
“BIDSVersion”: “1.0.2”
}

My project folder contains a DICOM folder and another one with Bids structure. Within the bids folder, I have created one folder by participant (sub-001) which contain 2 subfolders:

  • anat
  • dwi
    With their corresponding data within, renamed according to the Bids guidelines.

Thanks for your help!

Could you send me the output of tree command of your input data given to TractoFlow using --bids.

Thanks

Do you mean the command to run tractoflow? I use :

nextflow run tractoflow/main.nf/ --bids ProjectFolder/BidsFolder/ --dti_shells “0 2000” --fodf_shells “0 2000” --with-singularity tractoflow_2.1.1_650f776_2020-07-15.img -resume

Hi @Ophelie_Martinie ,

@Guillaumeth was talking about the output of this command
tree ProjectFolder/BidsFolder/

Thanks

Oh my bad!
@Guillaumeth The output is the following :

MotorPlanning/Niftii/
├── dataset_description.json
└── sub-001
├── anat
│ ├── sub-001_T1w.json
│ └── sub-001_T1w.nii.gz
└── dwi
├── sub-001_acq-64_dwi.bval
├── sub-001_acq-64_dwi.bvec
├── sub-001_acq-64_dwi.json
└── sub-001_acq-64_dwi.nii.gz

3 directories, 7 files

Thanks @Ophelie_Martinie

So your bids folder looks good.

Can you confirm to me your command looks like this:
nextflow run tractoflow/main.nf/ --bids MotorPlanning/Niftii …

If it was already this command that you ran, could you, if possible, send me your data for testing ?

Guillaume