Knowledge-Graph-Hub / kg-covid-19

An instance of KG Hub to produce a knowledge graph for COVID-19 response.
https://github.com/Knowledge-Graph-Hub/kg-covid-19/wiki
BSD 3-Clause "New" or "Revised" License
78 stars 26 forks source link

Fix the SPARQL queries in queries/sparql #396

Closed vemonet closed 3 years ago

vemonet commented 3 years ago

I fixed the SPARQL queries in queries/sparql: the comments for grlc metadata were not properly defined for most queries (using += instead of #=, which breaks the queries).

I also moved the SPARQL queries from the queries/sparql folder to the queries folder (which was only used for the sparql folder anyway), this allow to access the grlc API interface at this convenient URL to use all queries defined in the folder: http://grlc.io/api-git/Knowledge-Graph-Hub/kg-covid-19/subdir/queries And this prevent from needing to update the grlc yml config file for each new query. I also updated the references to the queries/sparql folder I found in the repository

Thanks for the documentation about this knowledge graph, it makes it a pleasure to reuse!

justaddcoffee commented 3 years ago

@vemonet thanks very much for the bugfix/improvement - this looks good

justaddcoffee commented 3 years ago

@vemonet - it doesn't look like this is working properly: http://grlc.io/api-git/Knowledge-Graph-Hub/kg-covid-19/subdir/queries

Could not parse query query-02-sars-cov-2-prot: ‘str’ object does not support item assignment

Although this is probably something I'm doing wrong here - any advice?

vemonet commented 3 years ago

@justaddcoffee It is an issue with the grlc metadata in those files

grlc metadata is basically a YAML format prefixed with #+ to make it a comment in the query file

This one is good

#+ summary: Get counts for biolink categories
#+ description: Get counts for biolink categories
#+ endpoint: http://kg-hub-rdf.berkeleybop.io/blazegraph/sparql

This one is missing the : and uses title instead of summary (not sure if title works)

#+ title Get SARS-CoV-2 proteins
#+ description Get info about SARS-CoV-2 proteins in the graph
#+ endpoint http://kg-hub-rdf.berkeleybop.io/blazegraph/sparql

I just fixed them and will do a pull request

justaddcoffee commented 3 years ago

Thanks very much @vemonet!