Skip to content

Commit

Permalink
Merge branch 'master' into fix-ci-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mereolog committed Jul 11, 2024
2 parents e96975d + 8e3c6e1 commit e35e848
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 31 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/unit_tests_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/ \
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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/ \
Expand Down
10 changes: 4 additions & 6 deletions etc/transformation/GSRS/gsrs-public-data-identifiers.rqg
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ PREFIX iter: <http://w3id.org/sparql-generate/iter/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX cmns-id: <https://www.omg.org/spec/Commons/Identifiers/>
PREFIX cmns-id: <https://www.omg.org/spec/Commons/Identifiers/>
PREFIX cmns-ra: <https://www.omg.org/spec/Commons/RegistrationAuthorities/>
PREFIX idmp-nara: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/NorthAmericanJurisdiction/NorthAmericanRegistrationAuthorities/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX idmp-eura: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/EuropeanJurisdiction/EuropeanRegistrationAuthorities/>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>
PREFIX idmp-ra: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/>
PREFIX idmp-x: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ExtensionTBD/>
PREFIX idmp-ra: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/>

GENERATE {
# Substance
Expand Down Expand Up @@ -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 ,
Expand Down
12 changes: 6 additions & 6 deletions etc/transformation/GSRS/gsrs-public-data-names.rqg
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
PREFIX iter: <http://w3id.org/sparql-generate/iter/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>
PREFIX cmns-cxtdsg: <https://www.omg.org/spec/Commons/ContextualDesignators/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>

GENERATE {

# Substance
?Substance ?labelProperty ?OfficialSubstanceName ;
rdfs:label ?OfficialSubstanceName ;
cmns-dsg:hasName ?SubstanceName ;
.

# 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(<public_data.json>,
Expand Down
5 changes: 1 addition & 4 deletions etc/transformation/GSRS/gsrs-public-data-relationships.rqg
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ PREFIX iter: <http://w3id.org/sparql-generate/iter/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX cmns-cxtdsg: <https://www.omg.org/spec/Commons/ContextualDesignators/>
PREFIX cmns-rlcmp: <https://www.omg.org/spec/Commons/RolesAndCompositions/>
PREFIX cmns-pts: <https://www.omg.org/spec/Commons/PartiesAndSituations/>
PREFIX idmp-ra: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/>
PREFIX idmp-nara: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/NorthAmericanJurisdiction/NorthAmericanRegistrationAuthorities/>
PREFIX idmp-narga: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/NorthAmericanJurisdiction/NorthAmericanRegulatoryAgencies/>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>

GENERATE {

Expand Down
13 changes: 7 additions & 6 deletions etc/transformation/GSRS/gsrs-public-data-substances.rqg
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
PREFIX iter: <http://w3id.org/sparql-generate/iter/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX idmp: <https://purl.iso.org/idmp/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>
PREFIX idmp-ra: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-RegistrationAuthorities/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX idmp-sub: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Substances/>
PREFIX cmns-txt: <https://www.omg.org/spec/Commons/TextDatatype/>
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>

GENERATE {
Expand Down Expand Up @@ -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 ,
Expand Down
2 changes: 0 additions & 2 deletions etc/transformation/SPOR/referentials/spor-referentials.rqg
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX cmns-cls: <https://www.omg.org/spec/Commons/Classifiers/>
PREFIX cmns-dsg: <https://www.omg.org/spec/Commons/Designators/>
PREFIX idmp-spor: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/EuropeanJurisdiction/SubstancesProductsOrganisationsReferentials/>

GENERATE {
<https://spor.ema.europa.eu/v1/lists/{ ?Identifier }/terms>
Expand Down
5 changes: 2 additions & 3 deletions etc/transformation/SPOR/substances/spor-substances.rqg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ PREFIX idmp-ra: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/ISO11238-Reg
PREFIX idmp-eura: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/EuropeanJurisdiction/EuropeanRegistrationAuthorities/>
PREFIX idmp-eureg: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/EuropeanJurisdiction/EuropeanRegulatoryAgencies/>
PREFIX idmp-nara: <https://spec.pistoiaalliance.org/idmp/ontology/ISO/NorthAmericanJurisdiction/NorthAmericanRegistrationAuthorities/>
PREFIX cmns-ra: <https://www.omg.org/spec/Commons/RegistrationAuthorities/>
PREFIX spor-st: <https://spor.ema.europa.eu/v1/lists/100000075826/terms/>

GENERATE {
Expand All @@ -37,7 +36,7 @@ GENERATE {
a idmp-eura:EudraVigilanceCode, cmns-ra:RegisteredIdentifier ;
cmns-id:identifies <https://spor.ema.europa.eu/v1/lists/SubstanceDefinition/terms/{ ?SMS_ID }> ;
cmns-txt:hasTextValue ?External_Code_XEVMPD ;
cmns-ra:registeredIn idmp-eura:ExtendedEudraVigilanceMedicinalProductDictionary;
cmns-ra:isRegisteredIn idmp-eura:ExtendedEudraVigilanceMedicinalProductDictionary ;
.
}
ITERATOR iter:CSV(<sms-substances-list.csv>) AS
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e35e848

Please sign in to comment.