User examples
- How many datasets used human subjects?
- Find datasets with male adult subjects
- Find datasets that contain NIfTI files
- Find the software that can be used to open .smr file formats?
Example 1 - How many datasets used human subjects?
Search UI
In the filter function, select "Homo Sapiens" under species. This filters the available datasets in the Knowledge Graph for human subjects only.
https://search.kg.ebrains.eu/?facet_type[0]=Dataset&facet_Dataset_speciesFilter[0]=Homo%20sapiens
Query Builder
Example 2 - Find datasets with male adult subjects
Search UI
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.
Query Builder
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 "adult". By selecting the filter "EQUAL" instead of "CONTAINS", we ensure that only datasets with adult animals are found. If we want to be more general and include all subjects from the onset of sexual maturity, we can use "CONTAINS" instead as this will include subjects with the age category "prime adult", "young adult" and "late adult" as well.
"@context": {
"@vocab": "https://core.kg.ebrains.eu/vocab/query/",
"query": "https://schema.hbp.eu/myQuery/",
"propertyName": {
"@id": "propertyName",
"@type": "@id"
},
"path": {
"@id": "path",
"@type": "@id"
}
},
"meta": {
"type": "https://openminds.ebrains.eu/core/DatasetVersion",
"responseVocab": "https://schema.hbp.eu/myQuery/"
},
"structure": [
{
"propertyName": "query:id",
"path": "@id"
},
{
"propertyName": "query:shortName",
"path": "https://openminds.ebrains.eu/vocab/shortName"
},
{
"propertyName": "query:studiedSpecimen",
"path": "https://openminds.ebrains.eu/vocab/studiedSpecimen",
"required": true,
"structure": [
{
"propertyName": "query:id",
"path": "@id"
},
{
"propertyName": "query:biologicalSex",
"path": "https://openminds.ebrains.eu/vocab/biologicalSex",
"required": true,
"structure": {
"propertyName": "query:name",
"path": "https://openminds.ebrains.eu/vocab/name",
"required": true,
"filter": {
"op": "EQUALS",
"value": "male"
}
}
},
{
"propertyName": "query:studiedState",
"path": "https://openminds.ebrains.eu/vocab/studiedState",
"required": true,
"structure": {
"propertyName": "query:ageCategory",
"path": "https://openminds.ebrains.eu/vocab/ageCategory",
"required": true,
"structure": {
"propertyName": "query:name",
"path": "https://openminds.ebrains.eu/vocab/name",
"required": true,
"filter": {
"op": "EQUALS",
"value": "adult"
}
}
}
}
]
}
]
}
Example 3 - Find datasets that contain NIfTI files
Search UI
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.
Query Builder
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.
Query datasets based on file extension
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.
"@context": {
"@vocab": "https://core.kg.ebrains.eu/vocab/query/",
"query": "https://schema.hbp.eu/myQuery/",
"propertyName": {
"@id": "propertyName",
"@type": "@id"
},
"path": {
"@id": "path",
"@type": "@id"
}
},
"meta": {
"type": "https://openminds.ebrains.eu/core/DatasetVersion",
"responseVocab": "https://schema.hbp.eu/myQuery/"
},
"structure": [
{
"propertyName": "query:shortName",
"path": "https://openminds.ebrains.eu/vocab/shortName"
},
{
"propertyName": "query:id",
"path": "@id"
},
{
"propertyName": "query:repository",
"path": "https://openminds.ebrains.eu/vocab/repository",
"required": true,
"structure": {
"propertyName": "query:fileRepository",
"path": {
"@id": "https://openminds.ebrains.eu/vocab/fileRepository",
"reverse": true
},
"required": true,
"structure": {
"propertyName": "query:name",
"path": "https://openminds.ebrains.eu/vocab/name",
"required": true,
"filter": {
"op": "ENDS_WITH",
"value": ".nii.gz"
}
}
}
}
]
}
Query datasets based on content type
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".
"@context": {
"@vocab": "https://core.kg.ebrains.eu/vocab/query/",
"query": "https://schema.hbp.eu/myQuery/",
"propertyName": {
"@id": "propertyName",
"@type": "@id"
},
"path": {
"@id": "path",
"@type": "@id"
}
},
"meta": {
"type": "https://openminds.ebrains.eu/core/DatasetVersion",
"responseVocab": "https://schema.hbp.eu/myQuery/"
},
"structure": [
{
"propertyName": "query:shortName",
"path": "https://openminds.ebrains.eu/vocab/shortName"
},
{
"propertyName": "query:id",
"path": "@id"
},
{
"propertyName": "query:repository",
"path": "https://openminds.ebrains.eu/vocab/repository",
"required": true,
"structure": {
"propertyName": "query:contentTypePattern",
"path": "https://openminds.ebrains.eu/vocab/contentTypePattern",
"required": true,
"structure": {
"propertyName": "query:contentType",
"path": "https://openminds.ebrains.eu/vocab/contentType",
"required": true,
"structure": {
"propertyName": "query:name",
"path": "https://openminds.ebrains.eu/vocab/name",
"required": true,
"filter": {
"op": "CONTAINS",
"value": "nifti"
}
}
}
}
}
]
}