RDFBones / RDFBonesPhaleron

An RDFBones implementation of the data collection routines developed for the Phaleron Bioarchaeological Project.
1 stars 0 forks source link

Need updated Bone loss Structure options #91

Closed hayesleigh closed 1 year ago

hayesleigh commented 1 year ago

In what module does the bug occur? Skeletal pathology-bone loss section.

Describe the bug Within the bone loss section, the bone loss structure options need to be updated. The updated paleopath scoring sheet from December added two new options that are currently not in the database.

To Reproduce Steps to reproduce the behavior:

  1. Go to Bone loss
  2. Click on Bone loss structure
  3. See missing structure options

Expected behavior Would expect all bone loss structure options to be available.

Screenshots image image

cuboideum commented 1 year ago

There was an error in the template for value specifications causing the 'Porosity characteristics value specification' to be generated with a faulty URI. As a consequence, the the value specification statement for 'Bone loss structure' did not get resolved.

Pull request https://github.com/RDFBones/Phaleron-Pathologies/pull/18 fixes the issue in the ontology extension. Commit https://github.com/AnthroGraph/Phaleron-AppOntology/commit/dd19da4e479cebe091332ecc60caca40048d3520 updates the Phaleron app ontology.

@zarquon42b: Please update the app ontology in AnthroGraph for the fix to take effect, there.

cuboideum commented 1 year ago

In the Phaleron app ontology, the measurement datum phaleron-patho:StructureOfBoneLoss has two restrictions pointing to two different value specifications:

  1. phaleron-patho:PorosityCharacteristicsValueSpecification
  2. standards-patho:PorosityCharacteristicsValueSpecification

Only the one from phaleron-patho is correct, the other one represents a bug.

The erroneous restriction is not introduced by the Phaleron-Pathologies ontology extension and not by the Phaleron-AppOntology extension itself, either.

cuboideum commented 1 year ago

The problem still persists. I will get back to it after 5 August 2023.

zarquon42b commented 1 year ago

The issue is owed to the submodule pointer in dental-pathologies is pointing to an outdated version of phaleron-pathologies that contains the erroneous value specification restriction.

zarquon42b commented 1 year ago

The pointer to Phaleron-DentalPatho in AppOntology was outdated. I fixed that here. Also: Before building the AppOntology please clear the submodules and check out from scratch:

git submodule deinit -all
git submodule init
git submodule update 

to make sure no old stuff is flying around in the app ontology repo.

After loading the resulting complete ontologies the erroneous restriction is gone. Here is the SPARQL code to check this:

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?s ?VS  WHERE {
  ?s rdfs:subClassOf*  <http://w3id.org/rdfbones/ext/phaleron-patho/StructureOfBoneLoss> .
  ?s rdfs:subClassOf ?Res.
  ?Res a owl:Restriction;
         owl:onClass ?VS.
} 
cuboideum commented 1 year ago

This fixes the issue for new entries.

@zarquon42b: I assume we will have to correct the value specification URI for existing entries? Substitution of URI suffices as phaleron-patho:PorosityCharacteristicsValueSpecification includes all category labels from standards-patho:PorosityCharacteristicsValueSpecification.

cuboideum commented 1 year ago

@zarquon42b:

As discussed on the phone today, the following needs to be performed on the existing data that have been entered so far: All instances of standards-patho:PorosityCharacteristicsValueSpecification need to be re-assigned to become instances of phaleron-patho:PorosityCharacteristicsValueSpecification.

In the templates, "standards-patho:PorosityCharacteristicsValueSpecification" needs to be replaced with "phaleron-patho:PorosityCharacteristicsValueSpecification".

zarquon42b commented 1 year ago

Fixed here: https://github.com/AnthroGraph/PBP-App/commit/23f5a40f9b5daea09058627bf954d51272af03be . Already deployed and updated knowledge graph on production instance.