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

New function to_json_ld to output features to json-ld #360

Closed
wants to merge 3 commits into from
Closed

Conversation

anilbey
Copy link
Contributor

@anilbey anilbey commented Jan 18, 2024

Description

Adds a new function to output efel's features to JSON-LD format with annotations for the feature ids and the units.

Below is the classical output of eFEL extracted on 2 traces using 2 features.

[
        {
            "AHP_depth": np.array([26.998080940503804, 27.3636342342]),
            "AP_amplitude": np.array([72.0, 72.0]),
        },
        {
            "AHP_depth": np.array([56.3645747546, 55.142543543]),
            "AP_amplitude": np.array([74.2, 73.2]),
        },
]

It's corresponding json-ld output is the following.

{
  "@context": "https://bbp.neuroshapes.org",
  "data": [
    {
      "AHP_depth": [
        26.998080940503804,
        27.3636342342
      ],
      "AP_amplitude": [
        72.0,
        72.0
      ]
    },
    {
      "AHP_depth": [
        56.3645747546,
        55.142543543
      ],
      "AP_amplitude": [
        74.2,
        73.2
      ]
    }
  ],
  "AHP_depth": {
    "@id": "https://bbp.epfl.ch/ontologies/core/efeatures/AHP_depth",
    "unit": "https://neuroshapes.org/units/mV"
  },
  "AP_amplitude": {
    "@id": "https://bbp.epfl.ch/ontologies/core/efeatures/AP_amplitude",
    "unit": "https://neuroshapes.org/units/mV"
  }
}

Checklist:

  • Unit tests are added to cover the changes (skip if not applicable).
  • The changes are mentioned in the documentation (skip if not applicable).
  • CHANGELOG file is updated (skip if not applicable).

@anilbey anilbey closed this Jan 22, 2024
@anilbey
Copy link
Contributor Author

anilbey commented Jan 22, 2024

https://github.com/BlueBrain/bbp-ontologies/ has a more detailed mapping of efel features into the knowledge graph.

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

Successfully merging this pull request may close these issues.

1 participant