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

Make simulationReady property a construction from a quality metric annotation #5115

Merged
merged 10 commits into from
Aug 27, 2024
48 changes: 38 additions & 10 deletions tests/docker/config/construct-query.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -353,16 +353,6 @@ CONSTRUCT {
)
}

OPTIONAL {
BIND(
IF(
EXISTS {?id nsg:annotation / nsg:hasBody <https://bbp.epfl.ch/ontologies/core/bmo/SimulationReady> .},
true,
false
) AS ?simulationReady
)
}

OPTIONAL {
BIND(
IF(
Expand Down Expand Up @@ -655,6 +645,44 @@ CONSTRUCT {
BIND( BNODE((CONCAT(STR(?id), '/neuronDensity'))) as ?neuronDensityBN ) .
} .

# NeuronMorphologies
OPTIONAL {
?id a nsg:NeuronMorphology ;
^nsg:hasSource / ^nsg:hasTarget ?qualityMeasurementAnnotation .

?qualityMeasurementAnnotation a nsg:QualityMeasurementAnnotation .

?qualityMeasurementAnnotation nsg:hasBody ?canBeLoadedBody .
?canBeLoadedBody nsg:isMeasurementOf bmo:CanBeLoadedWithMorphioMetric ;
schema:value ?canBeLoaded .

?qualityMeasurementAnnotation nsg:hasBody ?neuriteHasDiffDiameterBody .
?neuriteHasDiffDiameterBody nsg:isMeasurementOf bmo:NeuriteHasDifferentDiametersMetric ;
schema:value ?neuriteHasDiffDiameter .

?qualityMeasurementAnnotation nsg:hasBody ?hasNonZeroNeuriteRadiiBody .
?hasNonZeroNeuriteRadiiBody nsg:isMeasurementOf bmo:HasAllNonZeroNeuriteRadiiMetric ;
schema:value ?hasNonZeroNeuriteRadii .

?qualityMeasurementAnnotation nsg:hasBody ?hasNonZeroSectionLengthBody .
?hasNonZeroSectionLengthBody nsg:isMeasurementOf bmo:HasAllNonZeroSectionLengthsMetric ;
schema:value ?hasNonZeroSectionLength .

?qualityMeasurementAnnotation nsg:hasBody ?hasNonZeroSomaBody .
?hasNonZeroSomaBody nsg:isMeasurementOf bmo:HasNoZeroSomaRadiusMetric ;
schema:value ?hasNonZeroSoma .
BIND(
IF (?canBeLoaded &&
?neuriteHasDiffDiameter &&
?hasNonZeroNeuriteRadii &&
?hasNonZeroSectionLength &&
?hasNonZeroSoma,
true,
false
) AS ?simulationReady
)
}

# Simulation campaign configuration
OPTIONAL {
?id a bmo:SimulationCampaignConfiguration .
Expand Down
Loading