openphacts / GLOBAL

Global project issues [private for now. owner lee harland]
3 stars 0 forks source link

/pathways/byTarget & /pathways/interactions/byEntity API commands fail in 2.2 #385

Closed jakhag closed 7 years ago

jakhag commented 7 years ago

Pathway by target API command gives a 404 error in 2.2 (alpha): http://alpha.openphacts.org:3002/pathways/byTarget?uri=http%3A%2F%2Fidentifiers.org%2Fncbigene%2F282478&app_id=f91c5b2b&app_key=18a5d823d0e4933ac5fe22a3d52974c1 Maybe a mapping issue?

In 2.1 it works (beta): https://beta.openphacts.org/2.1/pathways/byTarget?uri=http%3A%2F%2Fidentifiers.org%2Fncbigene%2F282478&app_id=f91c5b2b&app_key=18a5d823d0e4933ac5fe22a3d52974c1

Pathway interactions gives a 500 error in 2.2 (alpha): http://alpha.openphacts.org:3002/pathways/interactions/byEntity?uri=http%3A%2F%2Fidentifiers.org%2Fensembl%2FENSBTAG00000004037&app_id=f91c5b2b&app_key=18a5d823d0e4933ac5fe22a3d52974c1

For 2.1 (beta): https://beta.openphacts.org/2.1/pathways/interactions/byEntity?uri=http%3A%2F%2Fidentifiers.org%2Fensembl%2FENSBTAG00000004037&app_id=f91c5b2b&app_key=18a5d823d0e4933ac5fe22a3d52974c1

randykerber commented 7 years ago

The first command above: /pathways/byTarget?uri=http%3A%2F%2Fidentifiers.org%2Fncbigene%2F282478 Produces a #no_mappings_found URI in the SPARQL query. So presumably the IMS mapping call produced no mappings.

Full SPARQL query (see 4th line from end):

PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
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 dc: <http://purl.org/dc/elements/1.1/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
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#>
SELECT DISTINCT ?item  WHERE {  VALUES ?pw_target_uri { <http://identifiers.org/ncbigene/282478> <http://info.identifiers.org/entrez.gene/id/282478> <http://identifiers.org/entrez.gene/282478> <http://info.identifiers.org/ncbigene/282478> <http://www.ncbi.nlm.nih.gov/gene/282478> <http://bio2rdf.org/geneid:282478> <http://purl.uniprot.org/geneid/282478>  } GRAPH <http://www.wikipathways.org> {
 ?gene_product dc:identifier|wp:bdbUniprot ?pw_target_uri ;
 dcterms:isPartOf ?item .
 ?item a wp:Pathway ;
 dc:title ?title ;
 wp:organism ?organism_uri ;
 wp:organismName ?organism ;
 foaf:page ?page ;
 dc:identifier ?identifier .
 VALUES ?type { wp:GeneProduct wp:Protein }
 ?gene_product a ?type
 OPTIONAL { ?item dcterms:description ?description }
 OPTIONAL { ?item wp:pathwayOntology ?ontology }
}
OPTIONAL {   VALUES ?cw_target_uri { <http://www.openphacts.org/api#no_mappings_found> } GRAPH <http://www.conceptwiki.org> {
 ?cw_target_uri skos:prefLabel ?prefLabel .
} }  } ORDER BY ?item  LIMIT 10 OFFSET 0
Chris-Evelo commented 7 years ago

That is supposed to be the Entrez Gene gene with ID 82478 or maybe 282478 (not sure how to read the query), right? According to Entrez gene the first does not exist and the second is a Bos Taurus gene, so it makes sense it has no human IMS mappings.] in both cases

Maybe try 348 (human APOE) that will likely have both mappings and hits.

 Chris

From: Randy Kerber notifications@github.com Reply-To: openphacts/GLOBAL reply@reply.github.com Date: Thursday, 15 June 2017 at 23:26 To: openphacts/GLOBAL GLOBAL@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [openphacts/GLOBAL] /pathways/byTarget & /pathways/interactions/byEntity API commands fail in 2.2 (#385)

The first command above: /pathways/byTarget?uri=http%3A%2F%2Fidentifiers.org%2Fncbigene%2F282478 Produces a #no_mappings_found URI in the SPARQL query. So presumably the IMS mapping call produced no mappings.

Full SPARQL query (see 4th line from end):

PREFIX dc: http://purl.org/dc/elements/1.1/

PREFIX wp: http://vocabularies.wikipathways.org/wp#

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 dc: http://purl.org/dc/elements/1.1/

PREFIX wp: http://vocabularies.wikipathways.org/wp#

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#

SELECT DISTINCT ?item WHERE { VALUES ?pw_target_uri { http://identifiers.org/ncbigene/282478 http://info.identifiers.org/entrez.gene/id/282478 http://identifiers.org/entrez.gene/282478 http://info.identifiers.org/ncbigene/282478 http://www.ncbi.nlm.nih.gov/gene/282478 http://bio2rdf.org/geneid:282478 http://purl.uniprot.org/geneid/282478 } GRAPH http://www.wikipathways.org {

?gene_product dc:identifier|wp:bdbUniprot ?pw_target_uri ;

dcterms:isPartOf ?item .

?item a wp:Pathway ;

dc:title ?title ;

wp:organism ?organism_uri ;

wp:organismName ?organism ;

foaf:page ?page ;

dc:identifier ?identifier .

VALUES ?type { wp:GeneProduct wp:Protein }

?gene_product a ?type

OPTIONAL { ?item dcterms:description ?description }

OPTIONAL { ?item wp:pathwayOntology ?ontology }

}

OPTIONAL { VALUES ?cw_target_uri { http://www.openphacts.org/api#no_mappings_found } GRAPH http://www.conceptwiki.org {

?cw_target_uri skos:prefLabel ?prefLabel .

} } } ORDER BY ?item LIMIT 10 OFFSET 0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/openphacts/GLOBAL/issues/385#issuecomment-308870427, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABLHsyN84ceiOoGYMqA0Ooqh1AwH3bLmks5sEaGDgaJpZM4NuKLd.

danidi commented 7 years ago

Yes, it's 282478. Good catch with the non-human protein. These are the default queries given by the API, so probably changing the default to a human protein would be better.

As the mapping to CW is optional, the problem is quite likely the missing Uniprot mapping (which we have in 2.1 from a different source). There are several options as far as I see:

randykerber commented 7 years ago

The second query (Pathways interactions) seems to now be working on alpha.

randykerber commented 7 years ago

Not sure what, if anything, to do about the first query.

egonw commented 7 years ago

@randykerber, Chris gave the answer to why the first query fails... that's also a cow gene... use NCBI gene 291 instead, for human:

http://alpha.openphacts.org:3002/pathways/byTarget?uri=http%3A%2F%2Fidentifiers.org%2Fncbigene%2F291&app_id=f91c5b2b&app_key=18a5d823d0e4933ac5fe22a3d52974c1

randykerber commented 7 years ago

Changed first query to use "ncbigene/291", now works. So closing Issue.

jakhag commented 7 years ago

Tested the pathway by target API call again with "ncbigene/291". No error occurred.

http://alpha.openphacts.org:3002/pathways/byTarget?uri=http%3A%2F%2Fidentifiers.org%2Fncbigene%2F291&app_id=f91c5b2b&app_key=18a5d823d0e4933ac5fe22a3d52974c1