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

get concept tree to root issue #281

Closed
syphax-bouazzouni opened this issue Jun 16, 2022 · 4 comments
Closed

get concept tree to root issue #281

syphax-bouazzouni opened this issue Jun 16, 2022 · 4 comments
Labels

Comments

@syphax-bouazzouni
Copy link
Contributor

syphax-bouazzouni commented Jun 16, 2022

In the stageportal going to this URL: http://stageportal.lirmm.fr/ontologies/INRAETHES/?p=classes&conceptid=http%3A%2F%2Fopendata.inrae.fr%2FthesaurusINRAE%2Fc_405ccee4

Don't show the full tree until the concept amygdale (cerveau) instead just stop in the roots, as shown in the screenshot below

Image

It is not a UI issue because we can find the same issue in the API endpoint http://data.stageportal.lirmm.fr/ontologies/INRAETHES/classes/http%3A%2F%2Fopendata.inrae.fr%2FthesaurusINRAE%2Fc_405ccee4/tree

@syphax-bouazzouni
Copy link
Contributor Author

syphax-bouazzouni commented Jun 16, 2022

It seems that the issue is the same with the NCBO code.

Path to the issue

  1. When trying to get the child "05. BIOLOGY" here https://github.com/ontoportal-lirmm/ontologies_linked_data/blob/master/lib/ontologies_linked_data/models/class.rb#L325 it return an empty array for its children
  self.in(submission).models(single_load).include(ld << {children: [:prefLabel]}).all
  1. The SPARQL request that is sent the following
SELECT DISTINCT ?id ?prefLabel ?definition ?synonym ?children 
FROM  <http://data.bioontology.org/ontologies/INRAETHES/submissions/1>
FROM <http://www.w3.org/2004/02/skos/core#Concept> 
WHERE { 
?id a <http://www.w3.org/2004/02/skos/core#Concept> . 
OPTIONAL { 
         ?id ?rewrite0 ?prefLabel .
          FILTER(?rewrite0 = <http://data.bioontology.org/metadata/def/prefLabel> || ?rewrite0 =
          <http://www.w3.org/2004/02/skos/core#prefLabel>)
 } 
OPTIONAL { 
         ?id ?rewrite1 ?definition . 
         FILTER(?rewrite1 = <http://www.w3.org/2000/01/rdf-schema#comment> || ?rewrite1 = 
         <http://www.w3.org/2004/02/skos/core#definition>) 
} 
OPTIONAL { 
         ?id <http://www.w3.org/2004/02/skos/core#altLabel> ?synonym . 
 } 
OPTIONAL { 
        ?children ?rewrite2 ?id . 
       FILTER(?rewrite2 = <http://www.w3.org/2004/02/skos/core#broadMatch> || ?rewrite2 = 
       <http://www.w3.org/2004/02/skos/core#broader>) 
} 
FILTER(?id = <http://opendata.inrae.fr/thesaurusINRAE/c_405ccee4> || ?id = 
<http://opendata.inrae.fr/thesaurusINRAE/d_5>) }
  1. This works fine in an external Triple store (Jena) and returns the children, but it does not work for 4store.

@syphax-bouazzouni
Copy link
Contributor Author

Updating the submission didn't change nothing

@syphax-bouazzouni
Copy link
Contributor Author

Resolved by ontoportal-lirmm/ontologies_linked_data@843696a

It seems that doing, the following works :

self.in(submission).models(single_load).include({children: [:prefLabel]}).all

But above not :

self.in(submission).models(single_load).include([:prefLabel, :definition, :synonym, {children: [:prefLabel]}]).all

which is not relevant

@syphax-bouazzouni
Copy link
Contributor Author

Seems to be fixed, 5 months after (with #262)

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant