Skip to content

MATLAB package for the openMINDS metadata models. The package contains all openMINDS schemas as MATLAB classes in addition to schema base classes and utility methods

License

Notifications You must be signed in to change notification settings

openMetadataInitiative/openMINDS_MATLAB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openMINDS-MATLAB-logo

openMINDS Metadata Models for MATLAB

Version Number Open in MATLAB Online View openMINDS_MATLAB on File Exchange MATLAB Tests codecov MATLAB Code Issues Maintenance

Requirements and InstallationBefore you startGetting StartedAcknowledgements


MATLAB package for the openMINDS metadata framework for linked data in neuroscience. The package contains all the latest openMINDS schemas as MATLAB classes in addition to schema base classes and utility methods.

To generally learn more about the openMINDS metadata framework please go to ➡️ ReadTheDocs.
You can test and learn how to use openMINDS in MATLAB by going through a small ➡️ DEMO on MATLAB Online.

MathWorks provides a free basic version of MATLAB Online, but you need to register for a MathWorks Account.

Requirements and Installation

(Back to top)

openMINDS for MATLAB requires MATLAB R2022b or later. The toolbox can be installed from MATLAB's Add-On Explorer (recommended). It is also possible to download the MATLAB toolbox from FileExchange or from the Releases page of this repository and install it manually. If you are new to MATLAB, see the detailed installation instructions

Before you start

(Back to top)

% Verify that openMINDS_MATLAB is installed
disp( openminds.toolboxversion )
Version 0.9.1

If you have installed openMINDS_MATLAB and the above command does not work, most likely openMINDS_MATLAB is not added to MATLAB's search path.

Getting Started

(Back to top)

See also: Crew Member Collection Tutorial

Configure MATLAB's path to use the latest model versions

% Schema classes for all the openMINDS model versions are available in this
% toolbox. To ensure the latest version is used, run the following command:
openminds.startup("latest")

Import schemas from the core model

import openminds.core.*

Create a Subject

% Create a new demo subject
subject1 = Subject('species', 'musMusculus', 'biologicalSex', 'male', 'lookupLabel', 'demo_subject1');
disp(subject1)
  Subject (https://openminds.ebrains.eu/core/Subject) with properties:
         biologicalSex: male  (BiologicalSex)
    internalIdentifier: ""
              isPartOf: [None]  (SubjectGroup)
           lookupLabel: "demo_subject1"
               species: Mus musculus  (One of: Species, Strain)
          studiedState: [None]  (SubjectState)
  Required Properties: species, studiedState

Create a Subject State

subjectState = openminds.core.SubjectState('lookupLabel', 'demo_state')
subjectState = 
  SubjectState (https://openminds.ebrains.eu/core/SubjectState) with properties:
         additionalRemarks: ""
                       age: [None]  (One of: QuantitativeValue, QuantitativeValueRange)
               ageCategory: [None]  (AgeCategory)
                 attribute: [None]  (SubjectAttribute)
             descendedFrom: [None]  (SubjectState)
                handedness: [None]  (Handedness)
        internalIdentifier: ""
               lookupLabel: "demo_state"
                 pathology: [None]  (Any of: Disease, DiseaseModel)
    relativeTimeIndication: [None]  (One of: QuantitativeValue, QuantitativeValueRange)
                    weight: [None]  (One of: QuantitativeValue, QuantitativeValueRange)
  Required Properties: ageCategory
% Add subject state to subject
subject1.studiedState = subjectState;
disp(subject1)
  Subject (https://openminds.ebrains.eu/core/Subject) with properties:
         biologicalSex: male  (BiologicalSex)
    internalIdentifier: ""
              isPartOf: [None]  (SubjectGroup)
           lookupLabel: "demo_subject1"
               species: Mus musculus  (One of: Species, Strain)
          studiedState: demo_state  (SubjectState)
  Required Properties: species, studiedState
% Update the value of the lookup label
subjectState.lookupLabel = "demo_subjectstate_pre_recording";

% Create a new subject state
subjectStatePost = openminds.core.SubjectState('lookupLabel', 'demo_subjectstate_post_recording')
subjectStatePost = 
  SubjectState (https://openminds.ebrains.eu/core/SubjectState) with properties:
         additionalRemarks: ""
                       age: [None]  (One of: QuantitativeValue, QuantitativeValueRange)
               ageCategory: [None]  (AgeCategory)
                 attribute: [None]  (SubjectAttribute)
             descendedFrom: [None]  (SubjectState)
                handedness: [None]  (Handedness)
        internalIdentifier: ""
               lookupLabel: "demo_subjectstate_post_recording"
                 pathology: [None]  (Any of: Disease, DiseaseModel)
    relativeTimeIndication: [None]  (One of: QuantitativeValue, QuantitativeValueRange)
                    weight: [None]  (One of: QuantitativeValue, QuantitativeValueRange)
  Required Properties: ageCategory
% Append the new subject state to the subject's studiedState property
subject1.studiedState(end+1) = subjectStatePost;
disp(subject1)
  Subject (https://openminds.ebrains.eu/core/Subject) with properties:
         biologicalSex: male  (BiologicalSex)
    internalIdentifier: ""
              isPartOf: [None]  (SubjectGroup)
           lookupLabel: "demo_subject1"
               species: Mus musculus  (One of: Species, Strain)
          studiedState: [demo_subjectstate_pre_recording    demo_subjectstate_post_recording]  (SubjectState)
  Required Properties: species, studiedState

Detailed Installation Instructions

(Back to top)

The easiest way to install the openMINDS for MATLAB is to use the Add-on Explorer:

  1. Launch the Add-on Explorer from MATLAB's Home tab. Click Add-Ons -> Get Add-Onsopenminds_installation_step1
  2. Search for "openminds"
  3. Select openMINDS Metadata Models for MATLABopenminds_installation_step2
  4. Press the "Add" button.openminds_installation_step4

Acknowledgements

(Back to top)

EU Logo

This open source software code was developed in part or in whole in the Human Brain Project, funded from the European Union's Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreements No. 945539 (Human Brain Project SGA3).

About

MATLAB package for the openMINDS metadata models. The package contains all openMINDS schemas as MATLAB classes in addition to schema base classes and utility methods

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages