-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetFeaturesInInterval.rq
53 lines (51 loc) · 1.55 KB
/
getFeaturesInInterval.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#+ summary: Get genomic features given an interval.
#+ tags:
#+ - Get genomic features given an interval
#+ enumerate:
#+ - graph:
#+ - http://solgenomics.net/genome/Solanum_lycopersicum
#+ - http://solgenomics.net/genome/Solanum_pennellii
#+ - http://solgenomics.net/genome/Solanum_tuberosum
#+ defaults:
#+ - chrom: "chromosome 10"
#+ - begin: "58895882"
#+ - end: "59082990"
#+ - feature: "'protein_coding_gene'"
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX faldo: <http://biohackathon.org/resource/faldo#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX bif: <bif:>
SELECT
*
WHERE {
GRAPH ?_graph_iri {
SELECT
?feature_id
?feature_name
(?_chrom_xsd_string AS ?chrom)
?begin_pos
?end_pos
WHERE {
GRAPH <http://purl.obolibrary.org/obo/so.owl> {
?feature_type a owl:Class ;
rdfs:label ?feature_name .
?feature_name bif:contains ?_feature_xsd_string .
}
?feature a ?feature_type ;
dcterms:identifier ?feature_id ;
faldo:location ?loc .
?loc faldo:begin ?begin ;
faldo:end ?end .
?begin faldo:position ?begin_pos ;
faldo:reference/rdfs:label ?_chrom_xsd_string .
?end faldo:position ?end_pos ;
faldo:reference/rdfs:label ?_chrom_xsd_string .
}
}
FILTER(?begin_pos >= ?_begin_xsd_integer &&
?end_pos <= ?_end_xsd_integer)
}