candYgene / queries

SPARQL queries for Web API
Apache License 2.0
0 stars 0 forks source link

Query1: List all QTLS in an article not working. #2

Closed gurnoor1990 closed 6 years ago

gurnoor1990 commented 6 years ago
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX so: <http://purl.obolibrary.org/obo/so#>

SELECT
   ?qtl_uri
   ?qtl_id
   ?pmc_id 
WHERE {
   GRAPH <http://europepmc.org/articles> {
      ?qtl_uri a obo:SO_0000771 ;
          dcterms:identifier ?qtl_id;
          dcterms:isReferencedBy ?pmc_id.          

      BIND(uri(concat("http://identifiers.org/pmc/", ?_pmc_id )) AS ?user_pmc_id)      

      BIND(bif:strcontains(?pmc_id,?user_pmc_id ) AS ?match)
      FILTER(?match = 1)
   }
}

# EXAMPLE: ?pmc_id = PMC4266912
gurnoor1990 commented 6 years ago

Dear @c-martinez .

The query is parsing and however while executing it on grlc, it give this error.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request.  Either the server is overloaded or there is an error in the application.</p>
gurnoor1990 commented 6 years ago

Solved!

c-martinez commented 6 years ago

Hi @gurnoor1990 -- what was the issue? It wrong sparql endpoint?