Skip to content

Commit

Permalink
Edit constraint on trace's encoding format (#5132)
Browse files Browse the repository at this point in the history
* edit constraint on trace's encoding format

* add non-nwb distribution in trace
  • Loading branch information
ssssarah authored Sep 11, 2024
1 parent f3d3e34 commit 442e077
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
11 changes: 6 additions & 5 deletions tests/docker/config/construct-query.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,12 @@ CONSTRUCT {
FILTER (?type != prov:Entity)

# for Traces, only consider ones that have the nwb encoding format
FILTER NOT EXISTS {
?id a nsg:Trace ;
schema:distribution / schema:encodingFormat ?encodingFormat .
FILTER (?encodingFormat != "application/nwb")
}
OPTIONAL {
?id a bmo:ExperimentalTrace ;
schema:distribution/schema:encodingFormat ?encodingFormat .
} .

FILTER(!bound(?encodingFormat) || ?encodingFormat = "application/nwb") .

?id nxv:createdAt ?createdAt ;
nxv:createdBy ?createdByNode ;
Expand Down
33 changes: 28 additions & 5 deletions tests/src/test/resources/kg/search/data/trace.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,33 @@
"@value": "2021-05-18T18:59:02.602182+02:00"
},
"description": "This dataset is about simulated electrophysiology traces for cell instance S1J_L6_IPC_cADpyr_2. The dataset contains one distribution of the traces in NWB file format.",
"distribution": {
"distribution": [
{
"@type": "DataDownload",
"atLocation": {
"@type": "Location",
"location": "file:///gpfs/bbp.cscs.ch/data/project/proj109/nexus/public/sscx/e/1/0/5/5/9/1/c/S1J_L6_IPC_cADpyr_2.nwb",
"store": {
"@id": "https://bbp.epfl.ch/neurosciencegraph/data/4820323e-bee0-48d2-824f-9d9d404dbbee"
}
},
"contentSize": {
"unitCode": "bytes",
"value": 1657656
},
"contentUrl": "https://bbp.epfl.ch/nexus/v1/files/public/sscx/5b24efb8-ce68-4ce7-afa6-53b8d8ea9a01",
"digest": {
"algorithm": "SHA-256",
"value": "9dfe31ab52dd636987a610b9ac70f6ca28f03331d75a17624a4308a1d64266fc"
},
"encodingFormat": "application/nwb",
"name": "S1J_L6_IPC_cADpyr_2.nwb"
},
{
"@type": "DataDownload",
"atLocation": {
"@type": "Location",
"location": "file:///gpfs/bbp.cscs.ch/data/project/proj109/nexus/public/sscx/e/1/0/5/5/9/1/c/S1J_L6_IPC_cADpyr_2.nwb",
"location": "file:///gpfs/bbp.cscs.ch/data/project/proj109/nexus/public/sscx/e/1/0/5/5/9/1/c/S1J_L6_IPC_cADpyr_2.abf",
"store": {
"@id": "https://bbp.epfl.ch/neurosciencegraph/data/4820323e-bee0-48d2-824f-9d9d404dbbee"
}
Expand All @@ -96,9 +118,10 @@
"algorithm": "SHA-256",
"value": "9dfe31ab52dd636987a610b9ac70f6ca28f03331d75a17624a4308a1d64266fc"
},
"encodingFormat": "application/nwb",
"name": "S1J_L6_IPC_cADpyr_2.nwb"
},
"encodingFormat": "application/abf",
"name": "S1J_L6_IPC_cADpyr_2.abf"
}
],
"image": [
{
"@id": "https://bbp.epfl.ch/neurosciencegraph/data/58342dff-8034-4b53-933b-1c034cdc8180",
Expand Down

0 comments on commit 442e077

Please sign in to comment.