-
Notifications
You must be signed in to change notification settings - Fork 32
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
Error reading example datasets with nwbRead #236
Comments
I would advise re-downloading the tip of the Regarding nwb_an041_20140821_vM1_180um.nwb: P9HMH_NOID5.nwb looks like a specification problem but I may need to take a closer look at the file itself before coming to any conclusions. I will need to look at sub-626194774_ses-637919731_icephys.nwb to see what the embedded spec actually says here. For YutaMouse20-140328.nwb it looks like the HDF5 library MATLAB is using does not like dashes in its filename. Does removing the dash in the filename fix the issue? |
Thank you replying so quickly!
Some more warnings, but same errors. nwb_an041_20140821_vM1_180um.nwb
P9HMH_NOID5.nwb
sub-626194774_ses-637919731_icephys.nwb
No...
|
It looks like nwb_an041_20140821_vM1_180um.nwb and P9HMH_NOID5.nwb are both using older versions of the schema that is packaged with the current tip of master. Call sub-626194774_ses-637919731_icephys.nwb is weird though. It may actually be a NWB 1.0 file. Can you call For YutaMouse20-140328.nwb, is that full path to the file obfuscated or is it the real file path? This may actually be a bug with the HDF5 library bundled with MATLAB otherwise. |
For all the .nwb files I tested, I get an empty window both with Matlab 2020a and 2020b.
This is the absolute file path on my hard drive. If I rename it to test.nwb and cd to that folder, I get the same error.
These are all files from the datasets distributed as examples from the NWB website, you can test them easily. Are there other websites from which we can download example datasets that are easy to work with using the current version of the library? |
P9HMH_NOID5.nwb is using schema
YutaMouse20-140328.nwb appears to be corrupted and unreadable even in HDFViewer. I will check Which dataset from the NWB website is sub-626194774_ses-637919731_icephys.nwb from? |
|
You can also find much more up-to-date datasets at https://gui.dandiarchive.org/#/. The ones on this page need updating. The team has been notified of this. |
Thank you for your prompt help and suggestions! However, my goal is not really to read these files... I was hoping to be able to simply add the matnwb library to the Brainstorm environment (downloaded automatically from github when needed) to offer a native support for the NWB file format to the Brainstorm users, as it was accepted as one of the reference file format in the BIDS-EEG specifications. But it looks a lot more complicated than expected. Apparently it will not be possible to include a version of the library that will be able to read all the .nwb files, it will always require some customized manipulations, and navigation between versions... Another problem is that is doesn't seem to be clear how EEG/LFP/SEEG/ECOG signals should be stored in the NWB ontology. The various example files I could load in MATLAB do not organize the data in the same way. It doesn't seem easy to write code that could automatically find all the information it needs. This would require an important amount of work to supervise this interactive import of EEG signals from .nwb files into Brainstorm, and then to document it. Our development resources on the Brainstorm project are limited and we have many projects to lead simultaneously. Unfortunately, we won't be able to invest time in writing supervision tools to manage multiple versions of the matnwb library or the schemas. What are your plans for NWB/matnwb in the near future? Unless you have better suggestions, I will remove the NWB support currently available in the Brainstorm distribution: it was developed for one specific dataset by a former PhD student of our group (his work is mentioned on your website: https://www.nwb.org/tools/), but this code is not working with any other public dataset available using .nwb files. It needs more work than what we can provide at the moment to be maintained properly. |
(I will not keep on investigating this immediately, please close this issue if you think it is not relevant for the immediate development of the matnwb library) |
I apologize for the poor first impressions that the NWB website gave you. pynwb and MatNWB have introduced the embedded specification feature a year (or so) ago which should allow anyone to simply As you've seen, this is not universal and does not work for old files but all files generated in the past year (and maybe older) should not require this environment setup. We expect this new format to phase out the old over time. I'd expect many of the files in the DANDI archive should have an embedded specification. Regarding ontologies I will have to refer to @bendichter for more answers on integration. I can only speak for myself but I am limited in the time I can spend developing for MatNWB as well. I can answer questions, help with bugs, or review PRs. Any more will require some negotiation. |
I will wait for a bit longer until this settles down then before looking into an integration with Brainstorm then (probably until the next post about NWB on our user forum). |
@ftadel Thank you for bringing these issues to our attention. We agree that MatNWB should offer seamless user experience for data reading, and that being required to find specific versions of schema would not be appropriate for integration into analysis and visualization tools like Brainstorm. There has been a lull in funding for this API, and it has been challenging to accommodate new versions of NWB file supporting old files. There are promising avenues for continued funding in the next month or so, and once one of those kicks in this issue will be a top priority. As Lawrence mentioned, we have a new mechanism in place for handling the schema as it improves, but it will not work for data that was produced before this mechanism was put in place. (aside: @ln-vidrio , to solve this issues for older data, would it be possible to include the nwb schema repo as a sub-repo and dynamically use git to check out the schema version listed in the file? If there is potential in this sort of solution, maybe we can open a separate issue.) It is important to me that we maintain the infrastructure that connects NWB to Brainstorm. @ftadel you raise an important point about the flexibility of NWB making it difficult to predict the form of the file. A recent feature, Again, we want to thank you for raising these issues to our attention. If you are having trouble reading published data using this API, then it is surely not meeting the needs of our users who generally have less programming experience. @ln-vidrio is doing excellent work here, but this lull in funding has created a bit of a gap. You came in just at the right time to reveal that gap, which will help us steer our efforts going forward. We would be interested in inviting you to try this API again once we have had some time to address these issues. |
@bendichter Regarding the schema issue, I think you can add a dynamic version selector but you'll need the following requirements:
This isn't universal (i.e. 2.0a is a valid NWB schema version but doesn't exist as a tag) but it would be helpful for the regular case as a fallback. |
Let me add here for completeness that there is also the Java issue we encountered before: GenerateCore can not be called while Brainstorm is running. The Brainstorm side workaround for this was described in: However now that there is a need for support of multiple versions, this solution is no longer viable. Otherwise, a cache of all the working schemas should exist on the Brainstorm side, and call the right one when the file is imported/read. |
about the YutaMouse20-140328.nwb dataset, this one was corrupted in transfer. |
Hi, Error using hdf5lib2
Error in H5A.open (line 34) Error in util.getSchemaVersion (line 3) Error in nwbRead (line 47) And I can't get any information about schema version using util.func like util.getSchemaVersion or have you any clues ? |
Hi @alexdiz, In your case, this looks like an older version of NWB that did not encode a |
Cached spec has been completed for a while. |
I'm trying to use matnwb to read EEG-like signals from .nwb files in Brainstorm (https://neuroimage.usc.edu/brainstorm).
One of our former collaborators used matnwb in early 2019 to import ECoG signals, but I can't use any of his work with more recent versions of matnwb...
Since we have users who are interested in processing NWB recordings in Brainstorm, I am taking over this work. We started a conversation on our user forum: https://neuroimage.usc.edu/forums/t/error-opening-nwb-files/21025/11
I tried to start fresh with the recent versions of the library (current github master, and v2.2.5.0) and the example datasets available on the NWB website (https://www.nwb.org/example-datasets/) and other websites (https://gui.dandiarchive.org/#/dandiset/000020/draft), but I'm facing many issues with almost all the datasets.
Below: a list of example files and the errors I obtain with the two versions of the library I tested.
Installation of the Github master branch (https://github.com/NeurodataWithoutBorders/matnwb/archive/master.zip):
Installation of the v2.2.5.0 version (https://github.com/NeurodataWithoutBorders/matnwb/archive/v2.2.5.0.tar.gz):
nwb_an041_20140821_vM1_180um.nwb
matnwb-2.2.5.0:
matnwb-master:
P9HMH_NOID5.nwb
matnwb-master:
matnwb-2.2.5.0:
Steinmetz2019_Cori_2016-12-14.nwb
matnwb-2.2.5.0:
matnwb-master: WORKS
sub-626194774_ses-637919731_icephys.nwb
matnwb-2.2.5.0:
matnwb-master:
YutaMouse20-140328.nwb
matnwb-2.2.5.0:
matnwb-master:
The text was updated successfully, but these errors were encountered: