Skip to content
Merged
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
208 changes: 192 additions & 16 deletions Specification/BrAPI-Core/Studies/README.md

Large diffs are not rendered by default.

14 changes: 1 addition & 13 deletions Specification/BrAPI-Core/Studies/Schemas/StudyNewRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,20 +179,8 @@ components:
nullable: true
example: Irrigation was applied according needs during summer to prevent water stress.
experimentalDesign:
description: The experimental and statistical design full description plus a category PUI taken from crop research ontology or agronomy ontology
type: object
$ref: '#/components/schemas/ExperimentalDesign'
nullable: true
properties:
description:
description: MIAPPE V1.1 (DM-22) Description of the experimental design - Short description of the experimental design, possibly including statistical design. In specific cases, e.g. legacy datasets or data computed from several studies, the experimental design can be "unknown"/"NA", "aggregated/reduced data", or simply 'none'.
type: string
nullable: true
example: Lines were repeated twice at each location using a complete block design. In order to limit competition effects, each block was organized into four sub-blocks corresponding to earliest groups based on a prior information.
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: string
nullable: true
example: CO_715:0000145
growthFacility:
description: Short description of the facility in which the study was carried out.
type: object
Expand Down
72 changes: 54 additions & 18 deletions Specification/BrAPI-Phenotyping/ObservationUnits/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,28 @@ components:
factor:
description: |-
The type of treatment/factor. ex. 'fertilizer', 'inoculation', 'irrigation', etc

MIAPPE V1.1 (DM-61) Experimental Factor type - Name/Acronym of the experimental factor.
type: string
nullable: true
deprecated: true
example: fertilizer
factorPUI:
description: |-
The PUI of the factor which may link to an ontology
type: string
nullable: true
example: test-factor:dia2020-2-nv.fertilizer
modality:
description: |-
The treatment/factor description. ex. 'low fertilizer', 'yellow rust inoculation', 'high water', etc
MIAPPE V1.1 (DM-62) Experimental Factor description - Free text description of the experimental factor. This includes all relevant treatments planned and protocol planned for all the plants targeted by a given experimental factor.

MIAPPE V1.1 (DM-62) Experimental Factor description - Free text description of the experimental factor. This includes all relevant treatments planned and protocol planned for all the plants targeted by a given experimental factor.
type: string
nullable: true
deprecated: true
example: low fertilizer

modalityPUI:
description: |-
The PUI of the modality which may link to an ontology
type: string
nullable: true
example: test-factor:dia2020-2-nv.lf
119 changes: 118 additions & 1 deletion Specification/BrAPI-Schema/BrAPI-Core/Study.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,20 @@
"ExperimentalDesign": {
"properties": {
"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. **Deprecated in v2.2** Please use `experimentalDesignPUI`. Github issue number #539",
"type": [
"null",
"string"
],
"deprecated": true
},
"experimentalDesignPUI": {
"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": [
"null",
"string"
]
],
"examples": ["CO_715:0000145"]
},
"description": {
"description": "MIAPPE V1.1 (DM-22) Description of the experimental design - Short description of the experimental design, possibly including statistical design. In specific cases, e.g. legacy datasets or data computed from several studies, the experimental design can be \"unknown\"/\"NA\", \"aggregated/reduced data\", or simply 'none'.",
Expand All @@ -406,6 +415,56 @@
"string"
]
},
"randomizationType": {
"description": "The type of randomization use to create the experimental design.",
"type": [
"null",
"string"
],
"examples": ["RCB:Randomize Complete Block"]
},
"layoutPattern": {
"description": "How the trial is layout in the field.",
"type": [
"null",
"string"
],
"examples": ["Serpentine"]
},
"setSize": {
"description": "The size of the sets in the design.",
"type": [
"null",
"number"
],
"examples": [1]
},
"rowsPerPlot": {
"description": "The number of rows in a plot.",
"type": [
"null",
"number"
],
"examples": [1]
},
"firstRepRand": {
"description": "Is the first replication random.",
"type": [
"null",
"boolean"
],
"examples": [true]
},
"experimentFactors": {
"description": "The factors used in the experimental design.",
"items": {
"$ref": "../BrAPI-Core/Study.json#/$defs/ExperimentFactor"
},
"type": [
"null",
"array"
]
},
"study": {
"description": "Experimental design associated with a study",
"$ref": "../BrAPI-Core/Study.json#/$defs/Study",
Expand All @@ -420,6 +479,64 @@
"primaryModel": false
}
},
"ExperimentFactor": {
"properties": {
"factor": {
"description": "The type of treatment/factor. ex. 'fertilizer', 'inoculation', 'irrigation', etc\n\nMIAPPE V1.1 (DM-61) Experimental Factor type - Name/Acronym of the experimental factor.",
"type": "string",
"examples": [
"fertilizer"
]
},
"factorPUI": {
"description": "The PUI of the factor which may link to an ontology.",
"type": [
"null",
"string"
],
"examples": [
"test-factor:dia2020-2-nv.fertilizer"
]
},
"modalities": {
"description": "The type of treatment/factor. ex. 'fertilizer', 'inoculation', 'irrigation', etc\n\nMIAPPE V1.1 (DM-61) Experimental Factor type - Name/Acronym of the experimental factor.",
"items": {
"type": "object",
"properties": {
"modality": {
"description": "The treatment/factor description. ex. 'low fertilizer', 'yellow rust inoculation', 'high water', etc\n\nMIAPPE V1.1 (DM-62) Experimental Factor description - Free text description of the experimental factor. This includes all relevant treatments planned and protocol planned for all the plants targeted by a given experimental factor. ",
"type": "string",
"examples": [
"low fertilizer"
]
},
"modalityPUI": {
"description": "The PUI of the modality which may link to an ontology.",
"type": [
"null",
"string"
],
"examples": [
"test-factor:dia2020-2-nv.lf"
]
}
}
},
"type": [
"null",
"array"
],
"examples": [
"fertilizer"
]
}
},
"title": "ExperimentFactor",
"type": "object",
"brapi-metadata": {
"primaryModel": false
}
},
"GrowthFacility": {
"properties": {
"PUI": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@
"observationUnitDbId"
],
"title": "ObservationUnit",
"description": "A representation of the physical entity being observed during a phenotype data collection process. Typically, this is a Plot or a Plant, but it could include things like Fields, Blocks, or Samples.",
"type": "object",
"brapi-metadata": {
"primaryModel": true
Expand Down Expand Up @@ -284,21 +283,23 @@
"primaryModel": false
}
},
"Treatment": {
"ObservationTreatment": {
"properties": {
"factor": {
"description": "The type of treatment/factor. ex. 'fertilizer', 'inoculation', 'irrigation', etc\n\nMIAPPE V1.1 (DM-61) Experimental Factor type - Name/Acronym of the experimental factor.",
"type": [
"null",
"string"
]
],
"examples": ["test-factor:dia2020-2-nv.fertilizer"]
},
"modality": {
"description": "The treatment/factor description. ex. 'low fertilizer', 'yellow rust inoculation', 'high water', etc\n\nMIAPPE V1.1 (DM-62) Experimental Factor description - Free text description of the experimental factor. This includes all relevant treatments planned and protocol planned for all the plants targeted by a given experimental factor. ",
"type": [
"null",
"string"
]
],
"examples": ["test-factor:dia2020-2-nv.lf"]
},
"observationUnit": {
"description": "associated observation Unit",
Expand All @@ -307,7 +308,7 @@
"referencedAttribute": "treatments"
}
},
"title": "Treatment",
"title": "ObservationTreatment",
"description": "The type of treatment/factor. ex. 'fertilizer', 'inoculation', 'irrigation', etc. MIAPPE V1.1 (DM-61) Experimental Factor type - Name/Acronym of the experimental factor.",
"type": "object",
"brapi-metadata": {
Expand Down
96 changes: 96 additions & 0 deletions Specification/Components/Schemas/ExperimentalDesign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
info:
title: BrAPI
version: ''
openapi: 3.0.0
paths: {}
components:
schemas:
ExperimentalDesign:
title: ExperimentalDesign
type: object
description: |-
The experimental and statistical design full description plus a category PUI taken from crop research ontology or agronomy ontology
properties:
description:
description: MIAPPE V1.1 (DM-22) Description of the experimental design - Short description of the experimental design, possibly including statistical design. In specific cases, e.g. legacy datasets or data computed from several studies, the experimental design can be "unknown"/"NA", "aggregated/reduced data", or simply 'none'.
type: string
nullable: true
example: Lines were repeated twice at each location using a complete block design. In order to limit competition effects, each block was organized into four sub-blocks corresponding to earliest groups based on a prior information.
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.

**Deprecated in v2.2** Please use `experimentalDesignPUI`. Github issue number #539
type: string
deprecated: true
nullable: true
example: CO_715:0000145
experimentalDesignPUI:
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: string
nullable: true
example: CO_715:0000145
randomizationType:
description: The type of randomization use to create the experimental design
type: string
nullable: true
example: RCB:Randomize Complete Block
layoutPattern:
description: How the trial is layout in the field
type: string
nullable: true
example: Serpentine
setSize:
description: The size of the sets in the design
type: number
nullable: true
example: 1
rowsPerPlot:
description: The number of rows in a plot
type: number
nullable: true
example: 1
firstRepRand:
description: Is the first replication random
type: boolean
nullable: true
example: true
experimentFactors:
description: |-
The factors used in the experimental design
type: array
nullable: true
items:
type: object
title: "ExperimentFactor"
properties:
factor:
description: |-
The type of treatment/factor. For example 'fertilizer', 'inoculation', 'irrigation', etc

MIAPPE V1.1 (DM-61) Experimental Factor type - Name/Acronym of the experimental factor.
type: string
example: fertilizer
factorPUI:
description: |-
The PUI of the factor which may link to an ontology
type: string
nullable: true
example: test-factor:dia2020-2-nv.fertilizer
modalities:
items:
type: object
properties:
modality:
description: |-
The treatment/factor modality or level. For example 'low fertilizer', 'yellow rust inoculation', 'high water', etc

MIAPPE V1.1 (DM-62) Experimental Factor description - Free text description of the experimental factor. This includes all relevant treatments planned and protocol planned for all the plants targeted by a given experimental factor.
type: string
example: low fertilizer
modalityPUI:
description: |-
The PUI of the modality which may link to an ontology
type: string
nullable: true
example: test-factor:dia2020-2-nv.lf
28 changes: 27 additions & 1 deletion Specification/Generated/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Generated

The files in this directory are automatically generated by the [Schema Tools](../../generator/README.md) using
The files in this directory are automatically generated by the [Schema Tools](https://github.com/plantbreeding/brapi-schema-tools) using
a github [action](../../.github/workflows/generate-schema.yml).

## Open API

The generated OpenAPI YAML files by module are
* [BrAPI-Core.yaml](BrAPI-Core.yaml)
* [BrAPI-Genotyping.yaml](BrAPI-Genotyping.yaml)
* [BrAPI-Germplasm.yaml](BrAPI-Germplasm.yaml)
* [BrAPI-Phenotyping.yaml](BrAPI-Phenotyping.yaml)

The generated single JSON file from the [JSON Schema](../BrAPI-Schema) is
* [brapi_generated.json](brapi_generated.json)

The compiled single JSON file from the [YML specification files](../) is
* [brapi_generated.json](brapi_generated.json)

The comparison between the generated and compiled JSON file can be found here
* [brapi_openapi_comparison.md](brapi_openapi_comparison.md)

## GraphQL

The generated GraphQL file from the [JSON Schema](../BrAPI-Schema) is
* [brapi_generated.graphqls](brapi_generated.graphqls)

## OWL Turtle

The generated OWL Turtle from the [JSON Schema](../BrAPI-Schema) is
* [brapi_generated.ttl](brapi_generated.ttl)

Loading
Loading