Skip to content
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

Metadata inside schema #4

Open
mbaudis opened this issue Jun 24, 2019 · 5 comments
Open

Metadata inside schema #4

mbaudis opened this issue Jun 24, 2019 · 5 comments
Assignees

Comments

@mbaudis
Copy link
Contributor

mbaudis commented Jun 24, 2019

In the original "blocks" format I had included some of relevant meta information about e.g. provenance and use of the respective schema. This information is then also parsed into the web representations (using YAML -> MD tool and then having the web views auto-generated through Github's Jekyll engine).

Can we have the metadata represented in the original version (e.g. example for Ontology_term) in the {@js} document, e.g. in an annotation attribute? I really would like to keep this all bundled in one document.

annotation:
  authors:
    - "GA4GH Metadata Task Team"
    - "@cmungall"
    - "@mcourtot"
    - "@mbaudis"
  provenance:
    - description: "Original GA4GH schema"
      url: 'https://github.com/ga4gh/ga4gh-schemas/blob/master/src/main/proto/ga4gh/common.proto#L152'
    - description: "additional discussions with @cmungall and phenopackets developers"
  used_by:
    - description: Phenopackets
      url: 'https://github.com/phenopackets/phenopacket-schema/blob/master/docs/ontologyclass.rst' 
    - description: "Progenetix data schema"
      url: "http://progenetix.org"
      notes: |
        The Progenetix cancer genome data repository uses a data structure aligned with the GA4GH object model and schema recommendations.
        The OntologyTerm construct is used to represent a variety of core data elements, such as diagnostic classifications, material provenance genotypic sex.
      examples:
        - data_use_conditions:
            id: "DUO:0000004"
            label: "no restriction"
        - biocharacteristics:
          - description: "classic cerebellar medulloblastoma"
            type:
              id: "ncit:C3222"
              label: "Medulloblastoma"
@Relequestual
Copy link

I agree we should preserve this data.
JSON Schema is rather permissive in terms of additional keywords, so we can copy this directly.
Maybe the attribute should be $docs > meta as opposed to annotations though, as annotations have a specific meaning within JSON Schema.

@mbaudis
Copy link
Contributor Author

mbaudis commented Jun 24, 2019

@Relequestual Like below? And you would use $docs because there is/will be a schema for the structure?

$docs:
  meta:
    authors:
      - "GA4GH Metadata Task Team"
      - "@cmungall"
      - "@mcourtot"
      - "@mbaudis"
    provenance:
      - description: "Original GA4GH schema"
        url: 'https://github.com/ga4gh/ga4gh-schemas/blob/master/src/main/proto/ga4gh/common.proto#L152'
      - description: "additional discussions with @cmungall and phenopackets developers"
    used_by:
      - description: Phenopackets
        url: 'https://github.com/phenopackets/phenopacket-schema/blob/master/docs/ontologyclass.rst' 

@Relequestual
Copy link

Relequestual commented Jul 1, 2019

We should build a stand alone schema for this, but doing so is not blocking.

mbaudis added a commit that referenced this issue Jul 15, 2019
This is a firs go at the meatdata for block provenance etc. Please see the discussion in #4 #4
@mbaudis
Copy link
Contributor Author

mbaudis commented Jul 16, 2019

@Relequestual Well, here you go. First draft => please have a go (e.g. I guess one has to reference the BlockMeta itself in its own header, since it contains a meta block?)

@Relequestual
Copy link

Nice!
Currently there's no official way for a JSON instance (schema or otherwise) to identify what schema it conforms to.
This can be slightly changed so it can validate against a whole schema, rather than referenced in a meta schema (which I don't think is the intent).

I'll look to make changes tomorrow and show a demo of the result.

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

No branches or pull requests

2 participants