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

Questions/Problems with "type/Type" #15

Open
1 of 2 tasks
ariutta opened this issue Feb 7, 2017 · 3 comments
Open
1 of 2 tasks

Questions/Problems with "type/Type" #15

ariutta opened this issue Feb 7, 2017 · 3 comments

Comments

@ariutta
Copy link
Member

ariutta commented Feb 7, 2017

Two questions/problems:

Based on GPML2013a, Type is a property for elements like DataNode, with expected values like GeneProduct:

  <DataNode TextLabel="BDKRB2" GraphId="f54f5" Type="GeneProduct">
    <Attribute Key="org.pathvisio.model.BackpageHead" Value="BDKRB2 | bradykinin receptor B2"/>
    <Graphics CenterX="759.3333333333333" CenterY="388.0" Width="60.0" Height="20.0" ZOrder="32768" FontSize="10" Valign="Middle"/>
    <Xref Database="Entrez Gene" ID="624"/>
  </DataNode>

Based on rdf:type, the type above would be gpml:DataNode, not wp:GeneProduct. But when I query our sparql endpoint, it appears the type can be wp:DataNode or wp:GeneProduct but not gpml:DataNode.

Query for rdf:type wp:DataNode succeeds:

PREFIX gpml:    <http://vocabularies.wikipathways.org/gpml#>
PREFIX wp:      <http://vocabularies.wikipathways.org/wp#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc:      <http://purl.org/dc/elements/1.1/>
PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

select (count(distinct ?dataNode) as ?count) (str(?label) as ?species) where {
  ?dataNode a wp:DataNode ;
    dcterms:isPartOf ?pw .
  ?pw dc:title ?title ;
    wp:organism ?organism ;
    wp:organismName ?label .
} GROUP BY ?label ORDER BY DESC(?count)

Query for rdf:type wp:GeneProduct succeeds

PREFIX gpml:    <http://vocabularies.wikipathways.org/gpml#>
PREFIX wp:      <http://vocabularies.wikipathways.org/wp#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc:      <http://purl.org/dc/elements/1.1/>
PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

select (count(distinct ?geneProduct) as ?count) (str(?label) as ?species) where {
  ?geneProduct a wp:GeneProduct ;
    dcterms:isPartOf ?pw .
  ?pw dc:title ?title ;
    wp:organism ?organism ;
    wp:organismName ?label .
} GROUP BY ?label ORDER BY DESC(?count)

Query for rdf:type gpml:DataNode fails:

PREFIX gpml:    <http://vocabularies.wikipathways.org/gpml#>
PREFIX wp:      <http://vocabularies.wikipathways.org/wp#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc:      <http://purl.org/dc/elements/1.1/>
PREFIX rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

select (count(distinct ?dataNode) as ?count) (str(?label) as ?species) where {
  ?dataNode a gpml:DataNode ;
    dcterms:isPartOf ?pw .
  ?pw dc:title ?title ;
    wp:organism ?organism ;
    wp:organismName ?label .
} GROUP BY ?label ORDER BY DESC(?count)
@AlexanderPico
Copy link
Member

Fixed the links to go to WpRdf and WpTypes.

In terms of usage, for RDF queries on WP content, you should use the wp vocab. The queries look consistent to me if you stay within the wp vocab, i.e., wp:GeneProduct is a subclass of wp:DataNode, not gpml:DataNode. The inconsistent part seems to simply be the unnecessary prefix for gpml vocab, since it isn't used.

AlexanderPico added a commit that referenced this issue Feb 7, 2017
@ariutta
Copy link
Member Author

ariutta commented Feb 7, 2017

For this DataNode:

  <DataNode TextLabel="BDKRB2" GraphId="f54f5" Type="GeneProduct">
    <Attribute Key="org.pathvisio.model.BackpageHead" Value="BDKRB2 | bradykinin receptor B2"/>
    <Graphics CenterX="759.3333333333333" CenterY="388.0" Width="60.0" Height="20.0" ZOrder="32768" FontSize="10" Valign="Middle"/>
    <Xref Database="Entrez Gene" ID="624"/>
  </DataNode>

I think these are the applicable types from the WP vocab:

  • rdf:type is BOTH wp:DataNode and wp:GeneProduct
  • gpml:type is ONLY wp:GeneProduct

@ariutta
Copy link
Member Author

ariutta commented Feb 8, 2017

For wpTypes, it appears to not be used at present. Does that sound correct, @RyAMiller?

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