-
Notifications
You must be signed in to change notification settings - Fork 20
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
Filtering across endpoint boundaries #78
Comments
@DavidCroftDKFZ While we don't use the RI (rather bycon) the method you describe (record-level retrieval & one-by-one querying w/ IMO Beacon by itself shouldn't support such wildcard approaches (there are a number of reasons) but you should feel free to add your own extensions as long as they don't collide w/ the spec. A simple & conform way would be to process server-side and deliver a That being said: One of the next areas of Beacon protocol development will be aggregated results so if there is enough justification for dedicated scenarios (@mcourtot?)... Footnotes
|
Re. wildcards, I only used the "*" notation to give an idea of what I was trying to achieve. Essentially what I am requesting is a JOIN operation that works between endpoints (assuming that the relevant IDs are shared by both, of course). If this can be done without widcards, great, I would be happy with that. |
The query you are requiring can be expressed within the current spec, also tricky to implement. The REST principle: the URL determines which entry type/resource you are returning. In your case, given that you want to count genomic variations, that must be the endpoint. But as you are not interested in all genomic variations but only in the ones coming from blood samples, you must include that as a scoped filter, like that:
The tricky part is your backend understanding which are the necessary steps to solve that query. The solution will depend a lot on the schema on you backend. |
@jrambla I guess I misread @DavidCroftDKFZ 's question as implying a query across multiple datasets. Obviously
... should work since the anatomical location should be scoped against biosamples automatically (and the information if it exists and the scoping should be available through the In fact http://progenetix.org/beacon/g_variants/?filters=UBERON:0000178 would work ... but dies due to a time-out since counting over some 10^6 variants I guess :-( |
@jrambla The Edge case: There could be implementations which use the same terms for different scopes (e.g. maybe you want to retrieve a normal tissue biosample for an individual with a renal cell carcinoma and not the tumor sample - in which case the e.g. But apart from that for the information endpoint we may think about introducing a Pinging @tb143 ... |
@DavidCroftDKFZ This has now been addressed in #118 which introduces an informational parameter for
Closing this; extensions will be further evaluated by Beacon Filter Scouts (e.g. |
Hi,
I have installed the Beacon 2 RI and imported the Cineca test dataset from the GUI RI. I can query the endpoints "individuals", "biosamples" and "g_variants" and I can do filtering.
I would like to be able to find a count of all genetic variants for which there is a biosample of type "blood".
The only way that I have been able to think of is to run a POST request on the endpoint:
http://beacon:5050/api/biosamples/
with the filter:
"filters" : [ {
"id" : "UBERON:0000178"
} ],
Then I would have to extract the biosample IDs from the results and run the following for every returned ID:
http://beacon:5050/api/biosamples/HG00657/g_variants/
(HG00657 is an example ID)
It sounds like it would be slow and anyway, I don't want to have to pull the sample IDs to my server, I would rather they stay on site, for data protection reasons.
Is there some kind of shortcut notation that I could use to get what I want? E.g. something like:
http://beacon:5050/api/biosamples/*/g_variants/
...with the above filter?
Regards,
David Croft.
The text was updated successfully, but these errors were encountered: