Ok I think there was a bug in the original query.
Replace original with the following property path:
" ?src (^wp:source/wp:target)+ ?tgt . "
Which translates to:
("find ?directedInteraction that ?src is the source of" ->
"find ?tgt that is the target of ?directedInteraction")+
Query 2:
SELECT DISTINCT ?pathway ?src ?tgt
WHERE {
?pathway a wp:Pathway .
?interaction dcterms:isPartOf ?pathway .
?interaction a wp:DirectedInteraction .
?interaction wp:source ?src .
?interaction wp:target ?tgt .
?src (^wp:source/wp:target)+ ?tgt .
?pathway dcterms:identifier "WP3655"^^xsd:string .
FILTER(?src != ?tgt)
}
LIMIT 10
```
I've also included "FILTER(?src != ?tgt)" in an attempt to include only simple paths (no loops).
Unfortunately even with only "LIMIT 10" records I'm getting a response that suggests something weird is going on:
"Virtuoso 42000 Error TN...: Exceeded 1000000000 bytes in transitive temp memory. use t_distinct, t_max or more T_MAX_memory options to limit the search or increase the pool"
Thanks, Matt