Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Vocabulary
Resource = a record of a "thing"

...

in

...

eagle-i.

...

A

...

resource

...

is

...

an

...

instance

...

of

...

a

...

class

...

defined

...

in

...

the

...

eagle-i

...

ontology

...

(e.g.

...

"My

...

nifty

...

DNA

...

Microarray"

...

is

...

an

...

instance

...

of

...

the

...

class

...

"DNA

...

MicroArray",

...

which

...

is

...

a

...

subclass

...

of

...

"Instrument")

Configuration

Code Block
languagenone

\\

*Configuration*

\# General

\# What general type of resources we are dealing with\\

baseType=[http://purl.obolibrary.org/obo/ERO_0000071|http://purl.obolibrary.org/obo/ERO_0000071]\\

\# What organization are the resources "attached" to (all resources in eagle-i need to belong to an organization)\\

virtualOrganization=http://harvard.eagle-i.net/i/xyz\\

\# What properties to show in the overview record

\# Literal properties (i.e. properties whose value is a simple string)\\

lp1=[http://purl.obolibrary.org/obo/ERO_0000480|http://purl.obolibrary.org/obo/ERO_0000480]

\# Object properties (i.e. properties whose value is a link to another resource or ontology term)\\

op1=[http://purl.obolibrary.org/obo/ERO_0001719|http://purl.obolibrary.org/obo/ERO_0001719]

op2=[http://purl.obolibrary.org/obo/ERO_0000078|http://purl.obolibrary.org/obo/ERO_0000078]\\ \\


=========

...

More

...

advanced

...

version

...

with

...

open-ended

...

lists,

...

potentially

...

using

...

yaml

...

(but

...

need

...

to

...

get

...

the

...

syntax right (wink)

Code Block
languagenone

 right \;-)

\# What properties to show in the overview record

\# Literal properties (i.e. properties whose value is a simple string)

literalProperties:

   propertyUri: [   propertyUri: http://purl.obolibrary.org/obo/ERO_0000480|http://purl.obolibrary.org/obo/ERO_0000480]\\

\# Object properties (i.e. properties whose value is a link to another resource or ontology term)

objectProperties: 

  
  propertyUri: [ http://purl.obolibrary.org/obo/ERO_0001719|http://purl.obolibrary.org/obo/ERO_0001719]

  propertyUri: [http://purl.obolibrary.org/obo/ERO_0000078|
  propertyUri: http://purl.obolibrary.org/obo/ERO_0000078]\\

\# What properties to show on the left nav

\# What properties to filter on

\# => TBD with Richard\\ \\

*Queries*

* *

*Query for base, unfiltered dataset:*

Find all instances of {{baseType}} affiliated with {{virtualOrganization}}, returns a table with a column per  query variable defined in property configuration above\\

*Option

Queries

Query for base, unfiltered dataset:
Find all instances of baseType affiliated with virtualOrganization, returns a table with a column per query variable defined in property configuration above

Option 1 one query

Code Block
languagenone

PREFIX ei: <http 1 one query*

PREFIX ei:&nbsp;<[http://purl.obolibrary.org/obo/|http://purl.obolibrary.org/obo/ERO_0000070]>

PREFIX eiapp: <[http<http://eagle-i.org/ont/app/1.0/|http://eagle-i.org/ont/app/1.0/]>

PREFIX rdfs: <[http<http://www.w3.org/2000/01/rdf-schema#|http://www.w3.org/2000/01/rdf-schema]>\\schema#>

SELECT&nbsp; 

?resourceUri

?resourceLabel

?resourceDescription

?lp1Label

?lp1Value

?op1Label

?op1ValueLabel

?op1ValueUri

?op2Label

?op2ValueLabel

?op2ValueUri\\

&nbsp; WHERE {

&nbsp; &nbsp; &nbsp;     ?resourceUri a <${baseType}> .

&nbsp; &nbsp; &nbsp;     ?resourceUri ei:ERO_0000070&nbsp; <${virtualOrganization}> .

&nbsp; &nbsp; &nbsp;?resourceUri&nbsp;     ?resourceUri rdfs:label ?resourceLabel .

&nbsp; &nbsp; &nbsp;     OPTIONAL {&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
          ?resourceUri eiapp:resource_description ?resourceDescription .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <${lp1}> ?lp1Value .&nbsp; <${lp1}>&nbsp; eiapp:preferredLabel ?lp1Label .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <${op1}> ?op1ValueUri . ?op1ValueUri rdfs:label ?op1ValueLabel .&nbsp; <${op1}>&nbsp; eiapp:preferredLabel&nbsp; ?op1Label .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <${op2}> ?op2ValueUri . ?op2ValueUri rdfs:label ?op2ValueLabel .&nbsp; <${op2}>&nbsp; eiapp:preferredLabel&nbsp; ?op2Label .

&nbsp; &nbsp; &nbsp;     }

}\\ \\

*Option 2 split in two queries (one for Ontology labels, one for instances) = > this may be preferable*

*Note that if desired props don't

Option 2 split in two queries (one for Ontology labels, one for instances) = > this may be preferable
Note that if desired props don't have preferred label we'll need to alter query 1

Query 1 => to be executed only once (labels don't change)

Code Block
languagenone

PREFIX eiapp: <http have preferred label we'll need to alter query 1*\\

*Query 1 => to be executed only once (labels don't change)*

*&nbsp;*

PREFIX eiapp: <[http://eagle-i.org/ont/app/1.0/|http://eagle-i.org/ont/app/1.0/]>

SELECT&nbsp;\\ 

?lp1Label

?op1Label

?op2Label\\

&nbsp; WHERE {

&nbsp; &nbsp; &nbsp;     OPTIONAL {&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
          <${lp1}>&nbsp; eiapp:preferredLabel ?lp1Label .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          <${op1}>&nbsp; eiapp:preferredLabel&nbsp; ?op1Label .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          <${op2}>&nbsp; eiapp:preferredLabel&nbsp; ?op2Label .

&nbsp; &nbsp; &nbsp;     }

}\\ \\

*Query 2*

*&nbsp;*


Query 2

Code Block
languagenone

PREFIX ei:&nbsp;<[http <http://purl.obolibrary.org/obo/|http://purl.obolibrary.org/obo/ERO_0000070]>

PREFIX eiapp: <[http://eagle-i.org/ont/app/1.0/|http<http://eagle-i.org/ont/app/1.0/]>

PREFIX rdfs: <[http<http://www.w3.org/2000/01/rdf-schema#|http://www.w3.org/2000/01/rdf-schema]>\\schema#>

SELECT&nbsp;
 
?resourceUri

?resourceLabel

?resourceDescription

?lp1Value

?op1ValueLabel

?op1ValueUri

?op2ValueLabel

?op2ValueUri\\

&nbsp; WHERE {

&nbsp; &nbsp; &nbsp;     ?resourceUri a <${baseType}> .

&nbsp; &nbsp; &nbsp;     ?resourceUri ei:ERO_0000070&nbsp; <${virtualOrganization}> .

&nbsp; &nbsp; &nbsp;?resourceUri&nbsp;     ?resourceUri rdfs:label ?resourceLabel .

&nbsp; &nbsp; &nbsp;     OPTIONAL {&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
          ?resourceUri eiapp:resource_description ?resourceDescription .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <${lp1}> ?lp1Value .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <${op1}> ?op1ValueUri . ?op1ValueUri rdfs:label ?op1ValueLabel .&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
          ?resourceUri <${op2}> ?op2ValueUri . ?op2ValueUri rdfs:label ?op2ValueLabel . 
     }
}

Example with substituted values (option 1)

Code Block
languagenone

PREFIX ei: <http&nbsp;

&nbsp; &nbsp; &nbsp;}

}\\ \\ \\ \\

*Example with substituted values (option 1)*

PREFIX ei:&nbsp;<[http://purl.obolibrary.org/obo/|http://purl.obolibrary.org/obo/ERO_0000070]>

PREFIX eiapp: <[http<http://eagle-i.org/ont/app/1.0/|http://eagle-i.org/ont/app/1.0/]>

PREFIX rdfs: <[http<http://www.w3.org/2000/01/rdf-schema#|http://www.w3.org/2000/01/rdf-schema]>\\schema#>

SELECT&nbsp;
 
?resourceUri

?resourceLabel

?resourceDescription

?lp1Label

?lp1Value

?op1Label

?op1ValueLabel

?op1ValueUri

?op2Label

?op2ValueLabel

?op2ValueUri\\

&nbsp; WHERE {

&nbsp; &nbsp; &nbsp;     ?resourceUri a <[http<http://purl.obolibrary.org/obo/ERO_0000071|http://purl.obolibrary.org/obo/ERO_0000071]>0000071> .

&nbsp; &nbsp; &nbsp;?resourceUri&nbsp;     ?resourceUri rdfs:label ?resourceLabel .

&nbsp; &nbsp; &nbsp;     OPTIONAL {&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
          ?resourceUri eiapp:resource_description ?resourceDescription .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <[http<http://purl.obolibrary.org/obo/ERO_0000480|http://purl.obolibrary.org/obo/ERO_0000480]>0000480> ?lp1Value .&nbsp;<[http <http://purl.obolibrary.org/obo/ERO_0000480|http://purl.obolibrary.org/obo/ERO_0000480]>&nbsp;0000480> eiapp:preferredLabel ?lp1Label .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <[http<http://purl.obolibrary.org/obo/ERO_0001719|http://purl.obolibrary.org/obo/ERO_0001719]>0001719> ?op1ValueUri . ?op1ValueUri rdfs:label ?op1ValueLabel .&nbsp;<[http <http://purl.obolibrary.org/obo/ERO_0001719|http://purl.obolibrary.org/obo/ERO_0001719]>&nbsp;0001719> eiapp:preferredLabel&nbsp; ?op1Label .

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;          ?resourceUri <[http<http://purl.obolibrary.org/obo/ERO_0000078|http://purl.obolibrary.org/obo/ERO_0000078]>0000078> ?op2ValueUri . ?op2ValueUri rdfs:label ?op2ValueLabel .&nbsp;<[http <http://purl.obolibrary.org/obo/ERO_0000078|http://purl.obolibrary.org/obo/ERO_0000078]>&nbsp;0000078> eiapp:preferredLabel&nbsp; ?op2Label .

&nbsp; &nbsp; &nbsp;     }
}
}