Wiki source code of Try it yourself!

Version 2.2 by maaike on 2022/06/28 09:44

Show last authors
1 == User examples ==
2
3
4 1. How many datasets used human subjects?
5 1. Find datasets with male adult subjects
6 1. Find datasets that contain NIfTI files
7 1. Find the software that can be used to open .smr file formats?
8
9 === ===
10
11 ==== Example 1 - How many datasets used human subjects? ====
12
13 **Search UI**
14
15 In the filter function, select "Homo Sapiens" under species. This filters the available datasets in the Knowledge Graph for human subjects only.
16
17 [[https:~~/~~/search.kg.ebrains.eu/?facet_type[0]=Dataset&facet_Dataset_speciesFilter[0]=Homo%20sapiens>>https://search.kg.ebrains.eu/?facet_type[0]=Dataset&facet_Dataset_speciesFilter[0]=Homo%20sapiens]]
18
19 **Query Builder**
20
21
22 ==== Example 2 - Find datasets with male adult subjects ====
23
24 **Search UI**
25
26 All the metadata in the knowledge graph is represented by nodes and their relationships by the edges. Most of the "basic" metadata is visualised in the Search UI to make it easy for the user to find datasets that fit certain criteria without needing to know how to navigate and traverse a graph structure.
27
28 **Query Builder**
29
30 {{code language="python"}}
31 query = {
32 "@context": {
33 "@vocab": "https://core.kg.ebrains.eu/vocab/query/",
34 "query": "https://schema.hbp.eu/myQuery/",
35 "propertyName": {
36 "@id": "propertyName",
37 "@type": "@id"
38 },
39 "path": {
40 "@id": "path",
41 "@type": "@id"
42 }
43 },
44 "meta": {
45 "type": "https://openminds.ebrains.eu/core/DatasetVersion",
46 "responseVocab": "https://schema.hbp.eu/myQuery/"
47 },
48 "structure": [
49 {
50 "propertyName": "query:id",
51 "path": "@id"
52 },
53 {
54 "propertyName": "query:shortName",
55 "path": "https://openminds.ebrains.eu/vocab/shortName"
56 },
57 {
58 "propertyName": "query:studiedSpecimen",
59 "path": "https://openminds.ebrains.eu/vocab/studiedSpecimen",
60 "required": true,
61 "structure": [
62 {
63 "propertyName": "query:id",
64 "path": "@id"
65 },
66 {
67 "propertyName": "query:biologicalSex",
68 "path": "https://openminds.ebrains.eu/vocab/biologicalSex",
69 "required": true,
70 "structure": {
71 "propertyName": "query:name",
72 "path": "https://openminds.ebrains.eu/vocab/name",
73 "required": true,
74 "filter": {
75 "op": "EQUALS",
76 "value": "male"
77 }
78 }
79 },
80 {
81 "propertyName": "query:studiedState",
82 "path": "https://openminds.ebrains.eu/vocab/studiedState",
83 "required": true,
84 "structure": {
85 "propertyName": "query:ageCategory",
86 "path": "https://openminds.ebrains.eu/vocab/ageCategory",
87 "required": true,
88 "structure": {
89 "propertyName": "query:name",
90 "path": "https://openminds.ebrains.eu/vocab/name",
91 "required": true,
92 "filter": {
93 "op": "EQUALS",
94 "value": "adult"
95 }
96 }
97 }
98 }
99 ]
100 }
101 ]
102 }
103 {{/code}}
104
105 ==== Example 3 - Find datasets that contain NIfTI files ====
106
107 **Search UI**
108
109 Files are organised based on their file format (i.e. file extension) and the software that could be used to open these files. In openMINDS this is captured with the content type. In the filter function, select "application/vnd.nifti.1" under content types to select all the dataset with a NIfTI 1 file format.
110
111 [[[[image:ContentTypes.png]]>>https://search.kg.ebrains.eu/?facet_type[0]=Dataset&facet_Dataset_contentTypes[0]=application%2Fvnd.nifti.1]]
112
113 [[https:~~/~~/search.kg.ebrains.eu/?facet_type[0]=Dataset&facet_Dataset_contentTypes[0]=application%2Fvnd.nifti.1>>https://search.kg.ebrains.eu/?facet_type[0]=Dataset&facet_Dataset_contentTypes[0]=application%2Fvnd.nifti.1]]
114
115 **Query Builder**
116
117