-
Notifications
You must be signed in to change notification settings - Fork 14
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
how to access the layout of a dataset? #223
Comments
Not yet, but this has come up before and should be low-hanging fruit. We can definitely prioritize this. I think a reasonable API would be to just have a |
Thanks. For now I can still reindex the dataset but it will become a pain for large datasets. |
Note that another workaround right now would be to use the --pybidsdb-dir option in snakebids to avoid re-indexing, and always use the same path to the pybidsdb directory (e.g. We also have this useful tool for generating the pybids db dir on a network file system (https://github.com/pvandyken/pybidsdb) |
I'm actually facing a bit of an implementation detail on this, having to do with the types and the fact that, in testing, the fake There's two approaches to this: one is an class BidsDataset:
layout: Optional[BIDSLayout] = None I don't care for this because in practice, any The other is to have two classes class AbstractBidsDataset:
...
class BidsDataset(AbstractBidsDataset):
layout: BIDSLayout I'm planning on going with this approach: the implementation is invisible to the user and it solves the problem in the first approach. |
I have a bids apps that requires to get some "stats" about the dataset as a whole (on top of accessing some specific files).
Is there a way that snakebids "exposes" the layout so I can access it in script or should I just create a script that will reindex the dataset with pybids?
The text was updated successfully, but these errors were encountered: