Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit constraint on trace's encoding format #5132

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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