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

/phenotype/info can miss some entities in result #201

Open
hlapp opened this issue Feb 23, 2020 · 5 comments
Open

/phenotype/info can miss some entities in result #201

hlapp opened this issue Feb 23, 2020 · 5 comments

Comments

@hlapp
Copy link
Member

hlapp commented Feb 23, 2020

I can't tell the extent of the problem, but there does seem to be one at least for some phenotypes of post-composed parts. The result seems to miss the entity in a part of which the quality inheres.

Here's an example phenotype ID:

curl -X GET "https://kb.phenoscape.org/api/phenotype/info?iri=http%3A%2F%2Fpurl.org%2Fphenoscape%2Fexpression%3Fvalue%3D%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000051%253E%2Bsome%2B%250A%2B%2B%2B%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FPATO_0000467%253E%250A%2B%2B%2B%2B%2Band%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FRO_0000052%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.org%252Fphenoscape%252Fsubclassof%253Fvalue%253D%25253Chttp%25253A%25252F%25252Fpurl.obolibrary.org%25252Fobo%25252FUBERON_0004529%25253E%25250A%252Band%252B%252528%25253Chttp%25253A%25252F%25252Fpurl.obolibrary.org%25252Fobo%25252FBFO_0000050%25253E%252Bsome%252B%25253Chttp%25253A%25252F%25252Fpurl.obolibrary.org%25252Fobo%25252FUBERON_2001239%25253E%252529%252301b01633-b7fc-4288-8cae-17687202c2ce%253E%2529%2529" -H "accept: application/json"

This returns the following:

{
  "@id": "http://purl.org/phenoscape/expression?value=%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FBFO_0000051%3E+some+%0A++++%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FPATO_0000467%3E%0A+++++and+%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0000052%3E+some+%3Chttp%3A%2F%2Fpurl.org%2Fphenoscape%2Fsubclassof%3Fvalue%3D%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0004529%253E%250A%2Band%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FBFO_0000050%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_2001239%253E%2529%2301b01633-b7fc-4288-8cae-17687202c2ce%3E%29%29",
  "label": "anatomical projection and (part_of some ceratobranchial 5 bone) present",
  "states": [
    {
      "@id": "http://purl.org/phenoscape/uuid/7bff76ab-063f-4ccb-86c2-6cf211b65321",
      "label": "Present",
      "character": {
        "@id": "http://purl.org/phenoscape/uuid/17b6c88a-8a43-4fd1-8e30-843e94178f3a",
        "label": "Ceratobranchial 5 bone, transversus ventralis V process"
      },
      "study": {
        "@id": "http://specifyassets.nhm.ku.edu/Ichthyology/originals/sp68693518805352821487.att.pdf",
        "label": "Mabee et al.  (2011)"
      }
    }
  ],
  "eqs": {
    "entities": [
      "http://purl.obolibrary.org/obo/UBERON_0010314",
      "http://purl.obolibrary.org/obo/UBERON_4100000"
    ],
    "qualities": [
      "http://purl.obolibrary.org/obo/PATO_0000467"
    ],
    "related_entities": []
  }
}

The entities returned are [structure with developmental contribution from neural crest] (http://purl.obolibrary.org/obo/UBERON_0010314) and skeletal element projection. ceratobranchial 5 bone is missing.

I can provide other examples if helpful. For example, the other phenotype for the above character state (absence of said process), has the same problem, but in that case in the list of "related_entities".

It's of course possible that the reason is that it's not annotated with ceratobranchial 5 bone in the first place, but that seems quite unlikely, especially given that the (presumably generated) label is in fact correct?

@balhoff
Copy link
Member

balhoff commented Mar 20, 2020

The problem here is that we have three fields being returned:

  • entities: what the phenotype inheres in
  • qualities: what the phenotype is a subclass of
  • related_entities: what the phenotype is towards

There isn't a search for or return slot for something the phenotype inheres_in_part_of. Do you think we should add this as another field? If we had kept entities just as things the phenotype is phenotype_of, these would be returned.

@balhoff balhoff added enhancement and removed bug labels Mar 20, 2020
@balhoff balhoff self-assigned this Mar 20, 2020
@hlapp
Copy link
Member Author

hlapp commented Mar 20, 2020

Perhaps it's best to define entities and related_entities to be defined based on inheres_in_part_of and towards_part_of, respectively. Due to reflexivity this would include inheres_in entities etc, right?

More generally speaking, either (current and proposed) approach is less than ideal. However, between including more – but still correct – information than the user might have wanted to ask for, and given an answer that's incomplete in non-obvious and non-fixable ways, I'd argue the former is better than the latter.

Or maybe add an optional parameter that switches from inheres_in to inheres_in_part_of for entities, and correspondingly for towards?

@balhoff
Copy link
Member

balhoff commented Mar 24, 2020

@hlapp what do you think about keeping entities and related_entities for those specific relations, and then another field phenotype_of which generalizes? It should include the terms in the other two, as well as extra.

@hlapp
Copy link
Member Author

hlapp commented Mar 24, 2020

Good idea!

@balhoff
Copy link
Member

balhoff commented Mar 26, 2020

I was wrong about phenotype_of—it does not include phenotype_of part_of. I will need to add a precomputed relation for that before this can be done.

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

No branches or pull requests

2 participants