# Find features containing locus_tag qualifier in DDBJ entry "AP011615.1"
# Note the SPARQL endpoint for DDBJ is https://rdfportal.org/ddbj/sparql .
PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>
PREFIX obo:<http://purl.obolibrary.org/obo/>
PREFIX insdc:<http://ddbj.nig.ac.jp/ontologies/nucleotide/>
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
select
?locus_tag ?feature_type ?product ?gene_symbol
IF(?fstart < ?fend , ?fstart, ?fend) as ?start
IF(?fstart < ?fend , ?fend, ?fstart) as ?end
IF( ?faldo_type = faldo:ForwardStrandPosition,"+", IF( ?faldo_type = faldo:ReverseStrandPosition,"-",".")) as ?strand
where
{
values ?entry {<http://identifiers.org/insdc/AP011615.1>}.
values ?faldo_type { faldo:ForwardStrandPosition faldo:ReverseStrandPosition }
?entry insdc:sequence ?sequence .
?feature obo:BFO_0000050 ?sequence .
?sequence rdfs:subClassOf obo:SO_0000001 .
?feature rdf:type ?type .
?type rdfs:label ?feature_type .
?feature insdc:locus_tag ?locus_tag.
?feature insdc:product ?product .
OPTIONAL { ?feature insdc:gene ?gene_symbol .}
?feature faldo:location ?faldo .
?faldo faldo:begin/rdf:type ?faldo_type .
?faldo faldo:begin/faldo:position ?fstart .
?faldo faldo:end/faldo:position ?fend .
?feature obo:BFO_0000051 ?parent .
}
ORDER BY ?locus_tag