Skip to content

Instantly share code, notes, and snippets.

@kozo2
Last active March 29, 2016 22:39
Show Gist options
  • Select an option

  • Save kozo2/f4adc3a2b1d1f436a09d to your computer and use it in GitHub Desktop.

Select an option

Save kozo2/f4adc3a2b1d1f436a09d to your computer and use it in GitHub Desktop.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sbmlrdf: <http://identifiers.org/biomodels.vocabulary#>

SELECT ?speciesid ?name ?ia WHERE {
 <http://identifiers.org/biomodels.db/BIOMD0000000005> sbmlrdf:species ?speciesid . 
 ?speciesid sbmlrdf:name ?name .
 ?speciesid sbmlrdf:initialAmount ?ia}
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sbmlrdf: <http://identifiers.org/biomodels.vocabulary#>

SELECT ?sp ?n WHERE {
 <http://identifiers.org/biomodels.db/BIOMD0000000458> sbmlrdf:reaction ?rid . 
  ?rid sbmlrdf:reactant ?r .
  ?r sbmlrdf:species ?sp .
  ?sp sbmlrdf:name ?n
}

get reaction table

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX sbmlrdf: <http://identifiers.org/biomodels.vocabulary#>

SELECT ?reactionid ?reacn ?rean ?pron WHERE {
 <http://identifiers.org/biomodels.db/BIOMD0000000458> sbmlrdf:reaction ?reactionid . 
  ?reactionid sbmlrdf:name ?reacn .
  
  ?reactionid sbmlrdf:reactant ?rearef .
  ?rearef sbmlrdf:species ?rea .
  ?rea sbmlrdf:name ?rean .
  
  ?reactionid sbmlrdf:product ?proref .
  ?proref sbmlrdf:species ?pro .
  ?pro sbmlrdf:name ?pron .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment