-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFindUndocumentedReuse
47 lines (27 loc) · 989 Bytes
/
FindUndocumentedReuse
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
PREFIX sbol: <http://sbols.org/v2#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX prov: <http://www.w3.org/ns/prov#>
SELECT DISTINCT ?cd1 ?wdf1 ?sa ?annoname ?cd2 ?wdf2 ?na2 WHERE {
?cd1 a sbol:ComponentDefinition .
?cd1 prov:wasDerivedFrom ?wdf1 .
?cd1 sbol:sequenceAnnotation ?sa .
?sa sbol:location ?loc .
?sa sbol:role ?role .
?loc sbol:start ?start .
?loc sbol:end ?end .
?cd1 sbol:sequence ?seq .
?seq sbol:elements ?na .
bind (strlen(?na) as ?seqlen)
filter(xsd:integer(?end) <= ?seqlen)
filter(xsd:integer(?end) > xsd:integer(?start))
BIND (xsd:integer(?end) - xsd:integer(?start) + 1 AS ?len)
filter(?len > 10)
BIND (SUBSTR(?na, xsd:integer(?start), ?len) AS ?nasub)
?seq2 a sbol:Sequence .
?seq2 sbol:elements ?na2 .
FILTER(?na2 = ?nasub)
?cd2 sbol:sequence ?seq2 .
?cd2 prov:wasDerivedFrom ?wdf2 .
FILTER(?cd2 != ?cd1)
OPTIONAL { ?sa dcterms:title ?annoname . }
}