Skip to content

Commit 79e67bc

Browse files
author
cl117
committed
add role and sbolType to sparql
1 parent a7e557b commit 79e67bc

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

lib/views/search.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ module.exports = function (req, res) {
160160
description: result['description'] || '',
161161
displayId: result['displayId'] || '',
162162
version: result['version'] || '',
163+
sbolType: result['sbolType'] || null,
164+
role: result['role'] || null,
163165
percentMatch: result['percentMatch'] || '',
164166
strandAlignment: result['strandAlignment'] || '',
165167
CIGAR: result['CIGAR'] || ''

sparql/search.sparql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ SELECT DISTINCT
2323
?name
2424
?description
2525
?type
26+
?sbolType
27+
?role
2628
$from
2729
WHERE {
2830
$criteria
@@ -33,6 +35,9 @@ WHERE {
3335
OPTIONAL { ?subject sbol2:version ?version . }
3436
OPTIONAL { ?subject dcterms:title ?name . }
3537
OPTIONAL { ?subject dcterms:description ?description . }
38+
OPTIONAL { ?subject sbol2:type ?sbolType . FILTER(STRSTARTS(str(?sbolType),'http://www.biopax.org/release/biopax-level3.owl')) }
39+
OPTIONAL { ?subject sbol2:role ?role . FILTER(STRSTARTS(str(?role),'http://identifiers.org/so/')) }
40+
3641
}
3742

3843
$limit

0 commit comments

Comments
 (0)