ga4gh-beacon / beacon-v2-Models

Models that leverage the Beacon Framework v2
Apache License 2.0
4 stars 7 forks source link

Query parameter definition & combinations #101

Closed mbaudis closed 2 years ago

mbaudis commented 2 years ago

The aminoacidChange query parameter definition ("Aminoacid alteration of interest. Format 1 letter") is at odds with the examples ("V600E", " M734V"). It is not clear how this should be used (i.e. geneId=BRAF&aminoacidChange=V600E)?

https://github.com/ga4gh-beacon/beacon-v2-Models/blob/c41c75728b3fbff90fd57a9bfff58c74218e5932/BEACON-V2-Model/genomicVariations/requestParameters.json#L67

jrambla commented 2 years ago

The description could be not clear enough, but "format 1 letter" means V instead of Val.

mbaudis commented 2 years ago

@jrambla Thought so, but could be more verbose ... But more importantly: We have no clear definition which parameter combinations are possible. I had done some "QueryTypes" schemas for v1, but this is now purely by documentation in v2, so far.

One could define this in the schema (doodling here ...):

title: g_variant
type: object
oneOf:
  - GenomicAlleleQuery
  - BeaconRangeQuery
  - BeaconBracketQuery
  - BeaconAminoacidChangeQuery
  - ... 
definitions:
  Start:
    description: ...
...
  GeneId:
...
  GenomicAlleleQuery:
    type: object
    properties:
      referenceName
        $ref: ./requestParametersComponents.json#/definitions/RefSeqId
      start:
        $ref: definitions/Start
      alternateBases:
...
    required:
      - referenceName
      - start
      - alternateBases
...
  BeaconAminoacidChangeQuery:
    type: object
    properties:
      geneId:
        $ref: definitions/GeneId
      aminoacidChange:
...

Putting this on the TODO list?

jrambla commented 2 years ago

Originally, I was trying to keep the requestParameters simple enough assuming that this would make life easier for people to create new ones in their instances... however, you could be right and we must balance in favor of usage than in favor of implementers. My gut feeling is in favor of adding it to the TODO list.