IHTSDO / snomed-owl-toolkit

The official SNOMED CT OWL Toolkit. OWL conversion, classification and authoring support.
Other
92 stars 19 forks source link

Problem obtaining owl file for Snomed International edition July 2019 #37

Closed fanavarro closed 4 years ago

fanavarro commented 4 years ago

Hi all, I am having troubles when converting Snomed CT International edition (July 2019) from RF2 to owl. I have downloaded the Snomed distribution from here, which points to the current version. I am executing the following command:

java -Xmx2g -Xms2g -jar snomed-owl-toolkit-2.9.0-executable.jar -rf2-to-owl -rf2-snapshot-archives SnomedCT_InternationalRF2_PRODUCTION_20190731T120000Z.zip

An owl file is generated. However, when I open it in Protege, the Snomed hierarchy is completely broken: imagen

The Snomed root concept only has one subclass: imagen

Moreover, I have configured protege to visualize the classes through rdfs:label property; however, there are several classes whose ID is appearing instead of their rdfs:labels. For example, the class 102283003 has a label, but this label is not shown in the tree component: imagen

I am not very sure if something is wrong generating the ontology owl file from RF2 Snomed files, or if the Snomed files are not expressing the concept hierarchy properly. I am using Protege 5.2.0 and Snomed OWL Toolkit 2.9.0. Previous Snomed versions, downloaded from here, do not present this kind of issue.

Do you have any clue about this? Thanks in advance!

fanavarro commented 4 years ago

I have noticed that the rdfs:label issue that I commented before is caused because the language tag of the rdfs:label is not recognized by Protege (the language tag is "en-gb", but if I change it to "en", then the label is printed in the hierarchy tree). Therefore, this is a Protege problem.

apeteri commented 4 years ago

@fanavarro, you can adjust the label rendering behavior in Protégé by selecting "View" > "Custom rendering...", and clicking the "Configure..." button in the "Entity rendering" section (even though it looks like it shouldn't have any effect when the radio button is not in the last position).

The resulting dialog has a "Set Language" field at the bottom. See if re-ordering or extending the accepted language list helps. I have it set to en, en-us, en-gb, ! at the moment.

fanavarro commented 4 years ago

Thanks @apeteri, it worked! Nonetheless, I am still having the bad hierarchy issue.

kaicode commented 4 years ago

Hi @fanavarro, thanks for reaching out. This is very strange behaviour which I have not seen before. It's almost like most of the axioms failed to load.

Could you provide the complete output from the owl toolkit when running the command please?

It's likely that 2g is not enough memory for the conversion process. The application may not fail gracefully if it runs out of memory. Please try again with -Xms4g - see https://github.com/IHTSDO/snomed-owl-toolkit#snomed-rf2-to-owl-file-conversion

Kind regards, Kai

kaicode commented 4 years ago

I've just tried with -Xms2g on my machine. I'm getting:

Deserialised   10,000 axioms...

But no more axioms a deserialised before the application attempts to build the ontology. I think an exception is being swallowed somewhere because we should see:

Deserialised  10,000 axioms...
......
Deserialised  350,000 axioms...
351060 reference set members read from sct2_sRefset_OWLExpressionSnapshot_INT_20190731.txt

for the 20190731 Snomed International Edition. Which is what I get using -Xms4g.

I'm confident this will fix your issue @fanavarro. I hope that helps! Cheers.

fanavarro commented 4 years ago

Hi @kaicode, yes, it worked! I'm closing this issue since it is solved. Thanks!

kaicode commented 4 years ago

Thanks @fanavarro, I'm glad it's working for you now. Cheers.