Changes for page 3 Try it yourself!

Last modified by maaike on 2022/07/06 10:08

From version 2.6
edited by maaike
on 2022/06/28 15:34
Change comment: There is no comment for this version
To version 2.3
edited by maaike
on 2022/06/28 10:10
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -8,27 +8,25 @@
8 8  
9 9  === ===
10 10  
11 -=== Example 1 - How many datasets used human subjects? ===
11 +==== Example 1 - How many datasets used human subjects? ====
12 12  
13 -==== **Search UI** ====
13 +**Search UI**
14 14  
15 15  In the filter function, select "Homo Sapiens" under species. This filters the available datasets in the Knowledge Graph for human subjects only.
16 16  
17 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 18  
19 -==== **Query Builder** ====
19 +**Query Builder**
20 20  
21 21  
22 -=== Example 2 - Find datasets with male adult subjects ===
22 +==== Example 2 - Find datasets with male adult subjects ====
23 23  
24 -==== **Search UI** ====
24 +**Search UI**
25 25  
26 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 27  
28 -==== **Query Builder** ====
28 +**Query Builder**
29 29  
30 -For dataset versions that use male adult subjects, we can filter datasets using these 2 properties. The easiest way is to add a required filter to biological sex that is "EQUAL" to "male" and the age category "EQUAL" to
31 -
32 32  {{code language="python"}}
33 33  query = {
34 34   "@context": {
... ... @@ -104,9 +104,9 @@
104 104  }
105 105  {{/code}}
106 106  
107 -=== Example 3 - Find datasets that contain NIfTI files ===
105 +==== Example 3 - Find datasets that contain NIfTI files ====
108 108  
109 -==== **Search UI** ====
107 +**Search UI**
110 110  
111 111  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.
112 112  
... ... @@ -114,14 +114,8 @@
114 114  
115 115  [[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]]
116 116  
117 -==== **Query Builder** ====
115 +**Query Builder**
118 118  
119 -To find datasets with a particular file format in it, we can either write a query for 1) the file extension or 2) based on the content type. The difference between the two approaches is that the first approach just looks at the file extension without considering the what type of file format it is and what software can be used to open it. For example, both nifti 1 and nifti 2 files have the same extension. The nifti 2 format is an update of nifti 1 and will not be recognised as a valid nifti 1 format. This is important when considering what program to use when opening the files. To be able to differentiate, we describe the files with content types that tell the user what type of file format it is and we have linked a number of software applications to that content type to facilitate reuse of the data.
120 -
121 -**Query datasets based on file extension**
122 -
123 -We can restrict the search results with a filter using a required field. In this particular case a filter that "ENDS_WITH" a value (e.g. .nii.gz) could be used. We can use .nii for normal nifti files or .nii.gz for compressed nifty files.
124 -
125 125  {{code language="python"}}
126 126  query = {
127 127   "@context": {
... ... @@ -174,64 +174,3 @@
174 174   ]
175 175  }
176 176  {{/code}}
177 -
178 - **Query datasets based on content type**
179 -
180 -To find datasets using the content type structure, we can use a filter that "CONTAINS" a value (e.g. nifti). We are now not distinguishing between nifti 1 or nifti 2 files, but select all files that are classified as "nifti". If you want to narrow down the results further, you could replace "nifti" by "nifti.1" or "nifti.2".
181 -
182 -{{code language="python"}}
183 -query = {
184 - "@context": {
185 - "@vocab": "https://core.kg.ebrains.eu/vocab/query/",
186 - "query": "https://schema.hbp.eu/myQuery/",
187 - "propertyName": {
188 - "@id": "propertyName",
189 - "@type": "@id"
190 - },
191 - "path": {
192 - "@id": "path",
193 - "@type": "@id"
194 - }
195 - },
196 - "meta": {
197 - "type": "https://openminds.ebrains.eu/core/DatasetVersion",
198 - "responseVocab": "https://schema.hbp.eu/myQuery/"
199 - },
200 - "structure": [
201 - {
202 - "propertyName": "query:shortName",
203 - "path": "https://openminds.ebrains.eu/vocab/shortName"
204 - },
205 - {
206 - "propertyName": "query:id",
207 - "path": "@id"
208 - },
209 - {
210 - "propertyName": "query:repository",
211 - "path": "https://openminds.ebrains.eu/vocab/repository",
212 - "required": true,
213 - "structure": {
214 - "propertyName": "query:contentTypePattern",
215 - "path": "https://openminds.ebrains.eu/vocab/contentTypePattern",
216 - "required": true,
217 - "structure": {
218 - "propertyName": "query:contentType",
219 - "path": "https://openminds.ebrains.eu/vocab/contentType",
220 - "required": true,
221 - "structure": {
222 - "propertyName": "query:name",
223 - "path": "https://openminds.ebrains.eu/vocab/name",
224 - "required": true,
225 - "filter": {
226 - "op": "CONTAINS",
227 - "value": "nifti"
228 - }
229 - }
230 - }
231 - }
232 - }
233 - ]
234 -}
235 -{{/code}}
236 -
237 -