From f1ff4f0c86d2242b30741f23ecb119a3a1eb0b41 Mon Sep 17 00:00:00 2001 From: tarcisio_adm Date: Fri, 23 Aug 2024 11:39:19 +0200 Subject: [PATCH] Correct up taxonomy uri --- ontop_config/emi-v0_2/emi-v0_2.obda | 2 +- ontop_config/open-tree-of-life/otl.obda | 2 +- ontop_config/traits/traits.obda | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ontop_config/emi-v0_2/emi-v0_2.obda b/ontop_config/emi-v0_2/emi-v0_2.obda index b835873..0d62e2c 100644 --- a/ontop_config/emi-v0_2/emi-v0_2.obda +++ b/ontop_config/emi-v0_2/emi-v0_2.obda @@ -89,6 +89,6 @@ source SELECT trim(replace(replace(replace(substring_index(tax_name, '"',2), '" mappingId open_tree_life_synonym_2 target skos:exactMatch <{iri_mapping}> . <{iri_mapping}> dcterms:identifier {external_id}^^xsd:string . -source SELECT uid, substring_index( IF( sourceinfo like 'ncbi:%', replace(sourceinfo, 'ncbi:','https://www.uniprot.org/taxonomy/'), replace(sourceinfo, 'gbif:','https://www.gbif.org/species/')),',' ,1 ) as iri_mapping, substring_index(sourceinfo,',','1') as external_id FROM open_tree_life_synonym where (sourceinfo like 'ncbi:%' or sourceinfo like 'gbif:%') +source SELECT uid, substring_index( IF( sourceinfo like 'ncbi:%', replace(sourceinfo, 'ncbi:','http://purl.uniprot.org/taxonomy/'), replace(sourceinfo, 'gbif:','https://www.gbif.org/species/')),',' ,1 ) as iri_mapping, substring_index(sourceinfo,',','1') as external_id FROM open_tree_life_synonym where (sourceinfo like 'ncbi:%' or sourceinfo like 'gbif:%') ]] diff --git a/ontop_config/open-tree-of-life/otl.obda b/ontop_config/open-tree-of-life/otl.obda index cfabbf0..5956301 100644 --- a/ontop_config/open-tree-of-life/otl.obda +++ b/ontop_config/open-tree-of-life/otl.obda @@ -36,6 +36,6 @@ source SELECT trim(replace(replace(replace(substring_index(tax_name, '"',2), '" mappingId open_tree_life_synonym_2 target skos:exactMatch <{iri_mapping}>. <{iri_mapping}> dcterms:identifier {external_id}^^xsd:string . -source SELECT uid, substring_index( IF( sourceinfo like 'ncbi:%', replace(sourceinfo, 'ncbi:','https://www.uniprot.org/taxonomy/'), replace(sourceinfo, 'gbif:','https://www.gbif.org/species/')),',' ,1 ) as iri_mapping, substring_index(sourceinfo,',','1') as external_id FROM open_tree_life_synonym where (sourceinfo like 'ncbi:%' or sourceinfo like 'gbif:%') +source SELECT uid, substring_index( IF( sourceinfo like 'ncbi:%', replace(sourceinfo, 'ncbi:','http://purl.uniprot.org/taxonomy/'), replace(sourceinfo, 'gbif:','https://www.gbif.org/species/')),',' ,1 ) as iri_mapping, substring_index(sourceinfo,',','1') as external_id FROM open_tree_life_synonym where (sourceinfo like 'ncbi:%' or sourceinfo like 'gbif:%') ]] diff --git a/ontop_config/traits/traits.obda b/ontop_config/traits/traits.obda index 23b4397..47ea9fd 100644 --- a/ontop_config/traits/traits.obda +++ b/ontop_config/traits/traits.obda @@ -24,7 +24,7 @@ up: http://purl.uniprot.org/core/ mappingId taxonomy target skos:exactMatch , , , , , , <{WdID}> . dcterms:identifier {ncbi_otol}^^xsd:int ; skos:inScheme . rdfs:label "UniProtKB-NCBI organismal taxonomy" . dcterms:identifier {gbif_otol_new}^^xsd:int ; skos:inScheme . rdfs:label "The GBIF taxonomy" . dcterms:identifier {eol}^^xsd:int ; skos:inScheme . rdfs:label "Encyclopedia of Life" . dcterms:identifier {ncbi_wd}^^xsd:int ; skos:inScheme . rdfs:label "NCBI organismal classification" . <{WdID}> dcterms:identifier {wd_id}^^xsd:string ; a emi:Taxon ; skos:inScheme . rdfs:label "Wikidata entities". -source SELECT ott, IF(WdID = 'NA', Null, WdID) as WdID, replace(replace(WdID, 'http://www.wikidata.org/entity/',''),'NA',Null) as wd_id, IF(eol='NA', Null, eol) as eol, IF(gbif_otol='NA', Null, gbif_otol) as gbif_otol_new, IF(ncbi_wd='NA', Null, ncbi_wd) as ncbi_wd, IF(ncbi_otol='NA', Null, ncbi_otol) as ncbi_otol FROM taxonomy where ott != 'NA' and WdID = 'NA' +source SELECT DISTINCT IF(ott='NA',null,ott) as ott, IF(WdID = 'NA', null, WdID) as WdID, IF(WdID = 'NA', null, replace(WdID, 'http://www.wikidata.org/entity/','')) as wd_id, IF(eol='NA', null, eol) as eol, IF(gbif_otol='NA', null, gbif_otol) as gbif_otol_new, IF(ncbi_wd='NA', null, ncbi_wd) as ncbi_wd, IF(ncbi_otol='NA', null, ncbi_otol) as ncbi_otol FROM taxonomy ]]