Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: EchoTime2 metadata field not found. Please consult the BIDS specification. #65

Closed
soichih opened this issue Nov 11, 2019 · 3 comments
Labels
BIDS & Derivatives bug Something isn't working effort: low Estimated low effort task impact: high Estimated high impact task
Milestone

Comments

@soichih
Copy link

soichih commented Nov 11, 2019

I am trying to run fmriprep the OpenNeuro published dataset (like https://openneuro.org/datasets/ds001454)

The fmap data on this dataset seems to be stored in non-BIDS compatible format, and fmriprep fails with the following error message.

fMRIPrep failed: Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/legacymultiproc.py", line 69, in run_node
    result['result'] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 479, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 569, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 662, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 382, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.7/site-packages/sdcflows/interfaces/fmap.py", line 204, in _run_interface
    _delta_te(self.inputs.metadata),
  File "/usr/local/miniconda/lib/python3.7/site-packages/sdcflows/interfaces/fmap.py", line 529, in _delta_te
    'EchoTime2 metadata field not found. Please consult the BIDS specification.')
RuntimeError: EchoTime2 metadata field not found. Please consult the BIDS specification.

The EchoTime1/2 are basically stored under magnitude1.json and magnitude2.json respectively, and on phasediff.json, it just has "EchoTime" (from magnitude2). According to BIDS specification, EchoTime1/2 should be stored on phasediff.json, and there should be no magnitude1/2.json.

I think I can pursuit several options...

  1. Run fmriprep without fmap
  2. Download the dataset, modify the fmap json manually, and run fmriprep
  3. Have fmriprep updated so that it will look for magnitude1/2.json if EchoTime1/2 are not specified in the phasediff.json - although it's not BIDS compatible..
  4. OpenNeuro will run BIDS validator on older datasets and correct issues if it fails to validate?

What would you recommend me to do?

@kimsin98
Copy link
Contributor

Editing phasediff.json files should be the right approach. Batch editing JSON files is simple if you use bash (jq) or python (json module)

@oesteban oesteban transferred this issue from nipreps/fmriprep Nov 27, 2019
@oesteban oesteban added BIDS & Derivatives bug Something isn't working labels Nov 27, 2019
@oesteban oesteban added this to the 1.1.0 milestone Nov 27, 2019
@oesteban
Copy link
Member

Related to #64.

@oesteban oesteban modified the milestones: 1.3.0, 1.2.2 Apr 2, 2020
@oesteban oesteban added impact: high Estimated high impact task effort: low Estimated low effort task labels Apr 2, 2020
oesteban added a commit to oesteban/sdcflows that referenced this issue Oct 23, 2020
This PR attempts to provide a more reliable framework to build
fieldmap estimation workflows.
Implicitly, it will help addressing issues regarding data conformity
(e.g., nipreps#63, nipreps#64, nipreps#65) and also ease larger refactors such as #20, nipreps#21,
 nipreps#26, and nipreps#101.
oesteban added a commit to oesteban/sdcflows that referenced this issue Oct 23, 2020
This PR attempts to provide a more reliable framework to build
fieldmap estimation workflows.
Implicitly, it will help addressing issues regarding data conformity
(e.g., nipreps#63, nipreps#64, nipreps#65) and also ease larger refactors such as #20, nipreps#21,
 nipreps#26, and nipreps#101.
oesteban added a commit to oesteban/sdcflows that referenced this issue Oct 26, 2020
This PR attempts to provide a more reliable framework to build
fieldmap estimation workflows.
Implicitly, it will help addressing issues regarding data conformity
(e.g., nipreps#63, nipreps#64, nipreps#65) and also ease larger refactors such as #20, nipreps#21,
 nipreps#26, and nipreps#101.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 14, 2020
This PR attempts to provide a more reliable framework to build
fieldmap estimation workflows.
Implicitly, it will help addressing issues regarding data conformity
(e.g., nipreps#63, nipreps#64, nipreps#65) and also ease larger refactors such as #20, nipreps#21,
 nipreps#26, and nipreps#101.
oesteban added a commit to oesteban/sdcflows that referenced this issue Nov 18, 2020
This PR attempts to provide a more reliable framework to build
fieldmap estimation workflows.
Implicitly, it will help addressing issues regarding data conformity
(e.g., nipreps#63, nipreps#64, nipreps#65) and also ease larger refactors such as #20, nipreps#21,
 nipreps#26, and nipreps#101.
@oesteban oesteban modified the milestones: 1.3.2, 1.4.0 Nov 18, 2020
@oesteban
Copy link
Member

The dataset has been fixed on OpenNeuro. Please reopen if this is still an issue.

Moreover, the upcoming version 1.4.0 of SDCFlows will be much more thorough in testing the availability of all necessary metadata early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BIDS & Derivatives bug Something isn't working effort: low Estimated low effort task impact: high Estimated high impact task
Projects
None yet
Development

No branches or pull requests

3 participants