-
Notifications
You must be signed in to change notification settings - Fork 0
/
count-software-inputs-with-mdc-registered-format.rq
39 lines (32 loc) · 2.03 KB
/
count-software-inputs-with-mdc-registered-format.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
prefix obo: <http://purl.obolibrary.org/obo/>
prefix dc: <http://purl.org/dc/elements/1.1/>
#select ?dataset ?softwareInputFormat ?x1 ?softwarePrefTerm
##select distinct ?dataset
select ( count( distinct ?parsingPlan ) as ?countOfSoftwareInputsWithMdcFormat )
from <http://www.pitt.edu/obc/ide/apollo-sv>
from <http://www.pitt.edu/obc/ide/classes-and-indexing-instances>
from <http://www.pitt.edu/obc/ide/article-instances>
from <http://www.pitt.edu/obc/ide/article-deleted-instances>
from <http://ide.obc.io/auth>
from <http://www.pitt.edu/obc/mdc/content>
where {
#The software has an input spec of ?x
#And we want this software to have the dataset spec as its inputSpec
?x1 rdf:type ?y1 .
?y1 rdfs:subClassOf* obo:IAO_0000010 . #?x1 is some instance of software
?x1 obo:IAO_0000111 ?softwarePrefTerm . #?x1 has a preferred term
?v1 rdf:type obo:APOLLO_SV_00000525 . #v1 is executable form x1
?u1 rdf:type obo:APOLLO_SV_00000524 . #u1 is compiling of x1 to v1
?u1 obo:OBI_0000293 ?x1 . #compiling has source code as input
?u1 obo:OBI_0000299 ?v1 . #compiling has executable as output
?parsingPlan obo:BFO_0000050 ?v1 . #data parsing plan spec part of executable
?dataParsing obo:OBI_0000417 ?parsingPlan . #parsing achieves parsing plan objective
?dataParsing obo:OBI_0000417 ?formatSpec . #parsing achieves spec objective, this is spec of dataset
?dataParsing rdf:type obo:APOLLO_SV_00000566 . #parsing individual is instance of parsing
?formatSpec rdf:type/rdfs:subClassOf* obo:IAO_0000098 . #format spec is an instance of data format specification
?parsingPlan rdf:type/rdfs:subClassOf* obo:IAO_0000104 . #parsing plan is an instance of plan specification
#?formatSpec rdfs:label ?datasetFormatAndSoftwareInputFormat . #and the input spec has a label hopefully
#and the dataset and the input format must both be in the MDC (for now)
<http://www.pitt.edu/obc/IDE_ARTICLES_12000070095> obo:BFO_0000174 ?x1 .
<http://www.pitt.edu/obc/IDE_ARTICLES_12000070095> obo:BFO_0000174 ?formatSpec .
}