varfish-org / varfish-server

VarFish: comprehensive DNA variant analysis for diagnostics and research
MIT License
43 stars 11 forks source link

Expose Case Annotations in varfish API #863

Open xiamaz opened 1 year ago

xiamaz commented 1 year ago

Currently an endpoint for retrieving annotations for an individual case is already exposed in the following endpoint:

https://github.com/bihealth/varfish-server/blob/1e956c92aabfc7fee9caaefaec60f0034f5e2cc9/cases/views_api.py#L363

This endpoint currently has no permission_classes set and is not reachable.

Expected behavior:

Using an varfish API Token, access to the endpoint should be possible.

Current behavior:

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://varfish.bihealth.org/cases/api/case-gene-annotation/list/<CASE_UUID>
xiamaz commented 1 year ago

@stolpeo Do you perhaps know how the new endpoints can be added to the token based API? This might also be needed for some other additional endpoints, where I would like to perform some automated filters.

xiamaz commented 1 year ago

@holtgrewe I can add a PR, but do you currently have the capacity to review PRs regarding these issues? Otherwise I can find alternative solutions, that do not require changing the Varfish API

holtgrewe commented 1 year ago

@xiamaz yes, we will review PRs.

xiamaz commented 1 year ago

Currently, the following endpoints will need to be exposed in order to export all information necessary in exported variants:

    smallvar_flags_url = "https://varfish.bihealth.org/variants/api/small-variant-flags/list-create/{varfish_uuid}"
    smallvar_annos_url = "https://varfish.bihealth.org/variants/ajax/smallvariant/user-annotated-case/{varfish_uuid}"
    svs_flags_url = "https://varfish.bihealth.org/svs/ajax/structural-variant-flags/list-create/{varfish_uuid}"
    svs_details_url = "https://varfish.bihealth.org/svs/sv-query-result-row/retrieve/{sv_uuid}"
xiamaz commented 1 year ago

We require the following information for both structural and small variants: