diff --git a/.github/workflows/unit_tests_run.yml b/.github/workflows/unit_tests_run.yml index 643d3208..fd99c2f6 100644 --- a/.github/workflows/unit_tests_run.yml +++ b/.github/workflows/unit_tests_run.yml @@ -34,7 +34,7 @@ jobs: ./etc/unit_tests/dependencies.sh - name: Run unit tests using Apache Jena run: | - java -Xmx5G -jar etc/unit_tests/target/unit-test-runner-1.0.jar \ + java -Xmx8G -jar etc/unit_tests/target/unit-test-runner-1.0.jar \ -ontology_location ./AboutIDMPDev-ReferenceIndividuals.ttl \ -root_folder etc/unit_tests/ \ -cq_source etc/CQ/Example/ \ @@ -52,7 +52,7 @@ jobs: GSRS: runs-on: ubuntu-latest env: - GSRS_VERSION: ${{ inputs.gsrs_version || '2022-12-15' }} + GSRS_VERSION: ${{ inputs.gsrs_version || '2023-12-14' }} steps: - uses: actions/checkout@v4 - name: Set up Java 11 @@ -84,7 +84,7 @@ jobs: queries=(gsrs-public-data-identifiers gsrs-public-data-names gsrs-public-data-relationships gsrs-public-data-substances) for query in "${queries[@]}"; do echo "Transforming $query.rqg" - java -Xmx5G -jar sparql-generate.jar -l INFO -q etc/transformation/GSRS/$query.rqg -o $query.ttl + java -Xmx8G -jar sparql-generate.jar -l INFO -q etc/transformation/GSRS/$query.rqg -o $query.ttl done result=gsrs-transformed.ttl rm -rf $result @@ -101,7 +101,7 @@ jobs: done - name: Run unit tests using Apache Jena run: | - java -Xmx5G -jar etc/unit_tests/target/unit-test-runner-1.0.jar \ + java -Xmx8G -jar etc/unit_tests/target/unit-test-runner-1.0.jar \ -ontology_location ./gsrs-final.ttl \ -root_folder etc/unit_tests/ \ -cq_source etc/CQ/Example/ \ diff --git a/etc/transformation/GSRS/gsrs-public-data-identifiers.rqg b/etc/transformation/GSRS/gsrs-public-data-identifiers.rqg index caa03d46..076220fc 100644 --- a/etc/transformation/GSRS/gsrs-public-data-identifiers.rqg +++ b/etc/transformation/GSRS/gsrs-public-data-identifiers.rqg @@ -2,14 +2,12 @@ PREFIX iter: PREFIX rdf: PREFIX rdfs: PREFIX skos: -PREFIX cmns-id: +PREFIX cmns-id: PREFIX cmns-ra: PREFIX idmp-nara: -PREFIX cmns-txt: +PREFIX cmns-txt: PREFIX idmp-eura: -PREFIX idmp-sub: -PREFIX idmp-ra: -PREFIX idmp-x: +PREFIX idmp-ra: GENERATE { # Substance @@ -83,7 +81,7 @@ BIND( IF(str(?CodeCodeSystem) = "USDA PLANTS", idmp-nara:PlantListOfAcceptedNomenclatureTaxonomyAndSymbols , IF(str(?CodeCodeSystem) = "PUBCHEM", idmp-nara:PubChem , IF(str(?CodeCodeSystem) = "USP-MC MONOGRAPH", idmp-nara:USPharmacopeiaMedicinesCompendium , - IF(str(?CodeCodeSystem) = "USP-MC VALIDATION RPT", cmns-ra:USPharmacopeiaMedicinesCompendium , + IF(str(?CodeCodeSystem) = "USP-MC VALIDATION RPT", idmp-nara:USPharmacopeiaMedicinesCompendium , IF(str(?CodeCodeSystem) = "UNIPROT", idmp-eura:UniProt , IF(str(?CodeCodeSystem) = "UCSF-FDA TRANSPORTAL", idmp-nara:UniversityOfCaliforniaSanFrancisoFederalDrugAdministrationTransport , IF(str(?CodeCodeSystem) = "WHO INTERNATIONAL PHARMACOPOEIA", idmp-ra:WorldHealthOrganizationInternationalPharmacopoeia , diff --git a/etc/transformation/GSRS/gsrs-public-data-names.rqg b/etc/transformation/GSRS/gsrs-public-data-names.rqg index d012b4d6..ad0e1a0c 100644 --- a/etc/transformation/GSRS/gsrs-public-data-names.rqg +++ b/etc/transformation/GSRS/gsrs-public-data-names.rqg @@ -1,12 +1,12 @@ PREFIX iter: PREFIX skos: PREFIX rdfs: -PREFIX cmns-dsg: -PREFIX cmns-txt: -PREFIX idmp-sub: +PREFIX cmns-dsg: +PREFIX cmns-cxtdsg: +PREFIX cmns-txt: +PREFIX idmp-sub: GENERATE { - # Substance ?Substance ?labelProperty ?OfficialSubstanceName ; rdfs:label ?OfficialSubstanceName ; @@ -14,11 +14,11 @@ GENERATE { . # Names - ?SubstanceName a cmns-dsg:ContextualName ; + ?SubstanceName a cmns-cxtdsg:ContextualName ; cmns-txt:hasTextValue ?SubstanceNameValue ; cmns-dsg:isNameOf ?Substance ; idmp-sub:hasSubstanceNameType ?SubstanceNameType ; - . + . } ITERATOR iter:JSONSurfer(, diff --git a/etc/transformation/GSRS/gsrs-public-data-relationships.rqg b/etc/transformation/GSRS/gsrs-public-data-relationships.rqg index 0a29c178..d8b4ea31 100644 --- a/etc/transformation/GSRS/gsrs-public-data-relationships.rqg +++ b/etc/transformation/GSRS/gsrs-public-data-relationships.rqg @@ -2,11 +2,8 @@ PREFIX iter: PREFIX skos: PREFIX cmns-cxtdsg: PREFIX cmns-rlcmp: -PREFIX cmns-pts: -PREFIX idmp-ra: -PREFIX idmp-nara: PREFIX idmp-narga: -PREFIX idmp-sub: +PREFIX idmp-sub: GENERATE { diff --git a/etc/transformation/GSRS/gsrs-public-data-substances.rqg b/etc/transformation/GSRS/gsrs-public-data-substances.rqg index 13c39f21..38cd7aed 100644 --- a/etc/transformation/GSRS/gsrs-public-data-substances.rqg +++ b/etc/transformation/GSRS/gsrs-public-data-substances.rqg @@ -1,12 +1,9 @@ PREFIX iter: -PREFIX rdf: PREFIX rdfs: PREFIX owl: -PREFIX idmp: PREFIX skos: -PREFIX idmp-sub: -PREFIX idmp-ra: -PREFIX cmns-txt: +PREFIX idmp-sub: +PREFIX cmns-txt: PREFIX cmns-dsg: GENERATE { @@ -187,7 +184,11 @@ BIND(IF(str(?substanceClass) = "chemical", idmp-sub:ChemicalSubstance , IF(str(?substanceClass) = "polymer", idmp-sub:PolymerSubstance , IF(str(?substanceClass) = "structurallyDiverse", idmp-sub:StructurallyDiverseSubstance , IF(str(?substanceClass) = "specifiedSubstance", idmp-sub:SpecifiedSubstance , - idmp-sub:Substance ))))))) + IF(str(?substanceClass) = "specifiedSubstanceG1", idmp-sub:SpecifiedSubstanceGroup1 , + IF(str(?substanceClass) = "specifiedSubstanceG2", idmp-sub:SpecifiedSubstanceGroup2 , + IF(str(?substanceClass) = "specifiedSubstanceG3", idmp-sub:SpecifiedSubstanceGroup3 , + IF(str(?substanceClass) = "specifiedSubstanceG4", idmp-sub:SpecifiedSubstanceGroup4 , + idmp-sub:Substance ))))))))))) AS ?SubstanceType) BIND(IF(str(?structureStereochemistry) = "ABSOLUTE", idmp-sub:Stereochemistry-Absolute , diff --git a/etc/transformation/SPOR/referentials/spor-referentials.rqg b/etc/transformation/SPOR/referentials/spor-referentials.rqg index 7f61c994..392233ac 100644 --- a/etc/transformation/SPOR/referentials/spor-referentials.rqg +++ b/etc/transformation/SPOR/referentials/spor-referentials.rqg @@ -8,8 +8,6 @@ PREFIX rdfs: PREFIX owl: PREFIX xsd: PREFIX cmns-cls: -PREFIX cmns-dsg: -PREFIX idmp-spor: GENERATE { diff --git a/etc/transformation/SPOR/substances/spor-substances.rqg b/etc/transformation/SPOR/substances/spor-substances.rqg index f7ebedc4..7b76f629 100644 --- a/etc/transformation/SPOR/substances/spor-substances.rqg +++ b/etc/transformation/SPOR/substances/spor-substances.rqg @@ -11,7 +11,6 @@ PREFIX idmp-ra: PREFIX idmp-eureg: PREFIX idmp-nara: -PREFIX cmns-ra: PREFIX spor-st: GENERATE { @@ -37,7 +36,7 @@ GENERATE { a idmp-eura:EudraVigilanceCode, cmns-ra:RegisteredIdentifier ; cmns-id:identifies ; cmns-txt:hasTextValue ?External_Code_XEVMPD ; - cmns-ra:registeredIn idmp-eura:ExtendedEudraVigilanceMedicinalProductDictionary; + cmns-ra:isRegisteredIn idmp-eura:ExtendedEudraVigilanceMedicinalProductDictionary ; . } ITERATOR iter:CSV() AS @@ -147,7 +146,7 @@ WHERE { IF(?Name_Source = "FDA SUBSTANCE REGISTRATION SYSTEM", idmp-nara:FoodAndDrugAdministrationRegistrationAuthority, # valid IF(?Name_Source = "INN", idmp-ra:InternationalNonproprietaryName, # valid IF(?Name_Source = "ITIS (INTEGRATED TAXONOMIC INFORMATION SYSTEM)", idmp-nara:IntegratedTaxonomicInformationSystem, # valid - IF(?Name_Source = "PUBCHEM", cmns-ra:PubChem, # valid + IF(?Name_Source = "PUBCHEM", idmp-nara:PubChem, # valid IF(?Name_Source = "THE MERCK INDEX 20TH EDITION", idmp-ra:MerckIndexOnline, # valid IF(?Name_Source = "USP", idmp-nara:USPharmacopeiaMedicinesCompendium, # valid IF(?Name_Source = "WHO", idmp-ra:WorldHealthOrganization, # valid