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

Retrieving model with uuid and alias gives different results #339

Open
apdavison opened this issue Jun 6, 2023 · 1 comment
Open

Retrieving model with uuid and alias gives different results #339

apdavison opened this issue Jun 6, 2023 · 1 comment

Comments

@apdavison
Copy link
Member

There are a few minor differences in "description" and "format" (null vs []). The main difference is that the parameters field of the model instance is empty when the model is retrieved via alias.

https://validation.brainsimulation.eu/models/32dc30ba-3de3-4c75-83f7-5c930de346d7

{
  "id": "32dc30ba-3de3-4c75-83f7-5c930de346d7",
  "uri": "https://kg.ebrains.eu/api/instances/32dc30ba-3de3-4c75-83f7-5c930de346d7",
  "name": "Reduced striatum microcircuit",
  "alias": "striatum_microcircuit_test",
  "author": [
     ...cut to save space...
  ],
  "owner": [
    {
      "given_name": "Andrew P.",
      "family_name": "Davison",
      "orcid": "https://orcid.org/0000-0002-4793-7541"
    }
  ],
  "project_id": "basal-ganglia-validation",
  "organization": null,
  "private": true,
  "cell_type": null,
  "model_scope": "network: microcircuit",
  "abstraction_level": "spiking neurons: biophysical",
  "brain_region": "striatum",
  "species": "Mus musculus",
  "description": "This is a small-scale model of the striatum microcircuit, used only for testing the EBRAINS Model Validation Framework",
  "date_created": "2023-06-06",
  "format": null,
  "images": null,
  "old_uuid": null,
  "instances": [
    {
      "id": "82f5a109-7fbc-4070-82b9-155d118ac462",
      "uri": "https://kg.ebrains.eu/api/instances/82f5a109-7fbc-4070-82b9-155d118ac462",
      "version": "20230606",
      "description": "",
      "parameters": "https://data-proxy.ebrains.eu/api/v1/buckets/basal-ganglia-validation/model_parameters/striatum_microcircuit_20230606.json",
      "code_format": null,
      "source": "https://github.com/apdavison/basalunit",
      "license": "The 3-Clause BSD License",
      "hash": null,
      "timestamp": "2023-06-06",
      "morphology": null,
      "model_id": "32dc30ba-3de3-4c75-83f7-5c930de346d7",
      "alternatives": []
    }
  ]
}

https://validation.brainsimulation.eu/models/striatum_microcircuit_test

{
  "id": "32dc30ba-3de3-4c75-83f7-5c930de346d7",
  "uri": "https://kg.ebrains.eu/api/instances/32dc30ba-3de3-4c75-83f7-5c930de346d7",
  "name": "Reduced striatum microcircuit",
  "alias": "striatum_microcircuit_test",
  "author": [
      ...cut to save space...
  ],
  "owner": [
    {
      "given_name": "Andrew P.",
      "family_name": "Davison",
      "orcid": "https://orcid.org/0000-0002-4793-7541"
    }
  ],
  "project_id": "basal-ganglia-validation",
  "organization": null,
  "private": true,
  "cell_type": null,
  "model_scope": "network: microcircuit",
  "abstraction_level": "spiking neurons: biophysical",
  "brain_region": "striatum",
  "species": "Mus musculus",
  "description": "This is a small-scale model of the striatum microcircuit, used only for testing the EBRAINS Model Validation Framework",
  "date_created": "2023-06-06",
  "format": [],
  "images": null,
  "old_uuid": null,
  "instances": [
    {
      "id": "82f5a109-7fbc-4070-82b9-155d118ac462",
      "uri": "https://kg.ebrains.eu/api/instances/82f5a109-7fbc-4070-82b9-155d118ac462",
      "version": "20230606",
      "description": null,
      "parameters": null,
      "code_format": null,
      "source": "https://github.com/apdavison/basalunit",
      "license": "The 3-Clause BSD License",
      "hash": null,
      "timestamp": "2023-06-06",
      "morphology": null,
      "model_id": "32dc30ba-3de3-4c75-83f7-5c930de346d7",
      "alternatives": []
    }
  ]
}

Context:

{
  "version": "3beta",
  "datastore": "core.kg.ebrains.eu",
  "build": {
    "git": "8d916b33",
    "target": "production",
    "date": "2023-05-12T11:22:56+02:00"
  }
}
@apdavison
Copy link
Member Author

The missing parameters field was fixed by updating the stored query.

The current query is

{
  "@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": {
    "name": "VF_ScientificModel",
    "responseVocab": "https://schema.hbp.eu/myQuery/",
    "type": "https://openminds.ebrains.eu/core/Model"
  },
  "structure": [
    {
      "propertyName": "query:uri",
      "path": "@id",
      "filter": {
        "op": "CONTAINS",
        "parameter": "id"
      }
    },
    {
      "propertyName": "query:name",
      "path": "https://openminds.ebrains.eu/vocab/fullName",
      "filter": {
        "op": "CONTAINS",
        "parameter": "name"
      }
    },
    {
      "propertyName": "query:alias",
      "path": "https://openminds.ebrains.eu/vocab/shortName",
      "filter": {
        "op": "EQUALS",
        "parameter": "alias"
      }
    },
    {
      "propertyName": "query:author",
      "path": {
        "@id": "https://openminds.ebrains.eu/vocab/developer",
        "typeFilter": {
          "@id": "https://openminds.ebrains.eu/core/Person"
        }
      },
      "required": true,
      "ensureOrder": true,
      "structure": [
        {
          "propertyName": "query:given_name",
          "path": "https://openminds.ebrains.eu/vocab/givenName"
        },
        {
          "propertyName": "query:family_name",
          "path": "https://openminds.ebrains.eu/vocab/familyName",
          "filter": {
            "op": "EQUALS",
            "parameter": "author"
          }
        },
        {
          "propertyName": "query:orcid",
          "singleValue": "FIRST",
          "path": [
            "https://openminds.ebrains.eu/vocab/digitalIdentifier",
            "https://openminds.ebrains.eu/vocab/identifier"
          ]
        }
      ]
    },
    {
      "propertyName": "query:owner",
      "path": {
        "@id": "https://openminds.ebrains.eu/vocab/custodian",
        "typeFilter": {
          "@id": "https://openminds.ebrains.eu/core/Person"
        }
      },
      "ensureOrder": true,
      "structure": [
        {
          "propertyName": "query:given_name",
          "path": "https://openminds.ebrains.eu/vocab/givenName"
        },
        {
          "propertyName": "query:family_name",
          "path": "https://openminds.ebrains.eu/vocab/familyName",
          "filter": {
            "op": "EQUALS",
            "parameter": "owner"
          }
        },
        {
          "propertyName": "query:orcid",
          "singleValue": "FIRST",
          "path": [
            "https://openminds.ebrains.eu/vocab/digitalIdentifier",
            "https://openminds.ebrains.eu/vocab/identifier"
          ]
        }
      ]
    },
    {
      "propertyName": "query:project_id",
      "path": "https://core.kg.ebrains.eu/vocab/meta/space"
    },
    {
      "propertyName": "query:organization",
      "ensureOrder": true,
      "singleValue": "FIRST",
      "filter": {
        "op": "EQUALS",
        "parameter": "organization"
      },
      "path": [
        {
          "@id": "https://openminds.ebrains.eu/vocab/custodian",
          "typeFilter": {
            "@id": "https://openminds.ebrains.eu/core/Organization"
          }
        },
        "https://openminds.ebrains.eu/vocab/fullName"
      ]
    },
    {
      "propertyName": "query:cell_type",
      "singleValue": "FIRST",
      "filter": {
        "op": "CONTAINS",
        "parameter": "cell_type"
      },
      "path": [
        {
          "@id": "https://openminds.ebrains.eu/vocab/studyTarget",
          "typeFilter": {
            "@id": "https://openminds.ebrains.eu/controlledTerms/CellType"
          }
        },
        "https://openminds.ebrains.eu/vocab/name"
      ]
    },
    {
      "propertyName": "query:model_scope",
      "singleValue": "FIRST",
      "filter": {
        "op": "CONTAINS",
        "parameter": "model_scope"
      },
      "path": [
        "https://openminds.ebrains.eu/vocab/scope",
        "https://openminds.ebrains.eu/vocab/name"
      ]
    },
    {
      "propertyName": "query:abstraction_level",
      "singleValue": "FIRST",
      "filter": {
        "op": "CONTAINS",
        "parameter": "abstraction_level"
      },
      "path": [
        "https://openminds.ebrains.eu/vocab/abstractionLevel",
        "https://openminds.ebrains.eu/vocab/name"
      ]
    },
    {
      "propertyName": "query:brain_region",
      "singleValue": "FIRST",
      "filter": {
        "op": "CONTAINS",
        "parameter": "brain_region"
      },
      "path": [
        {
          "@id": "https://openminds.ebrains.eu/vocab/studyTarget",
          "typeFilter": {
            "@id": "https://openminds.ebrains.eu/controlledTerms/UBERONParcellation"
          }
        },
        "https://openminds.ebrains.eu/vocab/name"
      ]
    },
    {
      "propertyName": "query:species",
      "singleValue": "FIRST",
      "filter": {
        "op": "CONTAINS",
        "parameter": "species"
      },
      "path": [
        {
          "@id": "https://openminds.ebrains.eu/vocab/studyTarget",
          "typeFilter": {
            "@id": "https://openminds.ebrains.eu/controlledTerms/Species"
          }
        },
        "https://openminds.ebrains.eu/vocab/name"
      ]
    },
    {
      "propertyName": "query:description",
      "path": "https://openminds.ebrains.eu/vocab/description"
    },
    {
      "propertyName": "query:instances",
      "path": "https://openminds.ebrains.eu/vocab/hasVersion",
      "required": true,
      "ensureOrder": true,
      "structure": [
        {
          "propertyName": "query:uri",
          "path": "@id"
        },
        {
          "propertyName": "query:version",
          "path": "https://openminds.ebrains.eu/vocab/versionIdentifier"
        },
        {
          "propertyName": "query:code_format",
          "ensureOrder": true,
          "singleValue": "FIRST",
          "filter": {
            "op": "CONTAINS",
            "parameter": "format"
          },
          "path": [
            "https://openminds.ebrains.eu/vocab/format",
            "https://openminds.ebrains.eu/vocab/name"
          ]
        },
        {
          "propertyName": "query:source",
          "singleValue": "FIRST",
          "path": [
            "https://openminds.ebrains.eu/vocab/repository",
            "https://openminds.ebrains.eu/vocab/IRI"
          ]
        },
        {
          "propertyName": "query:license",
          "singleValue": "FIRST",
          "path": [
            "https://openminds.ebrains.eu/vocab/license",
            "https://openminds.ebrains.eu/vocab/fullName"
          ]
        },
        {
          "propertyName": "query:repository",
          "singleValue": "FIRST",
          "path": [
            "https://openminds.ebrains.eu/vocab/repository",
            "https://openminds.ebrains.eu/vocab/hash",
            "https://openminds.ebrains.eu/vocab/digest"
          ]
        },
        {
          "propertyName": "query:timestamp",
          "path": "https://openminds.ebrains.eu/vocab/releaseDate"
        },
        {
          "propertyName": "query:model_id",
          "singleValue": "FIRST",
          "path": [
            {
              "@id": "https://openminds.ebrains.eu/vocab/hasVersion",
              "reverse": true
            },
            "@id"
          ]
        },
        {
          "propertyName": "query:alternatives",
          "ensureOrder": true,
          "path": [
            "https://openminds.ebrains.eu/vocab/isAlternativeVersionOf",
            "https://openminds.ebrains.eu/vocab/homepage"
          ],
          "structure": {
            "propertyName": "query:IRI",
            "path": "https://openminds.ebrains.eu/vocab/IRI"
          }
        },
        {
          "propertyName": "query:description",
          "path": "https://openminds.ebrains.eu/vocab/versionInnovation"
        },
        {
          "propertyName": "query:inputData",
          "path": [
            {
              "@id": "https://openminds.ebrains.eu/vocab/inputData",
              "typeFilter": [
                {
                  "@id": "https://openminds.ebrains.eu/core/File"
                },
                {
                  "@id": "https://openminds.ebrains.eu/core/WebResource"
                }
              ]
            },
            "https://openminds.ebrains.eu/vocab/IRI"
          ]
        },
        {
          "propertyName": "query:inputData",
          "path": [
            {
              "@id": "https://openminds.ebrains.eu/vocab/inputData",
              "typeFilter": [
                {
                  "@id": "https://openminds.ebrains.eu/core/WebResource"
                },
                {
                  "@id": "https://openminds.ebrains.eu/core/File"
                }
              ]
            },
            "https://openminds.ebrains.eu/vocab/IRI"
          ]
        }
      ]
    },
    {
      "propertyName": "query:format",
      "path": [
        "https://openminds.ebrains.eu/vocab/hasVersion",
        "https://openminds.ebrains.eu/vocab/format",
        "https://openminds.ebrains.eu/vocab/name"
      ]
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant