Open aliceboizet opened 1 year ago
Discussion with @aliceboizet : Get - /germplasm:
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"accessionNumber": "A0000003",
[...]
"breedingMethodName": "Male Backcross",
"collection": "Rice Diversity Panel 1 (RDP1)", // leave as it is for backward compatibility ?
"collectionDbIds": [
"urn:INRAE:collection:1234",
"urn:INRAE:collection:12345",
]
"commonCropName": "Maize",
[...]
}
]
}
}
GET - /collection
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"germplasmCount": 509,
"collectionDbId": "urn:INRAE:collection:1234",
"collectionName": "Collection blé du projet Whealbi",
"collectionType": "Work collection"
}
]
}
}
Plus possibly the addition of the following fields in colleciton: "institutionName": INRAE, "institutionFAOCode": null, "institutionAcronym": null, "organization": null, "doicollection": null, "crb": { "nom_crb": "CRB Plantes Tropicales", "doicrb": null }
Other possibility :
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"accessionNumber": "A0000003",
[...]
"breedingMethodName": "Male Backcross",
"collection": "Rice Diversity Panel 1 (RDP1)", // leave as it is for backward compatibility ?
"collections": [
{ "collectionDbId": "urn:INRAE:collection:1234","collectionName": "Collection blé du projet Whealbi"}
{ "collectionDbId": "urn:INRAE:collection:12345", "collectionName": "BRC core collection "}
]
"commonCropName": "Maize",
[...]
}
]
}
}
plus GET - /collection
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"germplasmCount": 509,
"collectionDbId": "urn:INRAE:collection:1234",
"collectionName": "Collection blé du projet Whealbi",
"collectionType": "Work collection"
}
]
}
}
This all looks good to me. Having collections:[]
with both DbId and Name makes sense if this info is going to be presented to a user.
The additional fields for the Collection
object also make sense to me, except crb
. What is crb
?
crb should be BRC, it stands for biological resource center aka genebank. But we need to discuss this with a few other people, the use case for these fields is not clear to me yet.
Current proposition @aliceboizet Franciane @nicolas971
Other possibility :
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"accessionNumber": "A0000003",
[...]
"breedingMethodName": "Male Backcross",
"collection": "Rice Diversity Panel 1 (RDP1)", // leave as it is for backward compatibility ?
"collections": [
{ "collectionDbId": "urn:INRAE:collection:1234","collectionName": "Collection blé du projet Whealbi"}
{ "collectionDbId": "urn:INRAE:collection:12345", "collectionName": "BRC core collection "}
]
"commonCropName": "Maize",
[...]
}
]
}
}
plus GET - /collection
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"germplasmCount": 509,
"collectionDbId": "urn:INRAE:collection:1234",
"collectionPUI": "http://doi.org/10.1554/WheatColl",
"collectionName": "Collection blé du projet Whealbi",
"collectionType": "Work collection",
"instituteName": " Plant Biology and Breeding, INRAE Montpellier",
"instituteOrganization": "INRAE",
"instituteCode": "FRA041", //This is the FAO wiews code, to precise in the documentation: https://www.fao.org/wiews/data/organizations/en
"genebank": {// Biological Resource Center aka Genebanks
"genebankName": "CRB Plantes Tropicales",
"genebankPUI": null
}
}
]
}
}
@BrapiCoordinatorSelby it seems ok to the four of us and ready to be discussed for adoption at the next brapi hackathon.
yup, looks good to me.
Two comments: 1
"collection": "Rice Diversity Panel 1 (RDP1)", // leave as it is for backward compatibility ?
It will be kept and marked as deprecated for the next minor version spec update (v2.2) for backward compatibility. It will be removed permanently in the next major update (v3.0)
2
"instituteName": "Plant Biology and Breeding, INRAE Montpellier", "instituteOrganization": "INRAE",
What is the difference between instituteName
and instituteOrganization
? It seems like the MCPD standard model uses instituteName
, instituteCode
and sometimes instituteAddress
to identify an institute.
BrAPI Hackathon 2024 : change name of "germplasmCount" to "collectionSize" for naming consistency with lists.
What about using /germplasmCollection rather that /colection to avoid confusion ? @aliceboizet @BrapiCoordinatorSelby
@cpommier We should redefine what we mean exactly by collection and see how it is different from a germplasm list. If the collection is a physical collection, then we would have only one collection per germplasm.
Hi @BrapiCoordinatorSelby , With Alice, Célia, Francianne, Nicolas and I we reviewed this, and we stick to the following proposition (same as above)
Is that ok with you ?
GET /germplasm
//Addition of the collections ARRAY
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"accessionNumber": "A0000003",
[...]
"breedingMethodName": "Male Backcross",
"collection": "Rice Diversity Panel 1 (RDP1)", // leave as it is for backward compatibility ?
"collections": [
{ "collectionDbId": "urn:INRAE:collection:1234",
"collectionName": "Collection blé du projet Whealbi"},
{ "collectionDbId": "urn:INRAE:collection:12345",
"collectionName": "BRC core collection "}
]
"commonCropName": "Maize",
[...]
}
]
}
}
POST - /search/germplasm
Replace search field
"collections"
with
"collectionNames"
"collectionDbIds"
plus GET - /collection // Get the list of possible collectionName and collectionDbId to use as filter for /serch/germplasm for fields collection and collections
{
"@context": [
"https://brapi.org/jsonld/context/metadata.jsonld"
],
"metadata": {
[...]
},
"status": [
[...]
]
},
"result": {
"data": [
{
"germplasmCount": 509,
"collectionDbId": "urn:INRAE:collection:1234",
"collectionPUI": "http://doi.org/10.1554/WheatColl",
"collectionName": "Collection blé du projet Whealbi",
"collectionType": "Work collection",
"instituteName": " Plant Biology and Breeding, INRAE Montpellier",
"instituteOrganization": "INRAE",
"instituteCode": "FRA041", //This is the FAO wiews code, to precise in the documentation: https://www.fao.org/wiews/data/organizations/en
"genebank": {// Biological Resource Center aka Genebanks
"genebankName": "CRB Plantes Tropicales",
"genebankPUI": null
}
}
]
}
}
Hi Cyril, looks good :) should the endpoint be plural? GET - /collections
probably, I trust Peter to take care of the consistency check.
In the Germplasm service, there is the parameter "collection" which enables to get germplasm belonging to a specific collection. We need to have a new service to get the list of available germplasm collections.
@cpommier proposal for Collection model :
This issue is related to #558 and #570