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

How to query SpOdgi to get external Ensembl annotations #8

Open
JervenBolleman opened this issue Nov 22, 2019 · 0 comments
Open

How to query SpOdgi to get external Ensembl annotations #8

JervenBolleman opened this issue Nov 22, 2019 · 0 comments

Comments

@JervenBolleman
Copy link
Collaborator

JervenBolleman commented Nov 22, 2019

First we modify the example from Ensembl.

PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> 
PREFIX skos:<http://www.w3.org/2004/02/skos/core#> 
PREFIX owl:<http://www.w3.org/2002/07/owl#> 
PREFIX dc:<http://purl.org/dc/terms/> 
PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> 
PREFIX faldo:<http://biohackathon.org/resource/faldo#> 
PREFIX ensembltranscript:<http://rdf.ebi.ac.uk/resource/ensembl.transcript/> 
PREFIX sio:<http://semanticscience.org/resource/> 
PREFIX dcterms:<http://purl.org/dc/terms/>
PREFIX foaf:<http://xmlns.com/foaf/0.1/>
PREFIX obo:<http://purl.obolibrary.org/obo/>
PREFIX vg:<http://biohackathon.org/resource/vg#>

SELECT *

WHERE {
  ?target a vg:Step ;
    vg:node|vg:reverseNode ?node ;
    faldo:location ?stepLinearLocation .
  ?stepLinearLocation faldo:begin ?bp ;
    faldo:end ?ep .
  ?bp faldo:position ?stepBegin .
  ?ep faldo:position ?stepEnd  .
  BIND(<http://rdf.ebi.ac.uk/resource/ensembl/97/saccharomyces_cerevisiae/R64-1-1/VIII> AS ?ref) .
  SERVICE<https://www.ebi.ac.uk/rdf/services/sparql/>{
    SELECT DISTINCT ?transcript ?ref ?begin ?end {
      ?transcript a <http://rdf.ebi.ac.uk/terms/ensembl/protein_coding> .
      ?transcript faldo:location ?location .
      ?location faldo:begin
        [a faldo:ExactPosition ;
        faldo:position ?begin] .
      ?location faldo:end
        [a faldo:ExactPosition ;
        faldo:position ?end] .
        ?location faldo:reference ?ref .
      FILTER(?begin > ?stepBegin && ?end < ?stepEnd)
    } LIMIT 10
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant