ga4gh-beacon / beacon-elixir

Elixir Beacon Reference Implementation. Latest release is compliant with v1.1.0 of the specification.
https://beacon-project.io/
Other
14 stars 7 forks source link

Examples fix #9

Closed mbaudis closed 6 years ago

mbaudis commented 6 years ago

IMO there are problems w/ the examples:

"sampleAlleleRequests" : [ {
 ...
 }, {
    "alternateBases" : null,
    "referenceBases" : "N",
    "referenceName" : "X",
    "start" : null,
    "startMin" : 153592310,
    "startMax" : 153592317,
    "end" : null,
    "endMin" : 153517030,
    "endMax" : 153517050,
    "variantType" : null,
    "assemblyId" : "GRCh37",
    "datasetIds" : [ "EGAD00000000028" ],
    "includeDatasetResponses" : null
  }, {
    "alternateBases" : null,
    "referenceBases" : "N",
    "referenceName" : "X",
    "start" : 147880925,
    "startMin" : null,
    "startMax" : null,
    "end" : 146342284,
    "endMin" : null,
    "endMax" : null,
    "variantType" : null,
    "assemblyId" : "GRCh37",
    "datasetIds" : [ "EGAD00000000028" ],
    "includeDatasetResponses" : null
  } ],

Either alternateBases or variantType are required. Since both provide start (or interval) and end (or ...) positions, I would assume that either DUP or DEL should be given.

sdelatorrep commented 6 years ago

Hi @mbaudis , you're totally right. Actually, if you deploy the JAR and try to query the beacon using the values in this example you get the expected error:

{
  "beaconId" : "elixir-demo-beacon",
  "exists" : false,
  "error" : {
    "errorCode" : "GENERIC_ERROR",
    "message" : "Either 'alternateBases' or 'variantType' is required"
  },
  "alleleRequest" : {
    "alternateBases" : null,
    "referenceBases" : "N",
    "referenceName" : "X",
    "start" : null,
    "startMin" : 153592310,
    "startMax" : 153592317,
    "end" : null,
    "endMin" : 153517030,
    "endMax" : 153517050,
    "variantType" : null,
    "assemblyId" : "GRCh37",
    "datasetIds" : null,
    "includeDatasetResponses" : "NONE"
  },
  "apiVersion" : "0.4",
  "datasetAlleleResponses" : null
}

I'll fix the examples ASAP.