EBISPOT / DUO

Ontology for consent codes and data use requirements
Other
64 stars 15 forks source link

Fix CSV export - terms with no shorthand are not exported #48

Closed mcourtot closed 4 years ago

mcourtot commented 4 years ago

The sparql query at https://github.com/EBISPOT/DUO/blob/master/src/ontology/make-csv.sparql

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
SELECT ?id ?shorthand ?label ?description 
WHERE {
   ?term rdfs:label ?label ;
      <http://purl.obolibrary.org/obo/IAO_0000115> ?description ; 
      <http://www.geneontology.org/formats/oboInOwl#id> ?id;
      <http://www.geneontology.org/formats/oboInOwl#shorthand> ?shorthand
}

should instead be

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
SELECT ?id ?shorthand ?label ?description 
WHERE {
   ?term rdfs:label ?label ;
      <http://purl.obolibrary.org/obo/IAO_0000115> ?description ; 
      <http://www.geneontology.org/formats/oboInOwl#id> ?id;
      OPTIONAL { <http://www.geneontology.org/formats/oboInOwl#shorthand> ?shorthand}
}