Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Add handover mechanism (issue #114). #230

Merged
merged 5 commits into from
Mar 7, 2019
Merged

Conversation

sdelatorrep
Copy link
Contributor

@sdelatorrep sdelatorrep commented Nov 6, 2018

Proposal for implementing the handover (#114). It follows the structure presented here.

@sdelatorrep sdelatorrep added this to the 1.1.1 milestone Nov 6, 2018
@mbaudis
Copy link
Member

mbaudis commented Nov 6, 2018

@sdelatorrep Great - looks good at a first pass. Two points, related:

  • example(s)
  • description of suitable ontology -> example ...

Is "note" a term we (will) use throughout, for free-text comments?

@sdelatorrep
Copy link
Contributor Author

@mbaudis Good points! I'll update this PR with your suggestions.
About note, we already have it in other parts of the spec, e.g. BeaconDatasetAlleleResponse and it's expected to contain free-text comments.

@mbaudis
Copy link
Member

mbaudis commented Nov 7, 2018

@sdelatorrep Thanks for the note about note - I didn't take the time myself to comb through the specs :-)

@jrambla
Copy link
Collaborator

jrambla commented Nov 19, 2018

@mbaudis could you review that PR and approved it if fine?. Thx

@mbaudis
Copy link
Member

mbaudis commented Nov 19, 2018

+1
...for the structure & general implementation. Better examples & documentation expected to follow in the refinement process.

mbaudis
mbaudis previously approved these changes Nov 19, 2018
Copy link
Member

@mbaudis mbaudis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See note in the discussion. The ontology examples aren't fitting very well; but I support getting the structure in & update the documentation later.

mcupak
mcupak previously requested changes Dec 10, 2018
Copy link
Contributor

@mcupak mcupak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions/comments:

  • url should be a required field.
  • It seems there's some redundancy with id, label, and note fields. Why not have just one of them as a general description?
  • I'm not familiar with the ontology, but 3 use cases I have for handover are handover to a different beacon (e.g. controlled access), to a DOS/DRS service, and to a 3rd party portal (not a standard API). How would these be captured with the given ontology/handover object?
  • There's probably a better name for this field than datasetHandover, maybe something like externalLink.

@sdelatorrep
Copy link
Contributor Author

Hi @mcupak. I'll try to answer your questions:

  • url is already mandatory (and id too).
  • About id, label and note, I'm not sure I understand your concern. They are meant for different purposes as you can see in the examples.
  • I guess it could be something like:
{
      "id": "CUSTOM",
      "url": "http://somebeacon/query?assemblyId=grch37&blabla",
      "label": "Beacon with controlled access",
      "note": "This Beacon requires you have an account in this institution blabla"
}

(maybe in this specific context label and note seem redundant but if you consider the examples where an ontology is used, then they differ).

  • We proposed different names, datasetHandover and beaconHandover, so they can be easily retrieved by name instead of having to navigate through the structure (which would be needed if we use the same name, externalLink, everywhere).

@mbaudis
Copy link
Member

mbaudis commented Dec 10, 2018

Mostly concur w/ @sdelatorrep . However, still not sure about the id => ontology term option, and how this would be handled:

An ontology term would point to a definition of a data structure in an external reference:

{
  "id" : "http://www.ebi.ac.uk/efo/EFO_0004157",
  "label" : "BAM format",
  "url" : "https://api.mygenomeservice.org/handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0/",
  "label" : "Sequencing data of the callsets matched by the Beacon query"
}
  • If we go w/ the Ontology_class prototype provided in SchemaBlocks (and e.g. used in Phenopackets ...), we would have an attribute using this prototype.
  • While note seems o.k. to me for a free-text attribute, we usually use description (which looks a bit more formal).
  • I would prefer to have a list of handover objects, especially since they provide their types. If one does a "one type only" representation, this is easily being addressed w/o type.id query through the index...

So I would go with:

{
  "datasetHandover" : [
    {
      "type" : {
        "id" : "http://www.ebi.ac.uk/efo/EFO_0004157",
        "label" : "BAM format"
      },
      "description" : "Sequencing data of the callsets matched by the Beacon query",
      "url" : "https://api.mygenomeservice.org/handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0/"
    }
  ]
}

@mbaudis
Copy link
Member

mbaudis commented Dec 10, 2018

    Handover:
      type: object
      required:
        - type
        - url
      properties:
        type:
          ref: "https://ga4gh-metadata.github.io/schemas/main/yaml/common.yaml#definitions.Ontology_class
          description: |
            Handover type, as an Ontology_term object with CURIE syntax for the "id" value. Use “CUSTOM” for the "id" when no ontology is available. The "label" attribute would be the "preferred Label"  in the case of an ontology term.
          default:
            id: CUSTOM
            type : null
          example: 
            id: "http://www.ebi.ac.uk/efo/EFO_0004157",
            label: "BAM format"
        description:
          type: string
          description: An optional text describing the handover action.
          example: "VCF file containing structural variants of the samples matched by the Beacon query."
        url:
          type: string
          description: URL endpoint to where the handover process could progress (in RFC 3986 format).
          example: "https://api.mygenomeservice.org/handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0/"

@sdelatorrep
Copy link
Contributor Author

Hi! I've applied the proposal by @mbaudis (I renamed type with handoverType so there is no confusion with the OpenAPI keyword type):

    Handover:
      type: object
      required:
        - handoverType
        - url
      properties:
        handoverType:
          $ref: '#/components/schemas/HandoverType'
        description:
          type: string
          description: An optional text describing the handover action.
          example: "VCF file containing structural variants of the samples matched by the Beacon query."
        url:
          type: string
          description: URL endpoint to where the handover process could progress (in RFC 3986 format).
          example: "https://api.mygenomeservice.org/handover/9dcc48d7-fc88-11e8-9110-b0c592dbf8c0/"
    HandoverType:
      type: object
      required:
        - id
      description: |
            Handover type, as an Ontology_term object with CURIE syntax for the "id" value. 
      properties:
        id:
          type: string
          description: >-
            Use “CUSTOM” for the "id" when no ontology is available.
          default: CUSTOM
          example: "http://www.ebi.ac.uk/efo/EFO_0004157"
        label:
          type: string
          description: >-
            This would be the "preferred Label" in the case of an ontology term.
          default: null
          example: "BAM format"

@sdelatorrep sdelatorrep requested a review from mbaudis December 17, 2018 11:44
@sdelatorrep sdelatorrep dismissed mcupak’s stale review December 17, 2018 11:45

Please, review this and request changes if necessary. Thanks!

Copy link
Member

@mbaudis mbaudis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re: Handover: Looks good to me now! I'm not sure that naming the handover "type" => "handoverType" is strictly necessary - the confusion of parameters and parameter attributes is anyway there (description: description: ...); but sure; taken by itself it makes the code here more readable.

@mbaudis
Copy link
Member

mbaudis commented Dec 19, 2018

@sdelatorrep I've implemented this now in Beacon+:

"datasetAlleleResponses": [
  {
    "datasetHandover": [
      {
        "handoverType": {
          "id": "pgx:handover:biosamplesdata",
          "label": "Biosamples"
        },
        "description": "retrieve data of the biosamples matched by the query",
        "url": "http://beacon.progenetix.org/beaconplus-server/beacondeliver.cgi?do=biosamplesdata&accessid=5327fe14-0375-11e9-87ab-f392226922dd"
      },
      {
        "url": "http://beacon.progenetix.test/beaconplus-server/beacondeliver.cgi?do=individualsdata&accessid=53283c62-0375-11e9-87ab-f0c3824efc45",
        "description": "retrieve data of the individuals matched by the query",
        "handoverType": {
          "label": "Individuals",
          "id": "pgx:handover:individualsdata"
        }
      },
      {
        "description": "retrieve data of the variants matched by the query",
        "url": "http://beacon.progenetix.test/beaconplus-server/beacondeliver.cgi?do=variantsdata&accessid=53273f2d-0375-11e9-87ab-958a9c7ac1d4",
        "handoverType": {
          "id": "pgx:handover:variantsdata",
          "label": "Variants"
        }
      }
    ],
 ...  

@jrambla
Copy link
Collaborator

jrambla commented Jan 8, 2019

@juhtornr could you review, and hopefully approve, this PR, please?

mbaudis
mbaudis previously approved these changes Jan 17, 2019
@sdelatorrep sdelatorrep requested a review from jrambla January 18, 2019 10:16
jrambla
jrambla previously approved these changes Jan 28, 2019
@sdelatorrep sdelatorrep dismissed stale reviews from jrambla and mbaudis via ce64c20 January 29, 2019 09:40
@sdelatorrep sdelatorrep requested review from teemukataja, garysaunders, jrambla, juhtornr, mbaudis and mcupak and removed request for jrambla and mcupak February 11, 2019 11:01
beacon.yaml Outdated
properties:
handoverType:
$ref: '#/components/schemas/HandoverType'
description:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's go back to "notes" instead of "description". The aim of this property is to provide insights or considerations on the handover URL returned, not to describe it. Additionally, using "notes" avoids the naming collision with OpenAPI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jrambla Fine with that if that's better fitting to the OpenAPI style.

beacon.yaml Outdated
$ref: '#/components/schemas/HandoverType'
description:
type: string
description: An optional text describing the handover action.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"An optional text including considerations on the handover link provided"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

beacon.yaml Outdated
description:
type: string
description: An optional text describing the handover action.
example: "VCF file containing structural variants of the samples matched by the Beacon query."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text in example isn't specific enough. Replace by "This handover link provides access to a summarized VCF. To access the VCF containing the details for each sample filling an application is required. See Beacon contact information details"

Copy link
Collaborator

@jrambla jrambla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments about "description" and its example

jrambla
jrambla previously approved these changes Feb 19, 2019
mbaudis
mbaudis previously approved these changes Feb 19, 2019
@sdelatorrep sdelatorrep dismissed stale reviews from mbaudis and jrambla via 3a7eabb February 20, 2019 10:43
@sdelatorrep
Copy link
Contributor Author

I did the changes requested. Please, review it again and approve the PR. Thanks!

@sdelatorrep
Copy link
Contributor Author

Hi @garysaunders ! This PR is stalled waiting for Michael and others to review it. Please, could you help to chase them? Thanks!

@sdelatorrep sdelatorrep requested review from mbaudis and removed request for mbaudis March 6, 2019 11:13
@sdelatorrep sdelatorrep merged commit 504b6e3 into develop Mar 7, 2019
@sdelatorrep sdelatorrep deleted the sabela-issue-114 branch March 7, 2019 08:45
@blankdots
Copy link

Not sure if worth opening an issue because it is just a question, It is just me but there seems to be a relationship between handover and HATEOAS and HAL ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants