FALDO and JSON-LD

19 views
Skip to first unread message

cjmu...@lbl.gov

unread,
Aug 5, 2013, 8:22:35 PM8/5/13
to fa...@googlegroups.com
Has anyone tried translating a set of triples that use the FALDO schema into JSON-LD? This seems like it might be a useful way to bridge the RDF and JSON/JS world.

The basic idea is that you would have JSON that is modeled in a way that is natural to the average web developer. E.g.

{"id":"myGene",
  "type":"gene",
  "location":
   {"begin":100,
     "end":200,
     "strand":"+"
...

At the top of the json object you would have a @context declaration that provides a mapping of keys to RDF properties and values to OWL classes. The resulting document would be semantically equivalent to a FALDO ttl or rdf/xml file. In theory a growing number of RDF processors would accept this just as if it were RDF. In practice I don't know how well this works as I have not fully evaluated the toolchains.

You could think of this as a kind of semantic trojan horse.

Peter Ansell

unread,
Aug 5, 2013, 8:28:07 PM8/5/13
to cjmu...@lbl.gov, fa...@googlegroups.com, Stian Soiland-Reyes
I have it on my todo list to implement a context generator that takes an OWL vocabulary and converts it to JSONLD using either OWLAPI and/or JSONLD-Java [1]. That would be the main stumbling block in the current toolchain.

Chris Mungall

unread,
Aug 5, 2013, 9:08:13 PM8/5/13
to Peter Ansell, fa...@googlegroups.com, Stian Soiland-Reyes
That would be great. Of course it would be possible and probably not very difficult to manually generate a context for FALDO but I like the idea of an automated approach.

Chris Mungall

unread,
Aug 7, 2013, 4:00:20 PM8/7/13
to Stian Soiland-Reyes, Peter Ansell, fa...@googlegroups.com
Hi Stian,

I will go with whatever you think best. I don't have concrete goals or requirements at this stage. I'm just exploring JSON-LD for other areas right now.

I think it would be useful to have a JSON model that is relatively "developer friendly" (and aligned as much as possible with GFF3) which may require some context-tweaking. But then that may obscure the connection to FALDO. I don't yet have a strong enough sense of JSON-LD in the wild to have a strong opinion here yet. I would be curious to hear what some of those developing applications (e.g. Rob Buels) have to say.

Of course, JBrowse uses a highly compact JSON internal format which I don't think could or should be contextified, but there may be room for another transport-layer JSON for feature exchange.



On Tue, Aug 6, 2013 at 1:50 AM, Stian Soiland-Reyes <soilan...@cs.manchester.ac.uk> wrote:
Yes, considering that FALDO is a lightweight ontology with 5-6
properties and ~14 classes, making a JSON-LD context for it should not
be particularly tricky.

An OWL -> JSON-LD Context, which I and Peter has been discussing to
make, would be a good stepping stone to make that, but considering
your goal you would still need to tweak the context to make it even
more JSON-like - for instance if you want to do { "positionType":
"InRange" } rather than { "@type": "faldo:InRangePosition" }
--
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
http://soiland-reyes.com/stian/work/ http://orcid.org/0000-0001-9842-9718

Jerven Bolleman

unread,
Oct 22, 2013, 12:25:52 PM10/22/13
to fa...@googlegroups.com
I finally had a look at what JSON-LD looks like


uniprot:Q6Q250 rdf:type up:Protein ;
   up:annotation uniprot:SHAE50--1B , uniprot:SHAE50--1C ;
   up:sequence isoform:P05064-1 .
uniprot:SHAE50--1B a up:Signal_Peptide_Annotation ;
  faldo:location region:22859195476160557tf1tt15 .
uniprot:SHAE50--1C a up:Active_Site_Annotation ;
  faldo:location position:22859195476160557tf153tt153 .
region:22859195476160557tf1tt15 a faldo:Region ;
   faldo:begin position:before1 ;
   faldo:end  position:15 .
position:before1 a faldo:InRangePosition ;
   faldo:reference isoform:P05064-1 ;
   faldo:end position:1 . 
position:1 a faldo:ExactPosition ;
   faldo:reference isoform:P05064-1 ;
   faldo:position 1 .
position:15 a faldo:ExactPosition ;
   faldo:reference isoform:P05064-1 ;
   faldo:position 15 .   
position:153 a faldo:ExactPosition ;
   faldo:reference isoform:P05064-1 ;
   faldo:position 153 .
isoform:P05064-1 up:fragment "single" ;
   up:precursor true .

turns into 

{ "@graph": [ { "@id": "http://purl.uniprot.org/uniprot/region/22859195476160557tf1tt15", "@type": "http://biohackathon.org/resource/faldo#Region", "http://biohackathon.org/resource/faldo#begin": { "@id": "http://purl.uniprot.org/uniprot/position/before1" }, "http://biohackathon.org/resource/faldo#end": { "@id": "http://purl.uniprot.org/uniprot/position/15" } }, { "@id": "http://purl.uniprot.org/uniprot/position/1", "@type": "http://biohackathon.org/resource/faldo#ExactPosition", "http://biohackathon.org/resource/faldo#position": { "@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": "1" }, "http://biohackathon.org/resource/faldo#reference": { "@id": "http://purl.uniprot.org/isoform/P05064-1" } }, { "@id": "http://purl.uniprot.org/uniprot/position/153", "@type": "http://biohackathon.org/resource/faldo#ExactPosition", "http://biohackathon.org/resource/faldo#position": { "@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": "153" }, "http://biohackathon.org/resource/faldo#reference": { "@id": "http://purl.uniprot.org/isoform/P05064-1" } }, { "@id": "http://purl.uniprot.org/uniprot/Q6Q250", "@type": "http://purl.uniprot.org/core/Protein", "http://purl.uniprot.org/core/annotation": [ { "@id": "http://purl.uniprot.org/uniprot/SHAE50--1C" }, { "@id": "http://purl.uniprot.org/uniprot/SHAE50--1B" } ], "http://purl.uniprot.org/core/sequence": { "@id": "http://purl.uniprot.org/isoform/P05064-1" } }, { "@id": "http://purl.uniprot.org/uniprot/position/before1", "@type": "http://biohackathon.org/resource/faldo#InRangePosition", "http://biohackathon.org/resource/faldo#end": { "@id": "http://purl.uniprot.org/uniprot/position/1" }, "http://biohackathon.org/resource/faldo#reference": { "@id": "http://purl.uniprot.org/isoform/P05064-1" } }, { "@id": "http://purl.uniprot.org/uniprot/SHAE50--1C", "@type": "http://purl.uniprot.org/core/Active_Site_Annotation", "http://biohackathon.org/resource/faldo#location": { "@id": "http://purl.uniprot.org/uniprot/position/22859195476160557tf153tt153" } }, { "@id": "http://purl.uniprot.org/uniprot/SHAE50--1B", "@type": "http://purl.uniprot.org/core/Signal_Peptide_Annotation", "http://biohackathon.org/resource/faldo#location": { "@id": "http://purl.uniprot.org/uniprot/region/22859195476160557tf1tt15" } }, { "@id": "http://purl.uniprot.org/uniprot/position/15", "@type": "http://biohackathon.org/resource/faldo#ExactPosition", "http://biohackathon.org/resource/faldo#position": { "@type": "http://www.w3.org/2001/XMLSchema#integer", "@value": "15" }, "http://biohackathon.org/resource/faldo#reference": { "@id": "http://purl.uniprot.org/isoform/P05064-1" } }, { "@id": "http://purl.uniprot.org/isoform/P05064-1", "http://purl.uniprot.org/core/fragment": "single", "http://purl.uniprot.org/core/precursor": { "@type": "http://www.w3.org/2001/XMLSchema#boolean", "@value": "true" } } ] } 


Don't know if that can be made to look nicer, I would hope so!

Regards,
Jerven 

Michel Dumontier

unread,
Oct 22, 2013, 12:52:23 PM10/22/13
to Jerven Bolleman, fa...@googlegroups.com
not sure about assigning position values as uri's...

m.


--
You received this message because you are subscribed to the Google Groups "FALDO" group.
To unsubscribe from this group and stop receiving emails from it, send an email to faldo+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Michel Dumontier
Associate Professor of Medicine (Biomedical Informatics), Stanford University
Chair, W3C Semantic Web for Health Care and the Life Sciences Interest Group

Jerven Bolleman

unread,
Oct 22, 2013, 1:47:18 PM10/22/13
to Michel Dumontier, fa...@googlegroups.com

On Oct 22, 2013, at 6:52 PM, Michel Dumontier <michel.d...@gmail.com> wrote:

> not sure about assigning position values as uri's…
Could you elaborate?
>
> m.
Regards,
Jerven

Michel Dumontier

unread,
Oct 22, 2013, 1:58:25 PM10/22/13
to Jerven Bolleman, faldo

Jerven Bolleman

unread,
Oct 22, 2013, 3:53:02 PM10/22/13
to Michel Dumontier, faldo
I see, there should be a context block that introduces shortcut and abbreviations.
Will try plying with that tomorrow

Regards,
Jerven
Reply all
Reply to author
Forward
0 new messages