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

Add explaining comment about why we have all these OPTIONAL statements for session attributes #409

Open
surchs opened this issue Feb 5, 2025 · 0 comments
Labels
documentation Changes only affect the documentation usability Issue affecting user or developer experience.

Comments

@surchs
Copy link
Contributor

surchs commented Feb 5, 2025

We have these optional statements in the default query

api/app/api/utility.py

Lines 252 to 257 in e1a2707

OPTIONAL {{?dataset_uuid nb:hasPortalURI ?dataset_portal_uri.}}
OPTIONAL {{?session nb:hasAge ?age.}}
OPTIONAL {{?session nb:hasSex ?sex.}}
OPTIONAL {{?session nb:hasDiagnosis ?diagnosis.}}
OPTIONAL {{?session nb:isSubjectGroup ?subject_group.}}
OPTIONAL {{?session nb:hasAssessment ?assessment.}}

They are (most likely) required, in order for the query to still match subjects who do not have phenotypic sessions with these atributes. @alyssadai, if you find he PR where we introduced the OPIONAL statements and / or can provide the reason for why they are there, please add it here.

Since we're already a bit confused about them, we should add an explainin comment above the query template string in the code that explains why they are there.

@surchs surchs added documentation Changes only affect the documentation usability Issue affecting user or developer experience. labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Changes only affect the documentation usability Issue affecting user or developer experience.
Projects
Status: No status
Development

No branches or pull requests

1 participant