dandi / dandi-archive

DANDI API server and Web app
https://dandiarchive.org
13 stars 9 forks source link

[Feature]: visualize NWB files with neurosift #1646

Closed bendichter closed 1 year ago

bendichter commented 1 year ago

neurosift is a JS-based neurophysiology data visualization tool created by @magland. It allows for data to be streamed directly from DANDI (or any s3 bucket), and can automatically render visualizations from NWB data files. This is like NWB Widgets, except it is entirely client side visualizations, and does not require us to launch a jupyter kernel in the background.

Here is a WIP example of an automatic visualization of NWB.

We are still in the process of developing an ideal visualization and optimizing data storage to improve streaming performance. On the web UI side, would it be possible to add neurosift as an "external service" here? image

satra commented 1 year ago

if a url can can be constructed with the source file url. the example you posted doesn't have that.

magland commented 1 year ago

@satra, that testing example has the object ID hard coded. I'll implement a scheme where the URL contains the needed information.

So it would be something like this:

https://scratchrealm.github.io/neurosift/#/nwb/dandiarchive/c86cdfba-e1af-45a7-8dfd-d243adc20ced (DOESN'T WORK YET)

Would that be sufficient?

satra commented 1 year ago

@magland - the way we have been doing it is through defining services like this: https://github.com/dandi/dandi-archive/blob/bbada9c42cf1ebffcd91a38b6a89d821f2391c4c/web/src/views/FileBrowserView/FileBrowser.vue#L307

which in turn creates urls like this in the file viewer.

http://nwbexplorer.opensourcebrain.org/nwbfile=https://dandiarchive.s3.amazonaws.com/blobs/664/43b/66443b03-5266-48ba-af4b-f2fe4026acff

https://ome.github.io/ome-ngff-validator/?source=https://dandiarchive.s3.amazonaws.com/zarr/86237096-0a96-4b0a-b9f4-ed4c6aa1f452

magland commented 1 year ago

@satra how's this:

https://scratchrealm.github.io/neurosift/#/nwb?url=https://dandiarchive.s3.amazonaws.com/blobs/c86/cdf/c86cdfba-e1af-45a7-8dfd-d243adc20ced

satra commented 1 year ago

that looks great. submitted a PR. will let kitware team take it over from here.

magland commented 1 year ago

Thanks, I just transferred that repo to the flatironinstitute github org. So the above link will not work anymore, and you'll need to modify the PR.

It will now be:

https://flatironinstitute.github.io/neurosift/#/nwb?url=https://dandiarchive.s3.amazonaws.com/blobs/c86/cdf/c86cdfba-e1af-45a7-8dfd-d243adc20ced

(Although this won't work until tomorrow when I will get granted admin access.)

dandibot commented 1 year ago

:rocket: Issue was released in v0.3.46 :rocket: