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

Using Neurosift webapp with local NWB file passed by URL? #264

Open
rly opened this issue Feb 20, 2025 · 5 comments
Open

Using Neurosift webapp with local NWB file passed by URL? #264

rly opened this issue Feb 20, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@rly
Copy link

rly commented Feb 20, 2025

NWB GUIDE makes Neurosift view a local NWB file by embedding an iframe that points to https://neurosift.app/?p=/nwb&url=http://127.0.0.1:4242/files/Users/rly/Documents/NWB_Data/dandisets/000296/sub-10002342988018666858/sub-10002342988018666858_ses-20170911T135306_ophys.nwb

And you can download Neurosift and run neurosift view-nwb [file path]

But I was wondering - can the Neurosift webapp display an NWB file that exists on the local filesystem? e.g., with a URL https://neurosift.app/nwb?url=file:///Users/rly/Documents/NWB_Data/dandisets/000296/sub-10002342988018666858/sub-10002342988018666858_ses-20170911T135306_ophys.nwb or would that not work because the browser does not have permission to access the filesystem?

@magland
Copy link
Collaborator

magland commented Feb 20, 2025

This is not currently possible in NS. In principle we could do something like this using the File System API, but I don't think it would be as simple as embedding the file path in the URL. I'm not that familiar with how it works, but I think user may need to click to select the file (or a folder). Supporting this would be non-trivial, but if it seems like an important use case, we can consider it.

The alternative is to make NS electron desktop app that has access to the local file system.

@rly
Copy link
Author

rly commented Feb 20, 2025

OK, thanks for the quick response!

I am working with a couple grad students who are basically running NWB GUIDE (an electron app) to use Neurosift on local NWB files (later they'll also use NWB GUIDE for DANDI upload). This works, but NWB GUIDE is a hefty application, and I think it would be convenient in general for users to be able to navigate to neurosift.app and use a file selector to select a local file to explore. This is not a big need since NWB GUIDE and neurosift view-nwb [filepath] already work for local files though. Just want to mark that as a nice-to-have.

@magland magland added the enhancement New feature or request label Feb 20, 2025
@magland
Copy link
Collaborator

magland commented Feb 20, 2025

Okay, I'll keep it open for now.

@magland
Copy link
Collaborator

magland commented Feb 21, 2025

@rly would it help to be able to browse a directory of NWB files that are on the local machine? Something like

neurosift view-folder /path/to/folder

@rly
Copy link
Author

rly commented Feb 21, 2025

via CLI? I don't have a use case for that right now. It might be useful for someone who wants to scan through a bunch of NWB files visually to inspect the data, but it would probably be more efficient to do so programmatically.

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

No branches or pull requests

2 participants