I have a pretty simple query (without reasoning) using property path to find all ancestors of entity specified by its type and label:
SELECT
?result ?parent
WHERE {
?result a :ReadGroup ;
rdfs:label '''110620_SN0798_0069_BBBBBBBBXX.lane_6.ATCACG'''^^xsd:string ;
:wasDerivedFrom + ?parent
}
In 2.2.3 and 2.2.4 this is correctly returning the following 3 results on my dataset:
+------------------------------------------------+--------------------------------------------------------+
| result | parent |
+------------------------------------------------+--------------------------------------------------------+
| readgroup:9ade3f7f-833c-4fd1-b1bc-c702eb55b755 | sequencinglibrary:a1fb96a4-4869-4a6e-936b-1ca988b1c098 |
| readgroup:9ade3f7f-833c-4fd1-b1bc-c702eb55b755 | collectedsample:600c2634-83dc-42eb-b685-0481f5187200 |
| readgroup:9ade3f7f-833c-4fd1-b1bc-c702eb55b755 | donor:8b52f6e9-55b3-4370-a97d-8242fecf23c3 |
+------------------------------------------------+--------------------------------------------------------+
Using exactly the same data loaded into 3.0 server & using 3.0 client to query I get just 1 result:
+------------------------------------------------+--------------------------------------------------------+
| result | parent |
+------------------------------------------------+--------------------------------------------------------+
| readgroup:9ade3f7f-833c-4fd1-b1bc-c702eb55b755 | sequencinglibrary:a1fb96a4-4869-4a6e-936b-1ca988b1c098 |
+------------------------------------------------+--------------------------------------------------------+
which is only the immediate ancestor of the :ReadGroup instance.
To investigate further I pruned down the initial large dataset in 3.0 to include just the three entities related by :wasDerivedFrom, and the weirdest thing... I get 3 results back! So it's something to do with the presence of the other data? CLI script I use to reproduce this 100% reliably:
#!/bin/sh
function toggle {
/opt/stardog/$CURRENT/bin/stardog-admin server stop
if [ $CURRENT = $NEW ]
then
CURRENT=$OLD
else
CURRENT=$NEW
fi
export STARDOG_HOME=./$CURRENT
DBNAME=`echo $CURRENT|tr -d '\-.'`
BINDIR=/opt/stardog/$CURRENT/bin
$BINDIR/stardog-admin server start
$BINDIR/stardog-admin db drop $DBNAME
$BINDIR/stardog-admin db create -n $DBNAME $DATA
echo "querying $CURRENT"
$BINDIR/stardog query $DBNAME "
SELECT
?result ?parent
WHERE {
?result a :ReadGroup ;
rdfs:label '''110620_SN0798_0069_BBBBBBBBXX.lane_6.ATCACG'''^^xsd:string ;
:wasDerivedFrom + ?parent
}"
}
NEW=stardog-3.0
OLD=stardog-2.2.3
CURRENT=$OLD
DATA=dump.ttl
toggle
toggle
I can provide obfuscated version of dump.ttl if you wish.
On an unrelated note I had trouble running query against the obfuscated data, getting the error:
com.complexible.common.rdf.query.parser.sparql.ast.ASTQName cannot be cast to com.complexible.common.rdf.query.parser.sparql.ast.ASTIRI