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

Update /data_objects/study/{study_id} so it supports umbrella/parents studies as well #740

Open
sujaypatil96 opened this issue Oct 29, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sujaypatil96
Copy link
Collaborator

Currently, the logic in the method behind the /data_objects/study/{study_id} endpoint works well only for individual studies that are not umbrella/parent studies.

For example, consider nmdc:sty-11-nxrz9m96 which is composed of 3 child studies should return data objects coming from 5227 samples.

Question from Sujay on PR #738:

A follow up question would be, given an umbrella study, say, nmdc:sty-11-nxrz9m96 in it's object form, how would we know that there are child studies associated with it?

Answer from @aclum:

given the directionality of the modeling you have to check studies of type nmdc:Study to see if any of them are part_of a parent study. Right now the nesting is only of depth 1 but here is nothing that prevents more nesting & it is allowed to be multivalued (nmdc:sty-11-5tgfr349 is part_of 3 different parent studies.) so this should be a loop until no records are returned.

@sujaypatil96 sujaypatil96 added the enhancement New feature or request label Oct 29, 2024
@sujaypatil96 sujaypatil96 self-assigned this Oct 29, 2024
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

1 participant