-
Notifications
You must be signed in to change notification settings - Fork 36
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
fix BrAPI observation search endpoint #4635
Conversation
Breedbase doesn't have the concept of trial as BrAPI expects. So, Breedbase uses folders as BrAPI trials and the trials as BrAPI studies. A folder can have subfolders and to have backwards compatibility I created $trial_ids. And $trial_ids suppose to return $study_ids_arrayref searchs as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-)
lib/CXGN/BrAPI/v2/Observations.pm
Outdated
@@ -62,7 +62,7 @@ sub search { | |||
{ | |||
bcs_schema=>$self->bcs_schema, | |||
data_level=>$observation_level, | |||
trial_list=>$trial_ids, | |||
trial_list=>$study_ids_arrayref, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code could benefit from some comments here... what are trial_ids and study_ids in this context?
I think in the lab meeting we discussed that some variables should be named differently to make the code clearer. |
a19e6fa
to
63143ed
Compare
This has been done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:-)
Description
Observations (phenotypic data) were missing from exports when BreedBase was the backing service. The cause was that the Observations search endpoint wasn't returning any data. BreedBase was interpreting the
trialDbIds
sent in the search POST body as both Trial and Study DbIds. This is likely due to conflicting terminology between BrAPI and BreedBase: https://gist.github.com/mlm483/b5e1590fdedd0c3dcd116bd29ef19423.Testing
Alternatively:
searchResultDbId
returned in step 2.The benefit of this approach is that you can try adding
"studyDbIds": ["{studyDbId}"],
to the POST call, to ensure the endpoint works as expected for search by Study as well.Checklist
/t/data/fixture/patches/
./docs
has been updated./js
to/js/source/legacy
.