2 years ago

#34817

test-img

gaspanic

Node stoichiometry in LPG and RDF graphs

I have some background in RDF, but am currently working on building a Labeled Property Graph (LPG) in Gremlin. I have a doubt regarding redundant links in LPGs.

Say I want to represent the fact that Bag1 contains a blue bead and a red bead. In RDF I could do:

:Bag1 :contains :Blue_bead .
:Bag1 :contains :Red_bead .

This becomes a problem if I want to represent that Bag2 contains two blue beads, since that would simply repeat the exact same triple twice:

:Bag2 :contains :Blue_bead .
:Bag2 :contains :Blue_bead .

One way I've seen this solved (in the Biopax ontology) for RDF is to represent the stoichiometry like so (0 blue; 3 red):

:Bag3 :component :Blue_bead .
      :componentStoichiometry :Stoichiometry1 .
:Stoichiometry1 :stoichiometricCoefficient "0" ;
                :physicalEntity :Blue_bead .
:Bag3 :component :Red_bead .
      :componentStoichiometry :Stoichiometry2 .
:Stoichiometry2 :stoichiometricCoefficient "3" ;
                :physicalEntity :Red_bead .

Or specifically for Complex/PhysicalEntity in Biopax rather than Bag/bead: BioPax complex stoichiometry

Question In the case of LPGs, would I need to use a similar representation for stoichiometry, or is there a more straightforward way? Since all edges are uniquely labeled, can I represent a bag containing 3 blue beads by simply linking the bag node to the blue bead with three edges? Or will that not suit the purpose?

sparql

rdf

gremlin

tinkerpop

0 Answers

Your Answer

Accepted video resources