Skip to content

Commit 0d4553e

Browse files
committed
2 parents 946fe16 + 0f85047 commit 0d4553e

File tree

4 files changed

+30
-27
lines changed

4 files changed

+30
-27
lines changed

queries/HippocampusVolumeAgeGender.sparql

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ prefix ants: <http://stnava.github.io/ANTs/>
1212
prefix dct: <http://purl.org/dc/terms/>
1313
prefix dctypes: <http://purl.org/dc/dcmitype/>
1414
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
15-
1615
PREFIX ncicb: <http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#>
1716
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
18-
select distinct ?ID ?Age ?Gender ?tool ?softwareLabel ?federatedLabel ?laterality ?volume
17+
PREFIX ilx: <http://uri.interlex.org/> .
18+
19+
20+
select distinct ?ID ?Gender ?Age ?tool ?softwareLabel ?federatedLabel ?laterality ?volume
1921
where {
2022
?tool_act a prov:Activity ;
2123
prov:qualifiedAssociation [prov:agent [nidm:NIDM_0000164 ?tool]] .
@@ -29,22 +31,23 @@ where {
2931
nidm:datumType <http://uri.interlex.org/base/ilx_0738276> .
3032
OPTIONAL {?measure nidm:isAbout ?federatedLabel }.
3133
OPTIONAL {?measure nidm:hasLaterality ?laterality }.
32-
?as_activity prov:qualifiedAssociation [prov:agent ?agent] ;
33-
dct:isPartOf/dct:isPartOf [dctypes:title ?study] .
34-
?agent ndar:src_subject_id ?ID .
34+
?as_activity prov:qualifiedAssociation [prov:agent [ndar:src_subject_id ?ID]] .
35+
3536

3637

3738
# find age data element uuid
38-
{?age_measure a nidm:DataElement ;
39-
nidm:isAbout <http://uri.interlex.org/base/ilx_0100400> .
39+
{?age_measure a nidm:PersonalDataElement ;
40+
nidm:isAbout ilx:ilx_0100400 ;
41+
nidm:sourceVariable "AGE_AT_SCAN" .
4042
}
4143
# find sex data element uuid
42-
{?sex_measure a nidm:DataElement ;
44+
{?sex_measure a nidm:PersonalDataElement ;
4345
nidm:isAbout <http://uri.interlex.org/base/ilx_0101292> .
4446
}
4547
?as_entity prov:wasGeneratedBy ?as_activity ;
46-
?age_measure ?Age;
47-
?sex_measure ?GenderCoded ;
48+
?age_measure ?Age ;
49+
?sex_measure ?GenderCoded .
50+
4851
bind(IF((?GenderCoded ="1" || ?GenderCoded ="Male"^^xsd:string), "Male"^^xsd:string,"Female"^^xsd:string) as ?Gender) .
4952
FILTER (?federatedLabel = <http://purl.obolibrary.org/obo/UBERON_0001954>)
5053
}

queries/female_subj_IDs.sparql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ where {
2727

2828

2929
# find sex data element uuid
30-
{?sex_measure a nidm:DataElement ;
30+
{?sex_measure a nidm:PersonalDataElement ;
3131
nidm:isAbout <http://uri.interlex.org/base/ilx_0101292> .
3232
}
3333

queries/male_subj_IDs.sparql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ where {
2727

2828

2929
# find sex data element uuid
30-
{?sex_measure a nidm:DataElement ;
30+
{?sex_measure a nidm:PersonalDataElement ;
3131
nidm:isAbout <http://uri.interlex.org/base/ilx_0101292> .
3232
}
3333

@@ -40,4 +40,4 @@ where {
4040
bind(IF((?GenderCoded ="1" || ?GenderCoded ="Male"^^xsd:string), "Male"^^xsd:string,"Female"^^xsd:string) as ?Gender) .
4141
filter (?Gender = "Male"^^xsd:string) .
4242

43-
}
43+
}

queries/simple2_query.sparql

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ prefix ncit: <http://ncitt.ncit.nih.gov/>
1414
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
1515
prefix uberon: <http://purl.obolibrary.org/obo/UBERON_>
1616
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
17+
prefix ilx: <http://uri.interlex.org/>
1718

1819
select distinct ?study ?ID ?Age ?dx ?Gender ?FIQ ?PIQ ?VIQ ?tool ?softwareLabel ?federatedLabel ?laterality ?volume
1920
where {
@@ -32,35 +33,34 @@ where {
3233
prov:qualifiedAssociation [prov:agent [ndar:src_subject_id ?ID]] .
3334
?tool_entity prov:wasGeneratedBy ?tool_act .
3435

35-
?as_activity prov:qualifiedAssociation [prov:agent ?agent] ;
36-
dct:isPartOf/dct:isPartOf [dctypes:title ?study] .
37-
?agent ndar:src_subject_id ?ID .
36+
?as_activity prov:qualifiedAssociation [prov:agent [ndar:src_subject_id ?ID]] .
3837

3938

4039
# find age data element uuid
41-
{?age_measure a nidm:DataElement ;
42-
nidm:isAbout ncicb:Age .
40+
{?age_measure a nidm:PersonalDataElement ;
41+
nidm:isAbout ilx:ilx_0100400 .
42+
4343
}
4444
# find sex data element uuid
45-
{?sex_measure a nidm:DataElement ;
46-
nidm:isAbout ndar:gender .
45+
{?sex_measure a nidm:PersonalDataElement ;
46+
nidm:isAbout <http://uri.interlex.org/base/ilx_0101292> .
4747
}
4848
# find diagnosis data element uuid
49-
{?DX_measure a nidm:DataElement ;
49+
{?DX_measure a nidm:PersonalDataElement ;
5050
nidm:isAbout ncit:Diagnosis .
5151

5252
}
5353
# find fiq data element uuid
54-
{?FIQ_measure a nidm:DataElement ;
55-
nidm:isAbout <https://github.com/dbkeator/nidm-local-terms/issues/2> .
54+
{?FIQ_measure a nidm:PersonalDataElement ;
55+
nidm:isAbout <http://uri.interlex.org/base/ilx_0739365> .
5656
}
5757
# find piq data element uuid
58-
{?PIQ_measure a nidm:DataElement ;
59-
nidm:isAbout <https://github.com/dbkeator/nidm-local-terms/issues/4> .
58+
{?PIQ_measure a nidm:PersonalDataElement ;
59+
nidm:isAbout <http://uri.interlex.org/base/ilx_0739363> .
6060
}
6161
# find viq data element uuid
62-
{?VIQ_measure a nidm:DataElement ;
63-
nidm:isAbout <https://github.com/dbkeator/nidm-local-terms/issues/3> .
62+
{?VIQ_measure a nidm:PersonalDataElement ;
63+
nidm:isAbout <http://uri.interlex.org/base/ilx_0739359> .
6464
}
6565

6666
?as_entity prov:wasGeneratedBy ?as_activity ;

0 commit comments

Comments
 (0)