Skip to content

Commit 47bd8e1

Browse files
committed
Expose more specific interaction type, if present
e.g. wp:Interaction This fixes issue #21
1 parent 9e0fff1 commit 47bd8e1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

api-config-files/04_16_pathwayInteractionsByEntity.ttl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ _:interaction_type api:name "interaction_type" ;
166166
?organism_uri rdfs:label ?organism ;
167167
void:inDataset <http://www.wikipathways.org> .
168168
?interaction a wp:Interaction ;
169+
a ?interaction_types ;
169170
wp:participants ?participants ;
170171
dcterms:isPartOf ?pathway ;
171172
void:inDataset <http://www.wikipathways.org> .
@@ -175,6 +176,8 @@ _:interaction_type api:name "interaction_type" ;
175176
ops:target ?part_target ;
176177
void:inDataset <http://www.wikipathways.org> .
177178
?dir_interaction a wp:DirectedInteraction ;
179+
a ?dir_interaction_types ;
180+
wp:participants ?participants ;
178181
ops:source ?source ;
179182
ops:target ?target ;
180183
dcterms:isPartOf ?pathway ;
@@ -234,6 +237,10 @@ GRAPH <http://www.wikipathways.org> {
234237
?participants wp:target ?part_target .
235238
?part_source a ?part_source_type .
236239
?part_target a ?part_target_type .
240+
OPTIONAL {
241+
?item a ?interaction_types .
242+
FILTER ( ?interaction_types != wp:Interaction && ?interaction_types != wp:DirectedInteraction )
243+
}
237244
FILTER ( ?part_source_type != wp:DataNode || STRSTARTS( STR( ?part_source_type ), 'http://identifiers.org/wikipathways/WP' ) )
238245
FILTER ( ?part_target_type != wp:DataNode || STRSTARTS( STR( ?part_target_type ), 'http://identifiers.org/wikipathways/WP' ) )
239246
BIND ( true AS ?part_directed )
@@ -278,6 +285,10 @@ GRAPH <http://www.wikipathways.org> {
278285
FILTER ( ?target_target_type != wp:DataNode || STRSTARTS( STR( ?target_target ), 'http://identifiers.org/wikipathways/WP' ) )
279286
BIND ( true AS ?target_directed )
280287
}
288+
OPTIONAL {
289+
?item a ?dir_interaction_types .
290+
FILTER ( ?dir_interaction_types != wp:Interaction && ?dir_interaction_types != wp:DirectedInteraction )
291+
}
281292
BIND ( ?item AS ?dir_interaction )
282293
}
283294
BIND ( IF ( ?part_directed, wp:DirectedInteraction, ?part_type_tmp ) AS ?part_type )

0 commit comments

Comments
 (0)