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

--datalad option : Can it aggregate-metadata by individual subject/session to be used by datalad metadata search? #235

Open
ted-strauss-K1 opened this issue Jul 26, 2018 · 3 comments

Comments

@ted-strauss-K1
Copy link

I have converted a collection of dicoms to BIDS using heudiconv, with the datalad option, and passing multiple dicoms by subject option -s.

Dicom metadata have been transferred into .heudiconv metadata files, e.g. .heudiconv/DICOM-NAME/info/dicominfo.tsv, I would like to make that available to datalad search. Running datalad aggregate-metadata only seems to capture top-level contents, and ignores lower level BIDS metadata files.

Is there a way to convince datalad to ingest BIDS json and tsv metadata so it will be available to datalad searches?

@yarikoptic
Copy link
Member

For DICOMs, you would need to have dicoms around and enable 'dicom' extractor. With current heudiconv approach to DICOMS (storing them in the tarballs), there is no way to "extract" it (see related datalad/datalad-neuroimaging#32). So you would want to either add dicoms manually extracted from those tarballs, or just add another (sub?)dataset with the original dicoms, where you actually extract metadata.

For bids, you need to enable bids extractor (and probably you would want nifti1 as well)
smth like

git config -f .datalad/config --add datalad.metadata.nativetype nifti1;
git config -f .datalad/config --add datalad.metadata.nativetype bids

in the dataset where you want to enable those. Note that you would need datalad-neuroimaging extension installed

@ted-strauss-K1
Copy link
Author

ted-strauss-K1 commented Jul 26, 2018

Ok I have:

  • installed datalad-neuroimaging extension
  • re-run heudiconv to convert a dicom to bids
  • run the git config statements above in the heudiconv output folder
  • then attempted to regenerate metadata, see below:
% datalad aggregate-metadata -d . -r --update-mode all  

[INFO   ] Aggregate metadata for dataset /path/to/file 
[ERROR  ] ("Failed to load metadata extractor for '%s', broken dataset configuration (%s)?: %s", u'bids', <Dataset path=/path/to/file>, "pybids 0.6.4 has no such extra feature 'analysis' [__init__.py:requires:2615]") [metadata.py:_get_metadata:531] (ValueError) 

yarikoptic added a commit to neurodebian/pybids that referenced this issue Jul 28, 2018
It is just an empty list since all of them moved into the main
set of dependencies, but this would allow external tools which
demanded it before still function without fixups, see e.g
nipy/heudiconv#235 (comment)
@yarikoptic
Copy link
Member

Let's see if pybids authorities return back analysis or we just drop it ;-)
https://github.com/INCF/pybids/pull/218/files
I guess you could try to pip install pybids==0.5.1 which would match the version which I used and it worked...
that is sad, but I do not see a way in setuptools to declare alternative dependencies, so I guess we will just demand a recent pybids from now on to address it on our end: datalad/datalad-neuroimaging#39 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants