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

Changed name to Species to OntologyTerm, removed DbIds not in 2.1 mod… #616

Open
wants to merge 4 commits into
base: LzLang-patch-1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$defs": {
"ExternalReference": {
"properties": {
"externalReferenceDbId": {
"referenceId": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make sense to use referenceDbId here so that it is standardized or would that lead to a model change?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It the OpenAPI specification it is 'referenceId' so we should keep it to that. Also I think it is technically not a DbId but can be any ID.

"description": "The external reference ID. Could be a simple string or a URI.",
"type": [
"null",
Expand Down
12 changes: 1 addition & 11 deletions Specification/BrAPI-Schema/BrAPI-Common/GeoJSON.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
"type": "object",
"description": "One geometry as defined by GeoJSON (RFC 7946). All coordinates are decimal values on the WGS84 geographic coordinate reference system.\n\nCopied from RFC 7946 Section 3.1.1\n\nA position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, or\neasting and northing, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element.",
"properties": {
"geoJSONDbId": {
"description": "Unique identifier for the geometry",
"type": [
"null",
"string"
]
},
"geometry": {
"description": "A geometry as defined by GeoJSON (RFC 7946). In this context, only Point or Polygon geometry are allowed.",
"$ref": "GeoJSONGeometry.json#/$defs/GeoJSONGeometry"
Expand Down Expand Up @@ -46,10 +39,7 @@
"relationshipType": "many-to-one",
"referencedAttribute": "coordinates"
}
},
"required": [
"geoJSONDbId"
]
}
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/GeoJSON.json",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$defs": {
"ObservationUnitHierarchyLevel": {
"description": "The exact level and level code of an observation unit. \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. \n\nMIAPPE V1.1 DM-71 Observation unit type \"Type of observation unit in textual form, usually one of the following: study, block, sub-block, plot, sub-plot, pot, plant. Use of other observation unit types is possible but not recommended. \nThe observation unit type can not be used to indicate sub-plant levels. However, observations can still be made on the sub-plant level, as long as the details are indicated in the associated observed variable (see observed variables). \nAlternatively, it is possible to use samples for more detailed tracing of sub-plant units, attaching the observations to them instead.\" ",
"properties": {
"levelName": {
"description": "A name for this level \n\n**Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
"type": [
"null",
"string"
]
},
"levelOrder": {
"description": "`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
"type": [
"null",
"integer"
]
}
},
"required": [],
"title": "ObservationUnitHierarchyLevel",
"type": "object",
"brapi-metadata": {
"interface": true
}
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/ObservationUnitHierarchyLevel.json",
"$schema": "http://json-schema.org/draft/2020-12/schema"
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{
"$defs": {
"Species": {
"OntologyTerm": {
"properties": {
"speciesDbId": {
"description": "An ontology term describing an attribute.",
"type": [
"null",
"string"
]
},
"term": {
"description": "Ontology term - the label of the ontology term the termId is pointing to.",
"type": [
Expand Down Expand Up @@ -36,16 +29,13 @@
"referencedAttribute": "species"
}
},
"required": [
"specieDbId"
],
"title": "OntologyTerm",
"type": "object",
"brapi-metadata": {
"primaryModel": false
}
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/Species.json",
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Common/OntologyTerm.json",
"$schema": "http://json-schema.org/draft/2020-12/schema"
}
34 changes: 0 additions & 34 deletions Specification/BrAPI-Schema/BrAPI-Common/SourceGermplasm.json

This file was deleted.

7 changes: 0 additions & 7 deletions Specification/BrAPI-Schema/BrAPI-Common/Variable.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
"$defs": {
"Variable": {
"properties": {
"variableDbId": {
"description": "Unique identifier for the Variable",
"type": [
"null",
"string"
]
},
"additionalInfo": {
"description": "A free space containing any additional information related to a particular object. A data source may provide any JSON object, unrestricted by the BrAPI specification.",
"$ref": "../BrAPI-Common/AdditionalInfo.json#/$defs/AdditionalInfo",
Expand Down
60 changes: 3 additions & 57 deletions Specification/BrAPI-Schema/BrAPI-Core/Study.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,9 @@
},
"growthFacility": {
"description": "Short description of the facility in which the study was carried out.",
"relationshipType": "one-to-many",
"relationshipType": "many-to-one",
"referencedAttribute": "study",
"items": {
"$ref": "../BrAPI-Core/Study.json#/$defs/GrowthFacility",
"description": "GrowthFacility"
}
"$ref": "../BrAPI-Core/Study.json#/$defs/GrowthFacility"
},
"lastUpdate": {
"description": "The date and time when this study was last modified",
Expand All @@ -129,9 +126,8 @@
"observationLevels": {
"description": "Observation levels indicate the granularity level at which the measurements are taken. `levelName` \ndefines the level, `levelOrder` defines where that level exists in the hierarchy of levels. \n`levelOrder`s lower numbers are at the top of the hierarchy (ie field > 0) and higher numbers are \nat the bottom of the hierarchy (ie plant > 6). \n\n**Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
"relationshipType": "one-to-many",
"referencedAttribute": "study",
"items": {
"$ref": "../BrAPI-Core/Study.json#/$defs/ObservationLevels",
"$ref": "../BrAPI-Common/ObservationUnitHierarchyLevel.json#/$defs/ObservationUnitHierarchyLevel",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have here a association to ObservationUnitHierarchyLevel but no referencedAttribute nor reverse association.
Is that correct and wanted?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure it is needed. It is not in the model. Actually many of the reverse associations are not in the model, we need to discuss with @BrapiCoordinatorSelby about what we should do about this.

"description": "ObservationLevels"
},
"title": "ObservationLevels",
Expand Down Expand Up @@ -394,10 +390,6 @@
},
"ExperimentalDesign": {
"properties": {
"experimentalDesignDbId": {
"description": "The experimental and statistical design full description plus a category PUI taken from crop research ontology or agronomy ontology",
"type": "string"
},
"PUI": {
"description": "MIAPPE V1.1 (DM-23) Type of experimental design - Type of experimental design of the study, in the form of an accession number from the Crop Ontology.",
"type": [
Expand All @@ -419,9 +411,6 @@
"referencedAttribute": "experimentalDesign"
}
},
"required": [
"experimentalDesignDbId"
],
"title": "ExperimentalDesign",
"type": "object",
"brapi-metadata": {
Expand All @@ -430,10 +419,6 @@
},
"GrowthFacility": {
"properties": {
"growthFacilityDbId": {
"description": "Short description of the facility in which the study was carried out.",
"type": "string"
},
"PUI": {
"description": "MIAPPE V1.1 (DM-27) Type of growth facility - Type of growth facility in which the study was carried out, in the form of an accession number from the Crop Ontology.",
"type": [
Expand All @@ -455,9 +440,6 @@
"referencedAttribute": "growthFacility"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You changed the relationship in "Study" from "one-to-many" to "many-to-one".
Reverse association should be "one-to-many" than

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A study has one growth facility, but a growth facility may have several studies so

study -> growth facility is many-to-one
growth facilities->study will be one-to-many, correct :)

}
},
"required": [
"growthFacilityDbId"
],
"title": "GrowthFacility",
"type": "object",
"brapi-metadata": {
Expand Down Expand Up @@ -498,42 +480,6 @@
"brapi-metadata": {
"primaryModel": false
}
},
"ObservationLevels": {
"properties": {
"observationLevelsDbId": {
"description": "Observation levels indicate the granularity level at which the measurements are taken. `levelName` defines the level, `levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`s lower numbers are at the top of the hierarchy (ie field > 0) and higher numbers are at the bottom of the hierarchy (ie plant > 6). ",
"type": "string"
},
"levelName": {
"description": "A name for this level \n\n**Standard Level Names: study, field, entry, rep, block, sub-block, plot, sub-plot, plant, pot, sample** \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
"type": [
"null",
"string"
]
},
"levelOrder": {
"description": "`levelOrder` defines where that level exists in the hierarchy of levels. `levelOrder`'s lower numbers \nare at the top of the hierarchy (ie field -> 1) and higher numbers are at the bottom of the hierarchy (ie plant -> 9). \n\nFor more information on Observation Levels, please review the <a target=\"_blank\" href=\"https://wiki.brapi.org/index.php/Observation_Levels\">Observation Levels documentation</a>. ",
"type": [
"null",
"integer"
]
},
"study": {
"description": "Observation levels associated with a study",
"$ref": "../BrAPI-Core/Study.json#/$defs/Study",
"relationshipType": "many-to-one",
"referencedAttribute": "observationLevels"
}
},
"required": [
"observationLevelsDbId"
],
"title": "ObservationUnitHierarchyLevel",
"type": "object",
"brapi-metadata": {
"primaryModel": false
}
}
},
"$id": "https://brapi.org/Specification/BrAPI-Schema/BrAPI-Core/Study.json",
Expand Down
20 changes: 3 additions & 17 deletions Specification/BrAPI-Schema/BrAPI-Core/Trial.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"relationshipType": "one-to-many",
"referencedAttribute": "trial",
"items": {
"$ref": "../BrAPI-Core/Trial.json#/$defs/Publications",
"$ref": "../BrAPI-Core/Trial.json#/$defs/Publication",
"description": "Publications"
},
"title": "Publications",
Expand Down Expand Up @@ -192,10 +192,6 @@
},
"DatasetAuthorships": {
"properties": {
"datasetAuthorshipsDbId": {
"description": "License and citation information for the data in this trial",
"type": "string"
},
"datasetPUI": {
"description": "The DOI or other permanent unique identifier for this published dataset",
"type": [
Expand Down Expand Up @@ -231,21 +227,14 @@
"referencedAttribute": "datasetAuthorships"
}
},
"required": [
"datasetAuthorshipsDbId"
],
"title": "DatasetAuthorships",
"type": "object",
"brapi-metadata": {
"primaryModel": false
}
},
"Publications": {
"Publication": {
"properties": {
"publicationsDbId": {
"description": "MIAPPE V1.1 (DM-9) Associated publication - An identifier for a literature publication where the investigation is described. Use of DOIs is recommended.",
"type": "string"
},
"publicationPUI": {
"type": [
"null",
Expand All @@ -265,10 +254,7 @@
"referencedAttribute": "publications"
}
},
"required": [
"publicationsDbId"
],
"title": "Publications",
"title": "Publication",
"type": "object",
"brapi-metadata": {
"primaryModel": false
Expand Down
20 changes: 3 additions & 17 deletions Specification/BrAPI-Schema/BrAPI-Genotyping/AlleleMatrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"relationshipType": "one-to-many",
"referencedAttribute": "alleleMatrix",
"items": {
"$ref": "../BrAPI-Genotyping/AlleleMatrix.json#/$defs/DataMatrices",
"$ref": "../BrAPI-Genotyping/AlleleMatrix.json#/$defs/DataMatrix",
"description": "DataMatrices"
},
"title": "DataMatrices",
Expand Down Expand Up @@ -96,12 +96,8 @@
"primaryModel": true
}
},
"DataMatrices": {
"DataMatrix": {
"properties": {
"dataMatricesDbId": {
"description": "This is a single data matrix. It could be the allele matrix or an additional layer of metadata associated with each genotype value.",
"type": "string"
},
"dataMatrix": {
"description": "The two dimensional array of data, providing the allele matrix or an additional layer of metadata associated with each genotype value. Each matrix should be the same size and orientation, aligned with the \"callSetDbIds\" as columns and the \"variantDbIds\" as rows.",
"items": {
Expand Down Expand Up @@ -152,9 +148,6 @@
"referencedAttribute": "dataMatrices"
}
},
"required": [
"dataMatricesDbId"
],
"title": "DataMatrix",
"type": "object",
"brapi-metadata": {
Expand All @@ -163,10 +156,6 @@
},
"Pagination": {
"properties": {
"paginationDbId": {
"description": "Pagination for the matrix",
"type": "string"
},
"dimension": {
"description": "The dimension of the matrix being paginated",
"enum": [
Expand Down Expand Up @@ -208,15 +197,12 @@
]
},
"alleleMatrix": {
"description": "Pgination associated with an alleleMatrix",
"description": "Pagination associated with an alleleMatrix",
"$ref": "../BrAPI-Genotyping/AlleleMatrix.json#/$defs/AlleleMatrix",
"relationshipType": "many-to-one",
"referencedAttribute": "pagination"
}
},
"required": [
"paginationDbId"
],
"title": "Pagination",
"type": "object",
"brapi-metadata": {
Expand Down
Loading