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

Inconsistent data returned by the /classes endpoint #65

Open
mdorf opened this issue Apr 12, 2020 · 1 comment
Open

Inconsistent data returned by the /classes endpoint #65

mdorf opened this issue Apr 12, 2020 · 1 comment
Assignees
Labels

Comments

@mdorf
Copy link
Member

mdorf commented Apr 12, 2020

This does not happen with every ontology. But while running the new server_data_comparator script, I've discovered the following behavior:

https://stagedata.bioontology.org/ontologies/PDQ/classes?no_links=true&no_context=true&display=prefLabel,synonym,definition,submission&pagesize=30

If you look for the class: "http://purl.bioontology.org/ontology/PDQ/CDR0000660818, you will discover the following output (note that "definition" is missing):

{
	"prefLabel": "perindopril erbumine",
	"synonym": [
		"Coversyl"
	],
	"definition": [ ],
	"submission": "https://stagedata.bioontology.org/ontologies/PDQ/submissions/17",
	"@id": "http://purl.bioontology.org/ontology/PDQ/CDR0000660818",
	"@type": "http://www.w3.org/2002/07/owl#Class"
}

If you then change the order of the fields in the display parameter, the results come back with different fields populated. "definition" is now present, while "prefLabel" is null.

https://stagedata.bioontology.org/ontologies/PDQ/classes?no_links=true&no_context=true&display=synonym,definition,prefLabel,submission&pagesize=30

{
	"synonym": [
		"Coversyl"
	],
	"definition": [
		"The tert-butylamine salt of perindopril, the ethyl ester of a non-sulfhydryl angiotensin converting enzyme (ACE) inhibitor with antihypertensive activity. Upon hydrolysis, perindopril erbumine is converted to its active form perindoprilat, inhibiting ACE and the conversion of angiotensin I to angiotensin II; consequently, angiotensin II-mediated vasoconstriction and angiotensin II-stimulated aldosterone secretion from the adrenal cortex are inhibited and diuresis and natriuresis ensue. Check for \"https://www.cancer.gov/about-cancer/treatment/clinical-trials/intervention/C47666\" active clinical trials using this agent. (\"http://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI%20Thesaurus&code=C47666\" NCI Thesaurus)"
	],
	"prefLabel": null,
	"submission": "https://stagedata.bioontology.org/ontologies/PDQ/submissions/17",
	"@id": "http://purl.bioontology.org/ontology/PDQ/CDR0000660818",
	"@type": "http://www.w3.org/2002/07/owl#Class"
}

This class contains both the prefLabel and definition, which is evident by running this call:

https://data.bioontology.org/ontologies/PDQ/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FPDQ%2FCDR0000660818?no_links=true&no_context=true&display=prefLabel,synonym,definition,submission

{
	"prefLabel": "perindopril erbumine",
	"synonym": [
		"Coversyl"
	],
	"definition": [
		"The tert-butylamine salt of perindopril, the ethyl ester of a non-sulfhydryl angiotensin converting enzyme (ACE) inhibitor with antihypertensive activity. Upon hydrolysis, perindopril erbumine is converted to its active form perindoprilat, inhibiting ACE and the conversion of angiotensin I to angiotensin II; consequently, angiotensin II-mediated vasoconstriction and angiotensin II-stimulated aldosterone secretion from the adrenal cortex are inhibited and diuresis and natriuresis ensue. Check for \"https://www.cancer.gov/about-cancer/treatment/clinical-trials/intervention/C47666\" active clinical trials using this agent. (\"http://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI%20Thesaurus&code=C47666\" NCI Thesaurus)"
	],
	"submission": "http://data.bioontology.org/ontologies/PDQ/submissions/17",
	"@id": "http://purl.bioontology.org/ontology/PDQ/CDR0000660818",
	"@type": "http://www.w3.org/2002/07/owl#Class"
}

So, the order of the display parameters appears to affect the results, which should not be the case. This does not appear to be an issue across the board.

@mdorf
Copy link
Member Author

mdorf commented Apr 12, 2020

Here is another example with SNOMED (Term with ID: http://purl.bioontology.org/ontology/SNOMEDCT/773397000)

https://data.bioontology.org/ontologies/SNOMEDCT/classes?no_links=true&no_context=true&display=prefLabel,synonym,definition,submission&pagesize=30

Produces:

{
	"prefLabel": "Non-hypoproteinemic hypertrophic gastropathy",
	"synonym": [
		"Hypertrophic gastropathy without hypoproteinemia"
	],
	"definition": [ ],
	"submission": "http://data.bioontology.org/ontologies/SNOMEDCT/submissions/20",
	"@id": "http://purl.bioontology.org/ontology/SNOMEDCT/773397000",
	"@type": "http://www.w3.org/2002/07/owl#Class"
}

Where as:

https://data.bioontology.org/ontologies/SNOMEDCT/classes?no_links=true&no_context=true&display=synonym,definition,submission&pagesize=30

Produces:

{
	"synonym": [
		"Hypertrophic gastropathy without hypoproteinemia"
	],
	"definition": [
		"A rare gastroesophageal disease characterized by diffusely enlarged gastric folds, excessive mucus secretion, normal serum protein and gastric TGF-alpha levels. Patients typically present anemia, abdominal pain not related to eating or bowel habits and absence of peripheral edema."
	],
	"submission": "http://data.bioontology.org/ontologies/SNOMEDCT/submissions/20",
	"@id": "http://purl.bioontology.org/ontology/SNOMEDCT/773397000",
	"@type": "http://www.w3.org/2002/07/owl#Class"
}

The "definition" is absent in the first case and present in the second. The term itself contains both a prefLabel and definition:

https://data.bioontology.org/ontologies/SNOMEDCT/classes/http%3A%2F%2Fpurl.bioontology.org%2Fontology%2FSNOMEDCT%2F773397000?no_links=true&no_context=true&display=prefLabel,synonym,definition,submission&pagesize=30

{
	"prefLabel": "Non-hypoproteinemic hypertrophic gastropathy",
	"synonym": [
		"Hypertrophic gastropathy without hypoproteinemia"
	],
	"definition": [
		"A rare gastroesophageal disease characterized by diffusely enlarged gastric folds, excessive mucus secretion, normal serum protein and gastric TGF-alpha levels. Patients typically present anemia, abdominal pain not related to eating or bowel habits and absence of peripheral edema."
	],
	"submission": "http://data.bioontology.org/ontologies/SNOMEDCT/submissions/20",
	"@id": "http://purl.bioontology.org/ontology/SNOMEDCT/773397000",
	"@type": "http://www.w3.org/2002/07/owl#Class"
}

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