Open bendichter opened 4 months ago
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.
I was thinking more for remote dandisets but I suppose either could be useful.
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).
Or it could be named
.get_subject_ids
or something like that. It would return a list of the subject IDs.