pyBIDS in the browser, what would be some good use cases?

Hi everyone,

Let’s say I want to know very basic things about a BIDS dataset (for example how many subjects, sessions, what modalities), I have access to a browser and to the BIDS dataset locally, but for unexplained reasons don’t want to install pyBIDS locally: what can I do? It would be great if something like pyBIDS could run in the browser with no user install.

We had this discussion last week in the bids-discussion mailinglist and @yarikoptic suggested Pyodide — Version 0.20.0 on which https://pyscript.net/ is based. Turns out, pyBIDS can’t directly run in pyodide, but @erdalkaraca noted that ancp_bids can. There are some challenges, mostly with file system access, but you can build a very basic Vue app (GitHub - surchs/vuebids: Bids in a vue app would be nice) that runs ancp_bids in the browser and let’s you do some BIDS queries: https://vuebids.netlify.app/

Our use case for this is that we want to make it as easy as possible (no install, graphical UI) for a user to let us parse some basic BIDS metadata summaries (subjects, sessions, modalities, maybe eventually some others) into a jsonld file so we can push it to a graph database and run cross-dataset cohort queries on. And to not implement another BIDS API for this.

So now I’m wondering: what else could this be useful for? And how could we make it easy to reuse this in other apps (for example a plugin)?

Since we need the functionality for our Neurobagel · GitHub project, I’ll definitely spend some time on figuring this out and I’m thinking of submitting this as a hackathon project.

Would others be interested in working together on this, or have some use cases for a browser based BIDS parser that could be interesting to explore?

Best,
Seb

1 Like