Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Curation Query for Conversions #14

Open
RyAMiller opened this issue May 12, 2020 · 4 comments
Open

Curation Query for Conversions #14

RyAMiller opened this issue May 12, 2020 · 4 comments
Assignees

Comments

@RyAMiller
Copy link

RyAMiller commented May 12, 2020

While doing some work pertaining to WikiPathway sementics, I used the query

      SELECT (substr(str(?o),41) as ?IntType) (COUNT(?o) as ?IntCount)
      WHERE {
        ?entity a ?o . 
        ?entity a wp:Interaction . 
        ?entity dcterms:isPartOf <http://identifiers.org/wikipathways/WP1423_r106690> .
        ?entity dcterms:isPartOf ?pathway .
        ?pathway    a wp:Pathway ;
            wp:ontologyTag <http://vocabularies.wikipathways.org/wp#Curation:AnalysisCollection> ;
            wp:organismName        "Homo sapiens"^^xsd:string .
      } ORDER BY DESC(?IntCount)`

for the pathway. WP1423. It is a pathway about Sphingolipid Metabolism. A majority of the interactions look to be conversions of metabolites from one form to another facilitated by enzyme catalysis. All of conversion events are only classified as DirectedInteractions and do not have the type "conversion."

All catalysis events that convert a metabolite from one form to another would be conversions, correct? It seems like this might help to identify interactions that should by type 'conversion' but not.

@RyAMiller
Copy link
Author

RyAMiller commented May 14, 2020

want a query that creates a table for catalysis interactions of substrate and product

@RyAMiller
Copy link
Author

RyAMiller commented May 25, 2020

I think the following query is more what we had in mind. It returns the Interaction ID used by the WP RDF for the catalysis interaction, the pathway that it belongs to, the enzyme source for the interaction, the interaction that is the target of the enzyme, and the interaction type for that target interaction. Ideally this target interaction would be type wp:Conversion and that is the case some of the time, but also not always the case.

PREFIX gpml:    <http://vocabularies.wikipathways.org/gpml#>
PREFIX wp:      <http://vocabularies.wikipathways.org/wp#>
PREFIX dcterms: <http://purl.org/dc/terms/>

SELECT (substr(str(?entity),37) as ?catInt) ?pathway ?enzyme ?target ?IntType
      WHERE {
        ?entity a ?o . 
        ?entity a wp:Interaction . 
        ?entity a wp:Catalysis .
        ?entity wp:source ?enzyme . 
        ?entity wp:target ?target . 
        ?target a wp:Interaction .
        ?target a ?IntType . 
        ?entity dcterms:isPartOf ?pathway .
        ?pathway    a wp:Pathway .
      } 

@egonw
Copy link
Member

egonw commented May 27, 2020

Okay, here's a variation that find mim-catalysis interactions on what are likely things like membrane transports:

prefix dcterms:  <http://purl.org/dc/terms/>
prefix dc:      <http://purl.org/dc/elements/1.1/>
prefix xsd:     <http://www.w3.org/2001/XMLSchema#>
prefix foaf:    <http://xmlns.com/foaf/0.1/>
prefix wp:      <http://vocabularies.wikipathways.org/wp#>
prefix gpml:  <http://vocabularies.wikipathways.org/gpml#>
prefix tag:     <http://vocabularies.wikipathways.org/wp#Curation:>

SELECT DISTINCT ?homepage ?enzyme ?enzymeLabel ?substrate ?substrateLabel ?product ?productLabel
WHERE {
  ?catalysis a wp:Catalysis ;
    dcterms:isPartOf ?pathway ;
    wp:source ?enzyme ;
    wp:target ?conversion .
  ?conversion a wp:Interaction ;
    wp:source ?substrate ;
    wp:target ?product .
  FILTER ( ?substrate = ?product )
  MINUS { ?conversion a wp:Conversion }
  ?enzyme rdfs:label ?enzymeLabel .
  ?substrate rdfs:label ?substrateLabel .
  ?product rdfs:label ?productLabel .
  ?pathway a wp:Pathway ;
    foaf:page ?homepage .
  MINUS { ?pathway wp:ontologyTag tag:Reactome_Approved . }
}

@egonw
Copy link
Member

egonw commented May 27, 2020

This query would list the interactions that should likely be interaction:

prefix dcterms:  <http://purl.org/dc/terms/>
prefix dc:      <http://purl.org/dc/elements/1.1/>
prefix xsd:     <http://www.w3.org/2001/XMLSchema#>
prefix foaf:    <http://xmlns.com/foaf/0.1/>
prefix wp:      <http://vocabularies.wikipathways.org/wp#>
prefix gpml:  <http://vocabularies.wikipathways.org/gpml#>
prefix tag:     <http://vocabularies.wikipathways.org/wp#Curation:>

SELECT DISTINCT ?homepage ?graphid ?enzyme ?substrate ?product
WHERE {
  ?catalysis a wp:Catalysis ;
    dcterms:isPartOf ?pathway ;
    wp:source ?enzyme ;
    wp:target ?conversion .
  ?conversion a wp:Interaction ;
    wp:isAbout/gpml:graphId ?graphid ;
    wp:source ?substrate ;
    wp:target ?product .
  FILTER ( ?substrate != ?product )
  MINUS { ?conversion a wp:Conversion }
  ?enzyme rdfs:label ?enzymeLabel .
  ?substrate rdfs:label ?substrateLabel .
  ?product rdfs:label ?productLabel .
  ?pathway a wp:Pathway ;
    foaf:page ?homepage .
  MINUS { ?pathway wp:ontologyTag tag:Reactome_Approved . }
} ORDER BY ?homepage ?graphid```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants