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

Provide examples of usage in JSON-LD #33

Open
cmungall opened this issue Aug 22, 2017 · 10 comments
Open

Provide examples of usage in JSON-LD #33

cmungall opened this issue Aug 22, 2017 · 10 comments

Comments

@cmungall
Copy link
Contributor

unfortunately a large fraction of the bioinformatics community will be put off by RDF.

Luckily it's very easy to use JSON-LD as a trojan horse here. The bioinformatics community needs a JSON successor to GFF3 and it would be easy to place FALDO in this place

@JervenBolleman
Copy link
Collaborator

That makes sense, do you suggest doing this in the README.md? and also should we have a default context at biohackathon.org?

@JervenBolleman
Copy link
Collaborator

The fig9. in the paper is in JSON-LD

@cmungall
Copy link
Contributor Author

cmungall commented Aug 23, 2017 via email

@cmungall
Copy link
Contributor Author

cmungall commented Aug 23, 2017 via email

@JervenBolleman
Copy link
Collaborator

Regarding a degault context at biohackathon.org, it currently checks out the codebase every hour if I recall @ktym is the maintainer. I think it something we should be able to do something in Japan. I will at least prepare some code to generate an context.

I was looking into having tabs with examples in the README. Otherwise we can do more regarding documentation.

@JervenBolleman
Copy link
Collaborator

I was planning to commit this but some key issue means I can't commit right now. Will do later

A minimal JSON-LD example

We have a feature starting at a position 1 and ending on position 2 of a sequence that is not described here.

{
  "@context":{
    "@vocab": "http://biohackathon.org/resource/faldo#",
    "feature" : {
      "@type" : "@id",
      "@id" : "http://purl.uniprot.org/core/annotation"
    }
  },
  "feature":{ "@id":"my-feature-id",
             "begin":{"position":1},
             "end":{"position":2}}
}

This uses non of the extensive advanced capabilities of JSON-LD or FALDO. It is a minimal example to show that any
JSON producing protein/dna/rna data service can easily be turned into an RDF one using just a bit of JSON-LD @context.

@cmungall
Copy link
Contributor Author

Great start! As you say, we can use additional features of json-ld to make it more appealing to developers: we can have the @id field in the main body simply be id (it's possible to push all the @ stuff into the context header or linked document).

I note also this example creates blank nodes for the Positions. I think this is OK, and we can imagine skolemizing or UUIDing as part of a separate translation step if this is perceived to be an issue.

@cmungall
Copy link
Contributor Author

May want to coordinate the json-ld example with bioschemas, see:

BioSchemas/specifications#210

@JervenBolleman your example above is probably too underspecified, we would need at least a reference

@JervenBolleman
Copy link
Collaborator

@cmungall yes, the example is completely underspecified as I was thinking of some of the existing public JSON for genomic/protein information. Which are like

{
    "features": [ {"type": "SIGNAL",
        "category": "MOLECULE_PROCESSING",
        "begin": "1",
        "end": "17"}
    ]
}

Which are common but put 3 things into one object making it hard to separate them out with just the JSON-LD processing (Maybe framing can help but I am not an expert there).

@cmungall
Copy link
Contributor Author

cmungall commented Oct 1, 2018

I don't think JSON-LD processing is sufficient to transform the above into a FALDO-compliant RDF graph (in which each position is its own node).

One possibility is to make FALDO more lenient and allow flatter representations, and define some kind of rule-based transform to entail the deeper representation.

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