8000 Nwb integration by sbuergers · Pull Request #1419 · fieldtrip/fieldtrip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Nwb integration #1419

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

Merged
merged 35 commits into from
Jun 5, 2020
Merged

Nwb integration #1419

merged 35 commits into from
Jun 5, 2020

Conversation

sbuergers
Copy link
Contributor
@sbuergers sbuergers commented Jun 5, 2020

Jens Klinzing (@jensklinzing), Tara van Viegen (@TaravanViegen) and I wrote code to implement loading of NWB data (both LFP and spikes) with FieldTrip.

https://github.com/jens-k/fieldtrip/tree/nwb-integration

The code is tested with matNWB release 2.2.5:
https://github.com/NeurodataWithoutBorders/matnwb/releases/tag/v2.2.5.0

It is assumed that the user is familiar with the basics of MatNWB (Github MatNWB) and the user's system is in a state that would also allow loading the data using MatNWB (MatNWB must be in the path, generateCore must have been run, the correct schema must be installed, see NWB schemas).

We want to include a test_nwb.m script (draft currently in folder test, but should be added as markdown here: fieldtrip/website#249). To adapt this to be a proper test-script we have a few questions:

1
We believe some NWB datasets should be transferred to the test data folder on the DCCN server. Our test datasets are quite large (~10GB). Is this an issue? Should we create smaller ones?

2
How to deal with the MatNWB toolbox that has to be loaded? Will there be one stable version on the server or should it automatically be pulled from https://github.com/NeurodataWithoutBorders/matnwb?

3
Also, the MatNWB will create folders when being initialized and when loading a file. Can we use the systems 'tempdir' to create these files? Are they then automatically deleted after?

The code was tested with the following example datasets that are freely available online:
From https://gui.dandiarchive.org/#/file-browser/folder/5e6eb2b776569eb93f451f8d:
sub-YutaMouse20_ses-YutaMouse20-140324_behavior+ecephys.nwb
sub-YutaMouse41_ses-YutaMouse41-150831_behavior+ecephys.nwb

From https://osf.io/hv7ja/ OR https://gui.dandiarchive.org/#/dandiset/5e6ff4140fe0ec33e6b3d5d2:
P9HMH_NOID5.nwb

See discussion of NWB-fieldtrip integration here: #721 (comment)

Cheers,
Steffen.

jens-k and others added 30 commits May 14, 2020 18:46
Also solves an error related to generateCore
added comments to test
SpikeEventSeries is also found through searchFor, but in the current nwb file there is no true ElectricalSeries in the SpikeEventSeries.
fixed with lfp instead of electrialseries
In case someone calls it directly.
also when data is stored in a DataPipe instead of a DataStub.
Copy link
Member
@robertoostenveld robertoostenveld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code changes look good, although I have not been able to test it yet (I have to download the files and dependencies). I have renamed the test script to inspect_issueXXX which will not automatically be executed. All test_xxx scripts are executed and in this case it would still fail (since the data is not yet on the compute cluster and the paths have not been updated).

I will first merge and then update the test script.

@robertoostenveld robertoostenveld merged commit 737526c into fieldtrip:master Jun 5, 2020
@robertoostenveld
Copy link
Member

Regarding your questions:

  1. Smaller test files would be appreciated. The test will run fa 8000 ster, and it takes less space.

  2. I will have a look at the matnwb dependency. It is not pulled automatically. For testing I can add a static copy elsewhere, where it will be automatically loaded to the path. I could add a static copy to fieldtrip/external as well, but given that it is frequently updated, I don't think that is wise at this moment. (automatic installation of toolboxes from github would be a nice feature to have)

  3. using the systems 'tempdir' is fine, after the test script completes it will automatically be cleared so no need for you to delete the files.

Please give me some time to update the test script and try it, first on my local MacBook, then on the Linux compute cluster. I cannot test on Windows.

@robertoostenveld robertoostenveld linked an issue Jun 5, 2020 that may be closed by this pull request
robertoostenveld added a commit to robertoostenveld/fieldtrip that referenced this pull request Feb 16, 2025
schoffelen pushed a commit to georgeoneill/fieldtrip that referenced this pull request May 23, 2025
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

Successfully merging this pull request may close these issues.

reading the NWB file format fails
4 participants
0