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

request: dandiset.get_subjects() in the Python API #1457

Open
bendichter opened this issue Jul 10, 2024 · 3 comments
Open

request: dandiset.get_subjects() in the Python API #1457

bendichter opened this issue Jul 10, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request UX

Comments

@bendichter
Copy link
Member

Or it could be named .get_subject_ids or something like that. It would return a list of the subject IDs.

@yarikoptic yarikoptic added enhancement New feature or request UX labels Aug 26, 2024
@yarikoptic
Copy link
Member

ATM we have separate abstractions for local and remote Dandisets (@jwodder could correct me if I am wrong). Which one of more interest for you here @bendichter ?

We could also have both DANDI and BIDS dandisets. In BIDS there could be a case where subject_id is also present in participants.tsv and have no sub- folder. Anyways for BIDS -- worth looking into integrating/reusing other BIDS-oriented frameworks (pybids etc). With DANDI layouts - also see if/how we could avoid reinventing the wheel.

@bendichter
Copy link
Member Author

I was thinking more for remote dandisets but I suppose either could be useful.

@yarikoptic
Copy link
Member

indeed. Let's aim to implement get_subject_ids for both, which would be based on pretty much what we already have in https://github.com/dandi/dandi-schema/blob/HEAD/dandischema/metadata.py#L392 but there we go through all the assets, and here we would want to avoid that and just list folders sub- folders at the top level (remote or local), sanitize labels, and return them (likely sorted for consistency).

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

No branches or pull requests

3 participants