diff --git a/code/livescripts/archive/v4.0/basicNeuroscienceDataset.mlx b/code/livescripts/archive/v4.0/basicNeuroscienceDataset.mlx new file mode 100644 index 000000000..642bb6dc7 Binary files /dev/null and b/code/livescripts/archive/v4.0/basicNeuroscienceDataset.mlx differ diff --git a/code/livescripts/archive/v4.0/crewMemberCollection.mlx b/code/livescripts/archive/v4.0/crewMemberCollection.mlx new file mode 100644 index 000000000..35ed57bcd Binary files /dev/null and b/code/livescripts/archive/v4.0/crewMemberCollection.mlx differ diff --git a/code/livescripts/basicNeuroscienceDataset.mlx b/code/livescripts/basicNeuroscienceDataset.mlx index 642bb6dc7..0c4ea1c08 100644 Binary files a/code/livescripts/basicNeuroscienceDataset.mlx and b/code/livescripts/basicNeuroscienceDataset.mlx differ diff --git a/code/livescripts/crewMemberCollection.mlx b/code/livescripts/crewMemberCollection.mlx index 35ed57bcd..1f8574084 100644 Binary files a/code/livescripts/crewMemberCollection.mlx and b/code/livescripts/crewMemberCollection.mlx differ diff --git a/docs/tutorials/basicNeuroscienceDataset.html b/docs/tutorials/basicNeuroscienceDataset.html index 7c7c0a23e..8e68870e8 100644 --- a/docs/tutorials/basicNeuroscienceDataset.html +++ b/docs/tutorials/basicNeuroscienceDataset.html @@ -1,21 +1,27 @@ -Creating openMINDS Metadata: A Basic Introduction

Creating openMINDS Metadata: A Basic Introduction

This tutorial demonstrates how to create, link, and save metadata using the openMINDS MATLAB toolbox. We'll create a simplified neuroscience dataset with subjects, researchers, and experimental details.
The openMINDS (Open Metadata Initiative for Neuroscience Data Structures) provides standardized metadata models for neuroscience data. This standardization facilitates data sharing, discovery, and reuse.
Please refer to the openMINDS documentation to learn more about the available metadata types.
This tutorial covers:
Table of Contents

1. Creating a Metadata Collection

We start by creating an empty metadata collection that will hold all our instances. A collection is a container for metadata instances.
% Create an empty metadata collection
collection = openminds.Collection(...
"Name", "Neuroscience Dataset Example", ...
"Description", "A tutorial dataset for learning openMINDS metadata creation");
 
disp(collection)
Collection with properties: - - Name: "Neuroscience Dataset Example" - Description: "A tutorial dataset for learning openMINDS metadata creation" - Nodes: dictionary with unset key and value types - LinkResolver: []

2. Creating Basic Metadata Instances

Let's create instances for researchers and their organizations. We'll demonstrate two ways to create instances: 1. Using name-value pairs in the constructor 2. Creating an empty instance and setting properties via dot notation
% Define a utility function for creating instance IDs
createId = @(str) lower(sprintf('_:%s', replace(str, ' ', '-')));

2.1 Create organization instances

% First approach: Using name-value pairs in the constructor
university = openminds.core.actors.Organization(...
'id', createId('University of Neuroscience'), ...
'fullName', 'University of Neuroscience', ...
'shortName', 'UNS');
 
% Second approach: Create empty instance and set properties
researchCenter = openminds.core.actors.Organization();
researchCenter.id = createId('Brain Research Center');
researchCenter.fullName = 'Brain Research Center';
researchCenter.shortName = 'BRC';
 
% Display the Organization metadata instances:
disp(university);
Organization (https://openminds.om-i.org/types/Organization) with properties: - - affiliation: [None] (Affiliation) - digitalIdentifier: [None] (Any of: GRIDID, RORID, RRID) - fullName: "University of Neuroscience" - hasParent: [None] (Organization) - homepage: "" - shortName: "UNS" - - Required Properties: fullName
disp(researchCenter);
Organization (https://openminds.om-i.org/types/Organization) with properties: - - affiliation: [None] (Affiliation) - digitalIdentifier: [None] (Any of: GRIDID, RORID, RRID) - fullName: "Brain Research Center" - hasParent: [None] (Organization) - homepage: "" - shortName: "BRC" - - Required Properties: fullName

2.2 Create contact information instances

contactPI = openminds.core.actors.ContactInformation(...
'id', createId('contact-pi'), ...
'email', 'pi@neuroscience.edu');
 
contactPostdoc = openminds.core.actors.ContactInformation(...
'id', createId('contact-postdoc'), ...
'email', 'postdoc@neuroscience.edu');
 
disp(contactPI)
ContactInformation (https://openminds.om-i.org/types/ContactInformation) with properties: +.S17 { border-left: 1px solid rgb(217, 217, 217); border-right: 1px solid rgb(217, 217, 217); border-top: 1px solid rgb(217, 217, 217); border-bottom: 0px none rgb(33, 33, 33); border-radius: 0px; padding: 6px 45px 0px 13px; line-height: 18.004px; min-height: 0px; white-space: nowrap; color: rgb(33, 33, 33); font-family: Menlo, Monaco, Consolas, "Courier New", monospace, Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; } +.S18 { margin: 10px 0px 20px; padding-left: 0px; font-family: Helvetica, Arial, sans-serif, Helvetica, Arial, sans-serif; font-size: 14px; } +.S19 { margin-left: 56px; line-height: 21px; min-height: 0px; text-align: left; white-space: pre-wrap; }

Creating openMINDS Metadata: A Basic Introduction

This tutorial demonstrates how to create, link, and save metadata using the openMINDS MATLAB toolbox. We will create a simplified neuroscience dataset with subjects, contributors, organizations, and experimental details.
The openMINDS (Open Metadata Initiative for Neuroscience Data Structures) provides standardized metadata models for neuroscience data. This standardization facilitates data sharing, discovery, and reuse.
Please refer to the openMINDS documentation to learn more about the available metadata types.
This tutorial covers:

1. Creating a Metadata Collection

We start by creating an empty metadata collection that will hold all our instances. A collection is a container for metadata instances.
% Create an empty metadata collection
collection = openminds.Collection(...
"Name", "Neuroscience Dataset Example", ...
"Description", "A tutorial dataset for learning openMINDS metadata creation");
 
disp(collection)
Collection with properties: + + Name: "Neuroscience Dataset Example" + Description: "A tutorial dataset for learning openMINDS metadata creation" + Nodes: dictionary with unset key and value types + LinkResolver: [] + MetadataStore: [0×0 openminds.internal.FileMetadataStore]

2. Creating Basic Metadata Instances

Let us create instances for researchers, their contact information, and their organizations. The examples show two common construction patterns: using name-value pairs in the constructor, and creating an empty instance before assigning properties with dot notation.
% Define a utility function for creating instance IDs
createId = @(str) lower(sprintf('_:%s', replace(str, ' ', '-')));

2.1 Create organization instances

% First approach: Using name-value pairs in the constructor
university = openminds.core.actors.Organization(...
"id", createId("University of Neuroscience"), ...
"name", "University of Neuroscience", ...
"acronym", "UNS", ...
"countryOfFormation", openminds.controlledterms.SovereignState("Germany"), ...
"type", openminds.controlledterms.OrganizationType("legalEntity"));
 
% Second approach: Create empty instance and set properties
researchCenter = openminds.core.actors.Organization();
researchCenter.id = createId("Brain Research Center");
researchCenter.name = "Brain Research Center";
researchCenter.acronym = "BRC";
researchCenter.countryOfFormation = openminds.controlledterms.SovereignState("Germany");
researchCenter.type = openminds.controlledterms.OrganizationType("organizationalUnit");
researchCenter.hasParent = university;
 
% Display selected Organization fields:
fprintf("%s (%s)\n", university.name, university.acronym)
University of Neuroscience (UNS)
fprintf("%s (%s)\n", researchCenter.name, researchCenter.acronym)
Brain Research Center (BRC)

2.2 Create contact information instances

contactPI = openminds.core.actors.ContactInformation(...
'id', createId('contact-pi'), ...
'email', 'pi@neuroscience.edu');
contactPostdoc = openminds.core.actors.ContactInformation(...
'id', createId('contact-postdoc'), ...
'email', 'postdoc@neuroscience.edu');
disp(contactPI)
ContactInformation (_:contact-pi) with properties: email: "pi@neuroscience.edu" - Required Properties: email
disp(contactPostdoc)
ContactInformation (https://openminds.om-i.org/types/ContactInformation) with properties: + Required Properties: email
disp(contactPostdoc)
ContactInformation (_:contact-postdoc) with properties: email: "postdoc@neuroscience.edu" - Required Properties: email

2.3 Create person instances with affiliations

% Principal Investigator
pi = openminds.core.actors.Person(...
'id', createId('jane-doe'), ...
'givenName', 'Jane', ...
'familyName', 'Doe', ...
'contactInformation', contactPI, ...
'affiliation', openminds.core.actors.Affiliation('memberOf', university));
 
% Postdoc
postdoc = openminds.core.actors.Person(...
'id', createId('john-smith'), ...
'givenName', 'John', ...
'familyName', 'Smith', ...
'contactInformation', contactPostdoc, ...
'affiliation', openminds.core.actors.Affiliation('memberOf', researchCenter));
 
% Display the Person metadata instances:
disp(pi)
Person (https://openminds.om-i.org/types/Person) with properties: + Required Properties: email

2.3 Create person and affiliation instances

A Person describes an individual. The affiliation is represented as a separate Affiliation instance linking that person to an organization.
% Principal Investigator
pi = openminds.core.actors.Person(...
"id", createId("jane-doe"), ...
"givenName", "Jane", ...
"familyName", "Doe", ...
"preferredName", "Jane Doe", ...
"contactInformation", contactPI);
 
% Postdoc
postdoc = openminds.core.actors.Person(...
"id", createId("john-smith"), ...
"givenName", "John", ...
"familyName", "Smith", ...
"preferredName", "John Smith", ...
"contactInformation", contactPostdoc);
 
% Affiliations are represented separately from the Person instances
piAffiliation = openminds.core.actors.Affiliation(...
"person", pi, ...
"organization", university);
 
postdocAffiliation = openminds.core.actors.Affiliation(...
"person", postdoc, ...
"organization", researchCenter);
 
% Display the Person metadata instances:
disp(pi)
Person (_:jane-doe) with properties: - affiliation: University of Neuroscience (Affiliation) alternateName: [1×0 string] - associatedAccount: [None] (AccountInformation) - contactInformation: pi@neuroscience.edu (ContactInformation) - digitalIdentifier: [None] (ORCID) + associatedAccount: [None] (AccountInformation) + contactInformation: pi@neuroscience.edu (ContactInformation) + digitalIdentifier: [None] (Any of: GenericIdentifier, ORCID) familyName: "Doe" givenName: "Jane" + preferredName: "Jane Doe" - Required Properties: givenName
disp(postdoc)
Person (https://openminds.om-i.org/types/Person) with properties: + Required Properties: preferredName
disp(postdoc)
Person (_:john-smith) with properties: - affiliation: Brain Research Center (Affiliation) alternateName: [1×0 string] - associatedAccount: [None] (AccountInformation) - contactInformation: postdoc@neuroscience.edu (ContactInformation) - digitalIdentifier: [None] (ORCID) + associatedAccount: [None] (AccountInformation) + contactInformation: postdoc@neuroscience.edu (ContactInformation) + digitalIdentifier: [None] (Any of: GenericIdentifier, ORCID) familyName: "Smith" givenName: "John" + preferredName: "John Smith" - Required Properties: givenName

3. Creating Dataset Metadata

Now we'll create a dataset version to describe our neuroscience data. We'll add all the required properties and some optional ones.

3.1 Create a DOI (Digital Object Identifier)

doi = openminds.core.digitalidentifier.DOI(...
'id', createId('dataset-doi'), ...
'identifier', 'https://doi.org/10.1234/example.2023.001');

3.2 Create a license

The License is one of a few types where pre-defined instances already exist. To view available instances, use the listInstances method:
openminds.core.data.License.listInstances()
ans = 31×1 string
"AGPL-3.0-only"
"Apache-2.0"
"BSD-2-Clause"
"BSD-3-Clause"
"BSD-4-Clause"
"CC-BY-4.0"
"CC-BY-NC-4.0"
"CC-BY-NC-ND…
"CC-BY-NC-SA…
"CC-BY-ND-4.0"
% Create a license from a name:
license = openminds.core.data.License.fromName("CC-BY-4.0");
disp(license)
License (https://openminds.om-i.org/types/License) with properties: + Required Properties: preferredName

3. Creating Dataset Metadata

Next we create metadata for the dataset and for one concrete dataset version. Contributor roles are represented with Contribution instances. Contributor affiliations are represented separately with Affiliation instances that link people to organizations.

3.1 Create a DOI (Digital Object Identifier)

doi = openminds.core.digitalidentifier.DOI(...
'id', createId('dataset-doi'), ...
'identifier', 'https://doi.org/10.1234/example.2023.001');

3.2 Create a license

A License describes the conditions under which the dataset version can be reused. For this example, we create a small license instance directly.
% Create a license manually for this example:
license = openminds.core.data.License(...
"id", createId("cc-by-4"), ...
"fullName", "Creative Commons Attribution 4.0 International", ...
"shortName", "CC-BY-4.0", ...
"legalCode", "https://creativecommons.org/licenses/by/4.0/legalcode", ...
"webpage", "https://creativecommons.org/licenses/by/4.0");
 
disp(license)
License (_:cc-by-4) with properties: fullName: "Creative Commons Attribution 4.0 International" legalCode: "https://creativecommons.org/licenses/by/4.0/legalcode" shortName: "CC-BY-4.0" - webpage: ["https://creativecommons.org/licenses/by/4.0" "https://spdx.org/licenses/CC-BY-4.0.html"] - - Required Properties: fullName, legalCode, shortName
% Alternatively, create it manually
license = openminds.core.data.License(...
'id', createId('cc-by-4'), ...
'fullName', 'Creative Commons Attribution 4.0 International', ...
'shortName', 'CC BY 4.0', ...
'webpage', "https://creativecommons.org/licenses/by/4.0");

3.3 Create a file repository

Note: This is only relevant if data is stored in external repository. If a dataset is submitted via EBRAINS, the file repository is created and added as part of the curation process
repository = openminds.core.data.FileRepository(...
'id', createId('dataset-repository'), ...
'IRI', 'https://example-repository.org/datasets/123', ...
'name', 'Example Dataset Repository', ...
'hostedBy', university);

3.4 Create a behavioral protocol

protocol = openminds.core.research.BehavioralProtocol(...
'id', createId('visual-task-protocol'), ...
'name', 'Visual Go/NoGo Task', ...
'description', ['Mice were trained to discriminate visual stimuli. ', ...
'Each stimulus was associated with a specific outcome (reward, nothing, or punishment).']);

3.5 Create controlled terms

Controlled terms are metatata types which has a corresponding terminology developed by the Open Metadata Initiative, available here: https://github.com/openMetadataInitiative/openMINDS_instances
To see a list of available instance, you can again use the listInstances.
Note: ControlledTerm types accept the instance names as an input to the class constructor directly (See below for examples).
openminds.controlledterms.PreparationType.listInstances()
ans = 6×1 string
"exVivo"
"inSilico"
"inSitu"
"inUtero"
"inVitro"
"inVivo"
% These are predefined terms from controlled vocabularies
preparationType = openminds.controlledterms.PreparationType('inVivo');
 
ethicsAssessment = openminds.controlledterms.EthicsAssessment('EUCompliant');
 
accessibility = openminds.controlledterms.ProductAccessibility('freeAccess');
 
dataType = openminds.controlledterms.SemanticDataType('experimentalData');
 
experimentalApproach1 = openminds.controlledterms.ExperimentalApproach('behavior');
experimentalApproach2 = openminds.controlledterms.ExperimentalApproach('electrophysiology');
 
technique = openminds.controlledterms.Technique('extracellularElectrophysiology');

3.6 Create a custom term suggestion (for keywords that don't exist in controlled vocabularies)

customKeyword = openminds.controlledterms.TermSuggestion(...
'id', createId('custom-brain-region'), ...
'name', 'visual cortex');

3.7 Create the dataset version

datasetVersion = openminds.core.products.DatasetVersion(...
'id', createId('example-dataset-v1'), ...
'fullName', 'Neural activity during visual discrimination task', ...
'shortName', 'Visual Task Dataset', ...
'versionIdentifier', 'v1', ...
'accessibility', accessibility, ...
'author', [pi, postdoc], ...
'custodian', pi, ...
'description', ['This dataset contains neural recordings from mice ', ...
'performing a visual discrimination task.'], ...
'digitalIdentifier', doi, ...
'ethicsAssessment', ethicsAssessment, ...
'experimentalApproach', [experimentalApproach1, experimentalApproach2], ...
'license', license, ...
'preparationDesign', preparationType, ...
'repository', repository, ...
'dataType', dataType, ...
'technique', technique, ...
'behavioralProtocol', protocol, ...
'keyword', customKeyword, ...
'versionInnovation', 'This is the first version of this dataset.');
 
disp(datasetVersion);
DatasetVersion (https://openminds.om-i.org/types/DatasetVersion) with properties: - - accessibility: free access (ProductAccessibility) - author: [Doe, Jane (Person) Smith, John (Person)] (Any of: Consortium, Organization, Person) - behavioralProtocol: Visual Go/NoGo Task (BehavioralProtocol) - copyright: [None] (Copyright) - custodian: Doe, Jane (Any of: Consortium, Organization, Person) - dataType: experimental data (SemanticDataType) - description: "This dataset contains neural recordings from mice performing a visual discrimination task." - digitalIdentifier: https://doi.org/10.1234/example.2023.001 (One of: DOI, IdentifiersDotOrgID) - ethicsAssessment: EU compliant (EthicsAssessment) - experimentalApproach: [behavior electrophysiology] (ExperimentalApproach) - fullDocumentation: [None] (One of: File, DOI, ISBN, WebResource) - fullName: "Neural activity during visual discrimination task" - funding: [None] (Funding) - homepage: "" - howToCite: "" - inputData: [None] (Any of: File, FileBundle, DOI, WebResource, BrainAtlas, BrainAtlasVersion, CommonCoordinateSpace, CommonCoordinateSpaceVersion) - isAlternativeVersionOf: [None] (DatasetVersion) - isNewVersionOf: [None] (DatasetVersion) - keyword: [1×1 Keyword] - license: Creative Commons Attribution 4.0 International (One of: License, WebResource) - otherContribution: [None] (Contribution) - preparationDesign: in vivo (PreparationType) - protocol: [None] (Protocol) - relatedPublication: [None] (Any of: DOI, HANDLE, ISBN, ISSN, Book, Chapter, ScholarlyArticle) - releaseDate: [1×0 datetime] - repository: Example Dataset Repository (FileRepository) - shortName: "Visual Task Dataset" - studiedSpecimen: [None] (Any of: Subject, SubjectGroup, TissueSample, TissueSampleCollection) - studyTarget: [1×0 StudyTarget] - supportChannel: [1×0 string] - technique: extracellular electrophysiology (Any of: AnalysisTechnique, MRIPulseSequence, MRIWeighting, StimulationApproach, StimulationTechnique, Technique) - versionIdentifier: "v1" - versionInnovation: "This is the first version of this dataset." - - Required Properties: accessibility, dataType, digitalIdentifier, ethicsAssessment, - experimentalApproach, fullDocumentation, license, releaseDate, shortName, technique, - versionIdentifier, versionInnovation

4. Creating Subject Metadata

Now we'll create subjects and their states, then link them to the dataset.

4.1 Create a species (strain)

strain = openminds.core.research.Strain(...
'id', createId('c57bl6j-strain'), ...
'name', 'C57BL/6J', ...
'species', openminds.controlledterms.Species('musMusculus'));

4.2 Create biological sex controlled term

biologicalSex = openminds.controlledterms.BiologicalSex('male');

4.3 Create subject state attributes

subjectAttribute1 = openminds.controlledterms.SubjectAttribute('alive');
subjectAttribute2 = openminds.controlledterms.SubjectAttribute('awake');
 
ageCategory = openminds.controlledterms.AgeCategory('adult');

4.4 Create a subject

subject1 = openminds.core.research.Subject(...
'id', createId('subject1'), ...
'lookupLabel', 'Subject1', ...
'biologicalSex', biologicalSex, ...
'species', strain, ...
'internalIdentifier', 'S1');

4.5 Create another subject

subject2 = openminds.core.research.Subject(...
'id', createId('subject2'), ...
'lookupLabel', 'Subject2', ...
'biologicalSex', biologicalSex, ...
'species', strain, ...
'internalIdentifier', 'S2');

4.6 Create and add subject states for each of the subjects

subjectState1 = openminds.core.research.SubjectState(...
'id', createId('subject1-state'), ...
'lookupLabel', 'Subject1-state', ...
'ageCategory', ageCategory, ...
'attribute', [subjectAttribute1, subjectAttribute2], ...
'internalIdentifier', 'Subject1-state-01');
subject1.studiedState = subjectState1;
 
subjectState2 = openminds.core.research.SubjectState(...
'id', createId('subject2-state'), ...
'lookupLabel', 'Subject2-state', ...
'ageCategory', "adolescent", ...
'attribute', [subjectAttribute1, subjectAttribute2], ...
'internalIdentifier', 'Subject2-state-01');
subject2.studiedState = subjectState2;
 
% Display the Subject metadata
disp(subject1);
Subject (https://openminds.om-i.org/types/Subject) with properties: - - biologicalSex: male (BiologicalSex) + webpage: "https://creativecommons.org/licenses/by/4.0" + + Required Properties: fullName, legalCode, shortName
% The variable "license" now holds the reusable License instance.

3.3 Create a file repository

Note: This is only relevant if data is stored in external repository. If a dataset is submitted via EBRAINS, the file repository is created and added as part of the curation process
repository = openminds.core.data.FileRepository(...
'id', createId('dataset-repository'), ...
'IRI', 'https://example-repository.org/datasets/123', ...
'name', 'Example Dataset Repository', ...
'hostedBy', university);

3.4 Create a behavioral protocol

protocol = openminds.core.research.BehavioralProtocol(...
'id', createId('visual-task-protocol'), ...
'name', 'Visual Go/NoGo Task', ...
'description', ['Mice were trained to discriminate visual stimuli. ', ...
'Each stimulus was associated with a specific outcome (reward, nothing, or punishment).']);

3.5 Create controlled terms

Controlled terms are metadata types with a corresponding terminology developed by the Open Metadata Initiative, available here: https://github.com/openMetadataInitiative/openMINDS_instances
To see a list of available instances, use the listInstances.
Note: ControlledTerm types accept the instance names as an input to the class constructor directly (See below for examples).
openminds.controlledterms.PreparationType.listInstances()
ans = 6×1 string
"exVivo"
"inSilico"
"inSitu"
"inUtero"
"inVitro"
"inVivo"
% These are predefined terms from controlled vocabularies
preparationType = openminds.controlledterms.PreparationType("inVivo");
 
dataType = openminds.controlledterms.SemanticDataType("experimentalData");
 
experimentalApproach1 = openminds.controlledterms.ExperimentalApproach("behavior");
experimentalApproach2 = openminds.controlledterms.ExperimentalApproach("electrophysiology");
 
technique = openminds.controlledterms.Technique("extracellularElectrophysiology");
 
ethicsJurisdiction = openminds.controlledterms.SovereignState("Germany");
 
accessibility = openminds.core.miscellaneous.Accessibility(...
"channel", openminds.controlledterms.AccessChannel("virtualAccess"), ...
"eligibility", openminds.controlledterms.AccessEligibilityType("openAccess"), ...
"form", openminds.controlledterms.AccessForm("directAccess"), ...
"paymentModel", openminds.controlledterms.PaymentModelType("zero-costPaymentModel"), ...
"process", openminds.controlledterms.AccessProcessType("immediateAccess"));
 
contributionTypeAuthor = openminds.controlledterms.ContributionType("authoring");
contributionTypeCustodian = openminds.controlledterms.ContributionType("custodianship");

3.6 Create a custom term suggestion (for keywords that don't exist in controlled vocabularies)

customKeyword = openminds.controlledterms.TermSuggestion(...
'id', createId('custom-brain-region'), ...
'name', 'visual cortex');

3.7 Create dataset and dataset version

The Dataset instance stores version-independent metadata. The DatasetVersion instance stores metadata for this specific release, including accessibility, release date, protocols, studied specimens, and version-specific documentation.
documentation = openminds.core.miscellaneous.WebResource(...
"id", createId("dataset-documentation"), ...
"IRI", "https://example-repository.org/datasets/123/documentation");
 
authorContribution = openminds.core.actors.Contribution(...
"contributor", [pi, postdoc], ...
"type", contributionTypeAuthor);
 
custodianContribution = openminds.core.actors.Contribution(...
"contributor", pi, ...
"type", contributionTypeCustodian);
 
contributions = [authorContribution, custodianContribution];
contributorAffiliations = [piAffiliation, postdocAffiliation];
 
dataset = openminds.core.products.Dataset(...
"id", createId("example-dataset"), ...
"fullName", "Neural activity during visual discrimination task", ...
"shortName", "Visual Task Dataset", ...
"description", "This dataset contains neural recordings from mice " + ...
"performing a visual discrimination task.", ...
"contribution", contributions, ...
"contributorAffiliation", contributorAffiliations);
 
datasetVersion = openminds.core.products.DatasetVersion(...
"id", createId("example-dataset-v1"), ...
"fullName", "Neural activity during visual discrimination task", ...
"shortName", "Visual Task Dataset", ...
"versionIdentifier", "v1", ...
"accessibility", accessibility, ...
"contribution", contributions, ...
"contributorAffiliation", contributorAffiliations, ...
"description", "This dataset contains neural recordings from mice " + ...
"performing a visual discrimination task.", ...
"digitalIdentifier", doi, ...
"documentation", documentation, ...
"ethicsJurisdiction", ethicsJurisdiction, ...
"experimentalApproach", [experimentalApproach1, experimentalApproach2], ...
"usageCondition", license, ...
"preparationType", preparationType, ...
"repository", repository, ...
"dataType", dataType, ...
"technique", technique, ...
"protocol", protocol, ...
"keyword", customKeyword, ...
"isVersionOf", dataset, ...
"releaseDate", datetime(2023, 1, 1), ...
"versionSpecification", "This is the first version of this dataset.");
 
fprintf("Created dataset version: %s (%s)\n", ...
datasetVersion.fullName, datasetVersion.versionIdentifier)
Created dataset version: Neural activity during visual discrimination task (v1)

4. Creating Subject Metadata

Next we create subjects and their states, then link the studied specimens to the dataset version.

4.1 Create a species (strain)

strain = openminds.core.research.Strain(...
'id', createId('c57bl6j-strain'), ...
'name', 'C57BL/6J', ...
'species', openminds.controlledterms.Species('musMusculus'));

4.2 Create biological sex controlled term

biologicalSex = openminds.controlledterms.BiologicalSex('male');

4.3 Create subject state attributes

subjectAttribute1 = openminds.controlledterms.SubjectAttribute('alive');
subjectAttribute2 = openminds.controlledterms.SubjectAttribute('awake');
 
ageCategory = openminds.controlledterms.AgeCategory('adult');

4.4 Create a subject

subject1 = openminds.core.research.Subject(...
'id', createId('subject1'), ...
'lookupLabel', 'Subject1', ...
'biologicalSex', biologicalSex, ...
'species', strain, ...
'internalIdentifier', 'S1');

4.5 Create another subject

subject2 = openminds.core.research.Subject(...
'id', createId('subject2'), ...
'lookupLabel', 'Subject2', ...
'biologicalSex', biologicalSex, ...
'species', strain, ...
'internalIdentifier', 'S2');

4.6 Create and add subject states for each of the subjects

subjectState1 = openminds.core.research.SubjectState(...
'id', createId('subject1-state'), ...
'lookupLabel', 'Subject1-state', ...
'ageCategory', ageCategory, ...
'attribute', [subjectAttribute1, subjectAttribute2], ...
'internalIdentifier', 'Subject1-state-01');
subject1.studiedState = subjectState1;
 
subjectState2 = openminds.core.research.SubjectState(...
'id', createId('subject2-state'), ...
'lookupLabel', 'Subject2-state', ...
'ageCategory', "adolescent", ...
'attribute', [subjectAttribute1, subjectAttribute2], ...
'internalIdentifier', 'Subject2-state-01');
subject2.studiedState = subjectState2;
 
% Display the Subject metadata
disp(subject1);
Subject (_:subject1) with properties: + + biologicalSex: male (BiologicalSex) internalIdentifier: "S1" - isPartOf: [None] (SubjectGroup) + isPartOf: [None] (SubjectGroup) lookupLabel: "Subject1" - species: C57BL/6J (One of: Species, Strain) - studiedState: Subject1-state (SubjectState) + species: C57BL/6J (Strain) + studiedState: Subject1-state (SubjectState) - Required Properties: species, studiedState
disp(subject2);
Subject (https://openminds.om-i.org/types/Subject) with properties: + Required Properties: species, studiedState
disp(subject2);
Subject (_:subject2) with properties: - biologicalSex: male (BiologicalSex) + biologicalSex: male (BiologicalSex) internalIdentifier: "S2" - isPartOf: [None] (SubjectGroup) + isPartOf: [None] (SubjectGroup) lookupLabel: "Subject2" - species: C57BL/6J (One of: Species, Strain) - studiedState: Subject2-state (SubjectState) - - Required Properties: species, studiedState

4.7 Link subjects to the dataset

datasetVersion.studiedSpecimen = [subject1, subject2];
 
% Display the updated dataset version with added specimen:
disp(datasetVersion);
DatasetVersion (https://openminds.om-i.org/types/DatasetVersion) with properties: - - accessibility: free access (ProductAccessibility) - author: [Doe, Jane (Person) Smith, John (Person)] (Any of: Consortium, Organization, Person) - behavioralProtocol: Visual Go/NoGo Task (BehavioralProtocol) - copyright: [None] (Copyright) - custodian: Doe, Jane (Any of: Consortium, Organization, Person) - dataType: experimental data (SemanticDataType) - description: "This dataset contains neural recordings from mice performing a visual discrimination task." - digitalIdentifier: https://doi.org/10.1234/example.2023.001 (One of: DOI, IdentifiersDotOrgID) - ethicsAssessment: EU compliant (EthicsAssessment) - experimentalApproach: [behavior electrophysiology] (ExperimentalApproach) - fullDocumentation: [None] (One of: File, DOI, ISBN, WebResource) - fullName: "Neural activity during visual discrimination task" - funding: [None] (Funding) - homepage: "" - howToCite: "" - inputData: [None] (Any of: File, FileBundle, DOI, WebResource, BrainAtlas, BrainAtlasVersion, CommonCoordinateSpace, CommonCoordinateSpaceVersion) - isAlternativeVersionOf: [None] (DatasetVersion) - isNewVersionOf: [None] (DatasetVersion) - keyword: [1×1 Keyword] - license: Creative Commons Attribution 4.0 International (One of: License, WebResource) - otherContribution: [None] (Contribution) - preparationDesign: in vivo (PreparationType) - protocol: [None] (Protocol) - relatedPublication: [None] (Any of: DOI, HANDLE, ISBN, ISSN, Book, Chapter, ScholarlyArticle) - releaseDate: [1×0 datetime] - repository: Example Dataset Repository (FileRepository) - shortName: "Visual Task Dataset" - studiedSpecimen: [Subject1 (Subject) Subject2 (Subject)] (Any of: Subject, SubjectGroup, TissueSample, TissueSampleCollection) - studyTarget: [1×0 StudyTarget] - supportChannel: [1×0 string] - technique: extracellular electrophysiology (Any of: AnalysisTechnique, MRIPulseSequence, MRIWeighting, StimulationApproach, StimulationTechnique, Technique) - versionIdentifier: "v1" - versionInnovation: "This is the first version of this dataset." - - Required Properties: accessibility, dataType, digitalIdentifier, ethicsAssessment, - experimentalApproach, fullDocumentation, license, releaseDate, shortName, technique, - versionIdentifier, versionInnovation

5. Adding Instances to Collection and Saving

Now we'll add all instances to the collection and save it to a file.

5.1 Add the dataset to the collection

% Note: The collection will automatically include all linked instances
collection.add(datasetVersion);
 
disp(collection);
Collection with properties: - - Name: "Neuroscience Dataset Example" - Description: "A tutorial dataset for learning openMINDS metadata creation" - Nodes: dictionary (string ⟼ cell) with 30 entries - LinkResolver: []

5.2 Save the collection to a JSON-LD file

% Define the save path (in the current directory)
savePath = fullfile(pwd, 'example_metadata.jsonld');
collection.save(savePath);
 
disp(['Saved metadata to: ', savePath]);
Saved metadata to: /Users/Eivind/Code/MATLAB/Neuroscience/Repositories/openMetadataInitiative/openMINDS_MATLAB/code/example_metadata.jsonld

5.3 Display the saved JSON-LD content

jsonContent = fileread(savePath);
disp(jsonContent);
{ + species: C57BL/6J (Strain) + studiedState: Subject2-state (SubjectState) + + Required Properties: species, studiedState

4.7 Link subjects to the dataset

datasetVersion.studiedSpecimen = [subject1, subject2];
 
% Display a short confirmation for the updated dataset version:
fprintf("Dataset version now links to %d studied specimens.\n", ...
numel(datasetVersion.studiedSpecimen))
Dataset version now links to 2 studied specimens.

5. Adding Instances to Collection and Saving

Finally, we add the dataset version to the collection and save the detected metadata graph to a file.

5.1 Add the dataset version to the collection

% Note: The collection will automatically include all linked instances
collection.add(datasetVersion);
 
disp(collection);
Collection with properties: + + Name: "Neuroscience Dataset Example" + Description: "A tutorial dataset for learning openMINDS metadata creation" + Nodes: dictionary (string ⟼ cell) with 41 entries + LinkResolver: [] + MetadataStore: [0×0 openminds.internal.FileMetadataStore]

5.2 Save the collection to a JSON-LD file

% Define the save path (in the current directory)
savePath = fullfile(pwd, 'example_metadata.jsonld');
collection.save(savePath);
 
disp(['Saved metadata to: ', savePath]);
Saved metadata to: /Users/eivind/Code/MATLAB/Neuroscience/Repositories/openMetadataInitiative/openMINDS_MATLAB/example_metadata.jsonld

5.3 Display the saved JSON-LD content

jsonContent = fileread(savePath);
disp(jsonContent);
{ "@context": { - "@vocab": "https://openminds.ebrains.eu/vocab/" + "@vocab": "https://openminds.om-i.org/props/" }, "@graph": [ { - "@id": "_:example-dataset-v1", - "@type": "https://openminds.om-i.org/types/DatasetVersion", - "accessibility": { - "@id": "https://openminds.om-i.org/instances/productAccessibility/freeAccess" - }, - "author": [ - { - "@id": "_:jane-doe" - }, - { - "@id": "_:john-smith" - } - ], - "behavioralProtocol": [ - { - "@id": "_:visual-task-protocol" - } - ], - "custodian": [ + "@id": "https://openminds.om-i.org/instances/accessChannel/virtualAccess", + "@type": "https://openminds.om-i.org/types/AccessChannel", + "definition": "Refers to the ability of users to connect to, interact with, and utilize resources, systems, or other individuals remotely via digital interfaces.", + "name": "virtual access", + "synonym": [ + "digital access", + "online access" + ] + }, + { + "@id": "https://openminds.om-i.org/instances/accessEligibilityType/openAccess", + "@type": "https://openminds.om-i.org/types/AccessEligibilityType", + "definition": "Access without prior registration, authentication, or authorisation.", + "name": "open access" + }, + { + "@id": "https://openminds.om-i.org/instances/accessForm/directAccess", + "@type": "https://openminds.om-i.org/types/AccessForm", + "definition": "Users interact directly with the product or service through integrated interfaces, or authorised environments.", + "name": "direct access" + }, + { + "@id": "https://openminds.om-i.org/instances/paymentModelType/zero-costPaymentModel", + "@type": "https://openminds.om-i.org/types/PaymentModelType", + "definition": "No payment is required for any billable units (entitlement, consumption, event, monetary value, outcome, or capacity units).", + "name": "zero-cost payment model" + }, + { + "@id": "https://openminds.om-i.org/instances/accessProcessType/immediateAccess", + "@type": "https://openminds.om-i.org/types/AccessProcessType", + "definition": "Automatic access upon acceptance of the applicable terms.", + "name": "immediate access" + }, + { + "@id": "_:2f1d8cef-f64a-4795-9a9a-c3e237236085", + "@type": "https://openminds.om-i.org/types/Accessibility", + "channel": [ { - "@id": "_:jane-doe" + "@id": "https://openminds.om-i.org/instances/accessChannel/virtualAccess" } ], - "dataType": [ + "eligibility": [ { - "@id": "https://openminds.om-i.org/instances/semanticDataType/experimentalData" + "@id": "https://openminds.om-i.org/instances/accessEligibilityType/openAccess" } ], - "description": "This dataset contains neural recordings from mice performing a visual discrimination task.", - "digitalIdentifier": { - "@id": "_:dataset-doi" - }, - "ethicsAssessment": { - "@id": "https://openminds.om-i.org/instances/ethicsAssessment/EUCompliant" - }, - "experimentalApproach": [ + "form": [ { - "@id": "https://openminds.om-i.org/instances/experimentalApproach/behavior" - }, - { - "@id": "https://openminds.om-i.org/instances/experimentalApproach/electrophysiology" + "@id": "https://openminds.om-i.org/instances/accessForm/directAccess" } ], - "fullName": "Neural activity during visual discrimination task", - "keyword": [ + "paymentModel": [ { - "@id": "_:custom-brain-region" + "@id": "https://openminds.om-i.org/instances/paymentModelType/zero-costPaymentModel" } ], - "license": { - "@id": "_:cc-by-4" - }, - "preparationDesign": [ + "process": [ { - "@id": "https://openminds.om-i.org/instances/preparationType/inVivo" + "@id": "https://openminds.om-i.org/instances/accessProcessType/immediateAccess" } - ], - "repository": { - "@id": "_:dataset-repository" - }, - "shortName": "Visual Task Dataset", - "studiedSpecimen": [ - { - "@id": "_:subject1" - }, - { - "@id": "_:subject2" - } - ], - "technique": [ - { - "@id": "https://openminds.om-i.org/instances/technique/extracellularElectrophysiology" - } - ], - "versionIdentifier": "v1", - "versionInnovation": "This is the first version of this dataset." + ] + }, + { + "@id": "https://openminds.om-i.org/instances/semanticDataType/experimentalData", + "@type": "https://openminds.om-i.org/types/SemanticDataType", + "name": "experimental data" }, { - "@id": "https://openminds.om-i.org/instances/productAccessibility/freeAccess", - "@type": "https://openminds.om-i.org/types/ProductAccessibility", - "definition": "With ''free access'' selected, data and metadata are both released and become immediately available without any access restrictions.", - "name": "free access" + "@id": "_:dataset-doi", + "@type": "https://openminds.om-i.org/types/DOI", + "identifier": "https://doi.org/10.1234/example.2023.001" + }, + { + "@id": "_:dataset-documentation", + "@type": "https://openminds.om-i.org/types/WebResource", + "IRI": "https://example-repository.org/datasets/123/documentation" + }, + { + "@id": "https://openminds.om-i.org/instances/SovereignState/Germany", + "@type": "https://openminds.om-i.org/types/SovereignState", + "definition": "Country in Central Europe. [auto-generated from ''schema:description'' property of the [Wikidata entity](http://www.wikidata.org/entity/Q183)]", + "name": "Germany", + "preferredCrossReference": "http://www.wikidata.org/entity/Q183", + "synonym": [ + "BR Deutschland", + "BRD", + "Bundesrepublik Deutschland", + "DE", + "de", + "DEU", + "Deutschland", + "Federal Republic of Germany", + "GER" + ] + }, + { + "@id": "https://openminds.om-i.org/instances/experimentalApproach/behavior", + "@type": "https://openminds.om-i.org/types/ExperimentalApproach", + "definition": "Any experimental approach focused on the mechanical activity or cognitive processes underlying mechanical activity of living organisms often in response to external sensory stimuli.", + "name": "behavior", + "otherOntologyIdentifier": "http://uri.interlex.org/tgbugs/uris/readable/modality/Behavior", + "preferredOntologyIdentifier": "http://uri.interlex.org/base/ilx_0739413", + "synonym": "behavioral approach" + }, + { + "@id": "https://openminds.om-i.org/instances/experimentalApproach/electrophysiology", + "@type": "https://openminds.om-i.org/types/ExperimentalApproach", + "definition": "Any experimental approach focused on electrical phenomena associated with living systems, most notably the nervous system, cardiac system, and musculoskeletal system.", + "name": "electrophysiology", + "otherOntologyIdentifier": "http://uri.interlex.org/tgbugs/uris/readable/modality/Electrophysiology", + "preferredOntologyIdentifier": "http://uri.interlex.org/base/ilx_0741202" + }, + { + "@id": "_:contact-pi", + "@type": "https://openminds.om-i.org/types/ContactInformation", + "email": "pi@neuroscience.edu" }, { "@id": "_:jane-doe", "@type": "https://openminds.om-i.org/types/Person", - "affiliation": [ + "contactInformation": [ { - "@type": "https://openminds.om-i.org/types/Affiliation", - "memberOf": { - "@id": "_:university-of-neuroscience" - } + "@id": "_:contact-pi" } ], - "contactInformation": { - "@id": "_:contact-pi" - }, "familyName": "Doe", - "givenName": "Jane" + "givenName": "Jane", + "preferredName": "Jane Doe" }, { - "@id": "_:contact-pi", + "@id": "_:contact-postdoc", "@type": "https://openminds.om-i.org/types/ContactInformation", - "email": "pi@neuroscience.edu" - }, - { - "@id": "_:university-of-neuroscience", - "@type": "https://openminds.om-i.org/types/Organization", - "fullName": "University of Neuroscience", - "shortName": "UNS" + "email": "postdoc@neuroscience.edu" }, { "@id": "_:john-smith", "@type": "https://openminds.om-i.org/types/Person", - "affiliation": [ + "contactInformation": [ { - "@type": "https://openminds.om-i.org/types/Affiliation", - "memberOf": { - "@id": "_:brain-research-center" - } + "@id": "_:contact-postdoc" } ], - "contactInformation": { - "@id": "_:contact-postdoc" - }, "familyName": "Smith", - "givenName": "John" - }, - { - "@id": "_:contact-postdoc", - "@type": "https://openminds.om-i.org/types/ContactInformation", - "email": "postdoc@neuroscience.edu" + "givenName": "John", + "preferredName": "John Smith" }, { - "@id": "_:brain-research-center", - "@type": "https://openminds.om-i.org/types/Organization", - "fullName": "Brain Research Center", - "shortName": "BRC" + "@id": "https://openminds.om-i.org/instances/contributionType/authoring", + "@type": "https://openminds.om-i.org/types/ContributionType", + "definition": "A contribution type of a role-bearing entity realized by creating textual, visual, or other expressive intellectual content about or for a target entity.", + "name": "authoring" }, { - "@id": "_:visual-task-protocol", - "@type": "https://openminds.om-i.org/types/BehavioralProtocol", - "description": "Mice were trained to discriminate visual stimuli. Each stimulus was associated with a specific outcome (reward, nothing, or punishment).", - "name": "Visual Go/NoGo Task" + "@id": "https://openminds.om-i.org/instances/contributionType/custodianship", + "@type": "https://openminds.om-i.org/types/ContributionType", + "definition": "A contribution type of a role-bearing entity realized by assuming responsibility for the long-term stewardship and oversight of a target entity.", + "name": "custodianship" }, { - "@id": "https://openminds.om-i.org/instances/semanticDataType/experimentalData", - "@type": "https://openminds.om-i.org/types/SemanticDataType", - "name": "experimental data" + "@id": "https://openminds.om-i.org/instances/organizationType/legalEntity", + "@type": "https://openminds.om-i.org/types/OrganizationType", + "definition": "An organization classified as a type of legal entity recognized within a specific legal system.", + "name": "legal entity", + "preferredCrossReference": "https://www.wikidata.org/entity/Q10541491" }, { - "@id": "_:dataset-doi", - "@type": "https://openminds.om-i.org/types/DOI", - "identifier": "https://doi.org/10.1234/example.2023.001" + "@id": "_:university-of-neuroscience", + "@type": "https://openminds.om-i.org/types/Organization", + "acronym": "UNS", + "countryOfFormation": [ + { + "@id": "https://openminds.om-i.org/instances/SovereignState/Germany" + } + ], + "name": "University of Neuroscience", + "type": [ + { + "@id": "https://openminds.om-i.org/instances/organizationType/legalEntity" + } + ] }, { - "@id": "https://openminds.om-i.org/instances/ethicsAssessment/EUCompliant", - "@type": "https://openminds.om-i.org/types/EthicsAssessment", - "definition": "Data are ethically approved in compliance with EU law. No additional ethics assessment was made by the data sharing initiative.", - "description": "Data are ethically approved in compliance with EU law. No additional ethics assessment was made by the data sharing initiative. This is typically true for all, human post-mortem data, human cross-subject statistics, non-primate vertebrate animals as well as cephalopods.", - "name": "EU compliant" + "@id": "https://openminds.om-i.org/instances/organizationType/organizationalUnit", + "@type": "https://openminds.om-i.org/types/OrganizationType", + "definition": "A distinct unit within a larger organization.", + "name": "organizational unit" }, { - "@id": "https://openminds.om-i.org/instances/experimentalApproach/behavior", - "@type": "https://openminds.om-i.org/types/ExperimentalApproach", - "definition": "Any experimental approach focused on the mechanical activity or cognitive processes underlying mechanical activity of living organisms often in response to external sensory stimuli.", - "interlexIdentifier": "http://uri.interlex.org/base/ilx_0739413", - "name": "behavior", - "preferredOntologyIdentifier": "http://uri.interlex.org/tgbugs/uris/readable/modality/Behavior", - "synonym": [ - "behavioral approach" + "@id": "_:brain-research-center", + "@type": "https://openminds.om-i.org/types/Organization", + "acronym": "BRC", + "countryOfFormation": [ + { + "@id": "https://openminds.om-i.org/instances/SovereignState/Germany" + } + ], + "hasParent": [ + { + "@id": "_:university-of-neuroscience" + } + ], + "name": "Brain Research Center", + "type": [ + { + "@id": "https://openminds.om-i.org/instances/organizationType/organizationalUnit" + } ] }, { - "@id": "https://openminds.om-i.org/instances/experimentalApproach/electrophysiology", - "@type": "https://openminds.om-i.org/types/ExperimentalApproach", - "definition": "Any experimental approach focused on electrical phenomena associated with living systems, most notably the nervous system, cardiac system, and musculoskeletal system.", - "interlexIdentifier": "http://uri.interlex.org/base/ilx_0741202", - "name": "electrophysiology", - "preferredOntologyIdentifier": "http://uri.interlex.org/tgbugs/uris/readable/modality/Electrophysiology" + "@id": "_:example-dataset", + "@type": "https://openminds.om-i.org/types/Dataset", + "contribution": [ + { + "contributor": [ + { + "@id": "_:jane-doe" + }, + { + "@id": "_:john-smith" + } + ], + "type": [ + { + "@id": "https://openminds.om-i.org/instances/contributionType/authoring" + } + ], + "@type": "https://openminds.om-i.org/types/Contribution" + }, + { + "contributor": [ + { + "@id": "_:jane-doe" + } + ], + "type": [ + { + "@id": "https://openminds.om-i.org/instances/contributionType/custodianship" + } + ], + "@type": "https://openminds.om-i.org/types/Contribution" + } + ], + "contributorAffiliation": [ + { + "organization": [ + { + "@id": "_:university-of-neuroscience" + } + ], + "person": [ + { + "@id": "_:jane-doe" + } + ], + "@type": "https://openminds.om-i.org/types/Affiliation" + }, + { + "organization": [ + { + "@id": "_:brain-research-center" + } + ], + "person": [ + { + "@id": "_:john-smith" + } + ], + "@type": "https://openminds.om-i.org/types/Affiliation" + } + ], + "description": "This dataset contains neural recordings from mice performing a visual discrimination task.", + "fullName": "Neural activity during visual discrimination task", + "shortName": "Visual Task Dataset" }, { "@id": "_:custom-brain-region", "@type": "https://openminds.om-i.org/types/TermSuggestion", "name": "visual cortex" }, - { - "@id": "_:cc-by-4", - "@type": "https://openminds.om-i.org/types/License", - "fullName": "Creative Commons Attribution 4.0 International", - "shortName": "CC BY 4.0", - "webpage": [ - "https://creativecommons.org/licenses/by/4.0" - ] - }, { "@id": "https://openminds.om-i.org/instances/preparationType/inVivo", "@type": "https://openminds.om-i.org/types/PreparationType", "definition": "Something happening or existing inside a living body.", - "interlexIdentifier": "http://uri.interlex.org/base/ilx_0739622", "name": "in vivo", - "preferredOntologyIdentifier": "http://uri.interlex.org/tgbugs/uris/indexes/ontologies/methods/89", - "synonym": [ - "in vivo technique" - ] + "otherOntologyIdentifier": "http://uri.interlex.org/tgbugs/uris/indexes/ontologies/methods/89", + "preferredOntologyIdentifier": "http://uri.interlex.org/base/ilx_0739622", + "synonym": "in vivo technique" + }, + { + "@id": "_:visual-task-protocol", + "@type": "https://openminds.om-i.org/types/BehavioralProtocol", + "description": "Mice were trained to discriminate visual stimuli. Each stimulus was associated with a specific outcome (reward, nothing, or punishment).", + "name": "Visual Go/NoGo Task" }, { "@id": "_:dataset-repository", "@type": "https://openminds.om-i.org/types/FileRepository", "IRI": "https://example-repository.org/datasets/123", - "hostedBy": { - "@id": "_:university-of-neuroscience" - }, - "name": "Example Dataset Repository" - }, - { - "@id": "_:subject1", - "@type": "https://openminds.om-i.org/types/Subject", - "biologicalSex": { - "@id": "https://openminds.om-i.org/instances/biologicalSex/male" - }, - "internalIdentifier": "S1", - "lookupLabel": "Subject1", - "species": { - "@id": "_:c57bl6j-strain" - }, - "studiedState": [ + "hostedBy": [ { - "@id": "_:subject1-state" + "@id": "_:university-of-neuroscience" } - ] + ], + "name": "Example Dataset Repository" }, { "@id": "https://openminds.om-i.org/instances/biologicalSex/male", "@type": "https://openminds.om-i.org/types/BiologicalSex", "definition": "Biological sex that produces sperm cells (spermatozoa).", "description": "A male organism typically has the capacity to produce relatively small, usually mobile gametes (reproductive cells), called sperm cells (or spermatozoa). In the process of fertilization, these sperm cells fuse with a larger, usually immobile female gamete, called egg cell (or ovum).", - "interlexIdentifier": "http://uri.interlex.org/base/ilx_0106489", "name": "male", + "otherOntologyIdentifier": "http://uri.interlex.org/base/ilx_0106489", "preferredOntologyIdentifier": "http://purl.obolibrary.org/obo/PATO_0000384" }, - { - "@id": "_:c57bl6j-strain", - "@type": "https://openminds.om-i.org/types/Strain", - "name": "C57BL/6J", - "species": { - "@id": "https://openminds.om-i.org/instances/species/musMusculus" - } - }, { "@id": "https://openminds.om-i.org/instances/species/musMusculus", "@type": "https://openminds.om-i.org/types/Species", "definition": "The species *Mus musculus* (house mouse) belongs to the family of *muridae* (murids).", - "interlexIdentifier": "http://uri.interlex.org/base/ilx_0107134", - "knowledgeSpaceLink": "https://knowledge-space.org/wiki/NCBITaxon:10090#mouse", "name": "Mus musculus", + "otherOntologyIdentifier": "http://uri.interlex.org/base/ilx_0107134", + "preferredCrossReference": "https://knowledge-space.org/wiki/NCBITaxon:10090#mouse", "preferredOntologyIdentifier": "http://purl.obolibrary.org/obo/NCBITaxon_10090", "synonym": [ "house mouse", @@ -519,28 +506,21 @@ ] }, { - "@id": "_:subject1-state", - "@type": "https://openminds.om-i.org/types/SubjectState", - "ageCategory": { - "@id": "https://openminds.om-i.org/instances/ageCategory/adult" - }, - "attribute": [ - { - "@id": "https://openminds.om-i.org/instances/subjectAttribute/alive" - }, + "@id": "_:c57bl6j-strain", + "@type": "https://openminds.om-i.org/types/Strain", + "name": "C57BL/6J", + "species": [ { - "@id": "https://openminds.om-i.org/instances/subjectAttribute/awake" + "@id": "https://openminds.om-i.org/instances/species/musMusculus" } - ], - "internalIdentifier": "Subject1-state-01", - "lookupLabel": "Subject1-state" + ] }, { "@id": "https://openminds.om-i.org/instances/ageCategory/adult", "@type": "https://openminds.om-i.org/types/AgeCategory", "definition": "''Adult'' categorizes the life cycle stage of an animal or human that reached sexual maturity.", - "interlexIdentifier": "http://uri.interlex.org/base/ilx_0729043", "name": "adult", + "otherOntologyIdentifier": "http://uri.interlex.org/base/ilx_0729043", "preferredOntologyIdentifier": "http://purl.obolibrary.org/obo/UBERON_0000113", "synonym": [ "adult stage", @@ -561,28 +541,60 @@ "name": "awake" }, { - "@id": "_:subject2", + "@id": "_:subject1-state", + "@type": "https://openminds.om-i.org/types/SubjectState", + "ageCategory": [ + { + "@id": "https://openminds.om-i.org/instances/ageCategory/adult" + } + ], + "attribute": [ + { + "@id": "https://openminds.om-i.org/instances/subjectAttribute/alive" + }, + { + "@id": "https://openminds.om-i.org/instances/subjectAttribute/awake" + } + ], + "internalIdentifier": "Subject1-state-01", + "lookupLabel": "Subject1-state" + }, + { + "@id": "_:subject1", "@type": "https://openminds.om-i.org/types/Subject", - "biologicalSex": { - "@id": "https://openminds.om-i.org/instances/biologicalSex/male" - }, - "internalIdentifier": "S2", - "lookupLabel": "Subject2", - "species": { - "@id": "_:c57bl6j-strain" - }, + "biologicalSex": [ + { + "@id": "https://openminds.om-i.org/instances/biologicalSex/male" + } + ], + "internalIdentifier": "S1", + "lookupLabel": "Subject1", + "species": [ + { + "@id": "_:c57bl6j-strain" + } + ], "studiedState": [ { - "@id": "_:subject2-state" + "@id": "_:subject1-state" } ] }, + { + "@id": "https://openminds.om-i.org/instances/ageCategory/adolescent", + "@type": "https://openminds.om-i.org/types/AgeCategory", + "definition": "''Adolescent'' categorizes a transitional life cycle stage of growth and development between childhood and adulthood, often described as ''puberty''.", + "name": "adolescent", + "synonym": "puberty" + }, { "@id": "_:subject2-state", "@type": "https://openminds.om-i.org/types/SubjectState", - "ageCategory": { - "@id": "https://openminds.om-i.org/instances/ageCategory/adolescent" - }, + "ageCategory": [ + { + "@id": "https://openminds.om-i.org/instances/ageCategory/adolescent" + } + ], "attribute": [ { "@id": "https://openminds.om-i.org/instances/subjectAttribute/alive" @@ -595,12 +607,24 @@ "lookupLabel": "Subject2-state" }, { - "@id": "https://openminds.om-i.org/instances/ageCategory/adolescent", - "@type": "https://openminds.om-i.org/types/AgeCategory", - "definition": "''Adolescent'' categorizes a transitional life cycle stage of growth and development between childhood and adulthood, often described as ''puberty''.", - "name": "adolescent", - "synonym": [ - "puberty" + "@id": "_:subject2", + "@type": "https://openminds.om-i.org/types/Subject", + "biologicalSex": [ + { + "@id": "https://openminds.om-i.org/instances/biologicalSex/male" + } + ], + "internalIdentifier": "S2", + "lookupLabel": "Subject2", + "species": [ + { + "@id": "_:c57bl6j-strain" + } + ], + "studiedState": [ + { + "@id": "_:subject2-state" + } ] }, { @@ -608,16 +632,169 @@ "@type": "https://openminds.om-i.org/types/Technique", "definition": "In ''extracellular electrophysiology'' electrodes are inserted into living tissue, but remain outside the cells in the extracellular environment to measure or stimulate electrical activity coming from adjacent cells, usually neurons.", "name": "extracellular electrophysiology" + }, + { + "@id": "_:cc-by-4", + "@type": "https://openminds.om-i.org/types/License", + "fullName": "Creative Commons Attribution 4.0 International", + "legalCode": "https://creativecommons.org/licenses/by/4.0/legalcode", + "shortName": "CC-BY-4.0", + "webpage": "https://creativecommons.org/licenses/by/4.0" + }, + { + "@id": "_:example-dataset-v1", + "@type": "https://openminds.om-i.org/types/DatasetVersion", + "accessibility": [ + { + "@id": "_:2f1d8cef-f64a-4795-9a9a-c3e237236085" + } + ], + "contribution": [ + { + "contributor": [ + { + "@id": "_:jane-doe" + }, + { + "@id": "_:john-smith" + } + ], + "type": [ + { + "@id": "https://openminds.om-i.org/instances/contributionType/authoring" + } + ], + "@type": "https://openminds.om-i.org/types/Contribution" + }, + { + "contributor": [ + { + "@id": "_:jane-doe" + } + ], + "type": [ + { + "@id": "https://openminds.om-i.org/instances/contributionType/custodianship" + } + ], + "@type": "https://openminds.om-i.org/types/Contribution" + } + ], + "contributorAffiliation": [ + { + "organization": [ + { + "@id": "_:university-of-neuroscience" + } + ], + "person": [ + { + "@id": "_:jane-doe" + } + ], + "@type": "https://openminds.om-i.org/types/Affiliation" + }, + { + "organization": [ + { + "@id": "_:brain-research-center" + } + ], + "person": [ + { + "@id": "_:john-smith" + } + ], + "@type": "https://openminds.om-i.org/types/Affiliation" + } + ], + "dataType": [ + { + "@id": "https://openminds.om-i.org/instances/semanticDataType/experimentalData" + } + ], + "description": "This dataset contains neural recordings from mice performing a visual discrimination task.", + "digitalIdentifier": [ + { + "@id": "_:dataset-doi" + } + ], + "documentation": [ + { + "@id": "_:dataset-documentation" + } + ], + "ethicsJurisdiction": [ + { + "@id": "https://openminds.om-i.org/instances/SovereignState/Germany" + } + ], + "experimentalApproach": [ + { + "@id": "https://openminds.om-i.org/instances/experimentalApproach/behavior" + }, + { + "@id": "https://openminds.om-i.org/instances/experimentalApproach/electrophysiology" + } + ], + "fullName": "Neural activity during visual discrimination task", + "isVersionOf": [ + { + "@id": "_:example-dataset" + } + ], + "keyword": [ + { + "@id": "_:custom-brain-region" + } + ], + "preparationType": [ + { + "@id": "https://openminds.om-i.org/instances/preparationType/inVivo" + } + ], + "protocol": [ + { + "@id": "_:visual-task-protocol" + } + ], + "releaseDate": "01-Jan-2023", + "repository": [ + { + "@id": "_:dataset-repository" + } + ], + "shortName": "Visual Task Dataset", + "studiedSpecimen": [ + { + "@id": "_:subject1" + }, + { + "@id": "_:subject2" + } + ], + "technique": [ + { + "@id": "https://openminds.om-i.org/instances/technique/extracellularElectrophysiology" + } + ], + "usageCondition": [ + { + "@id": "_:cc-by-4" + } + ], + "versionIdentifier": "v1", + "versionSpecification": "This is the first version of this dataset." } ] -}

6. Summary

In this tutorial, we've learned how to:
  1. Create a metadata collection
  2. Create various metadata instances (people, organizations, etc.)
  3. Link instances together
  4. Use controlled terms from predefined vocabularies
  5. Create custom term suggestions
  6. Add instances to a collection
  7. Save the collection to a JSON-LD file
This provides a foundation for creating more complex metadata for neuroscience datasets using the openMINDS MATLAB toolbox.
+}

6. Summary

In this tutorial, we've learned how to:
  1. Create a metadata collection
  2. Create various metadata instances (people, organizations, etc.)
  3. Link people, organizations, contributions, affiliations, and dataset metadata
  4. Use controlled terms from predefined vocabularies
  5. Create custom term suggestions
  6. Add instances to a collection
  7. Save the collection to a JSON-LD file
This provides a foundation for creating more complex metadata for neuroscience datasets using the openMINDS MATLAB toolbox.