Skip to content

Commit

Permalink
[MNT] Update default Neurobagel SPARQL query file and turn into PR ch…
Browse files Browse the repository at this point in the history
…eckbox (#359)

* add PR checkbox for regenerating default query file

* regenerate default query file
  • Loading branch information
alyssadai authored Oct 17, 2024
1 parent 30d447f commit 5a42a7c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ _This section is for the PR reviewer_
- [ ] PR links to GitHub issue with mention `Closes #XXXX`
- [ ] Tests pass
- [ ] Checks pass
- [ ] If the PR changes the SPARQL query template, the default Neurobagel query file has also been [regenerated](https://github.com/neurobagel/api?tab=readme-ov-file#the-default-neurobagel-sparql-query)

For new features:
- [ ] Tests have been added
Expand Down
5 changes: 4 additions & 1 deletion docs/default_neurobagel_query.rq
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ PREFIX nbg: <http://neurobagel.org/graph/>
PREFIX ncit: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#>
PREFIX nidm: <http://purl.org/nidash/nidm#>
PREFIX snomed: <http://purl.bioontology.org/ontology/SNOMEDCT/>
PREFIX np: <https://github.com/nipoppy/pipeline-catalog/tree/main/processing/>

SELECT DISTINCT ?dataset_uuid ?dataset_name ?dataset_portal_uri ?sub_id ?age ?sex
?diagnosis ?subject_group ?num_matching_phenotypic_sessions ?num_matching_imaging_sessions ?session_id ?session_type ?assessment ?image_modal ?session_file_path ?pipeline_name ?pipeline_version
?diagnosis ?subject_group ?num_matching_phenotypic_sessions ?num_matching_imaging_sessions
?session_id ?session_type ?assessment ?image_modal ?session_file_path ?pipeline_name ?pipeline_version
WHERE {
?dataset_uuid a nb:Dataset;
nb:hasLabel ?dataset_name;
Expand Down Expand Up @@ -41,6 +43,7 @@ WHERE {

} GROUP BY ?subject
}

OPTIONAL {
?session nb:hasCompletedPipeline ?pipeline.
?pipeline nb:hasPipelineVersion ?pipeline_version.
Expand Down

0 comments on commit 5a42a7c

Please sign in to comment.