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

Bug in /similarity/frequency? #191

Closed
hlapp opened this issue Feb 15, 2020 · 3 comments
Closed

Bug in /similarity/frequency? #191

hlapp opened this issue Feb 15, 2020 · 3 comments
Assignees

Comments

@hlapp
Copy link
Member

hlapp commented Feb 15, 2020

The following phenotype is linked to 4 taxa:

Phenotype 'basibranchial 2 bone interlocked with basihyal bone'
Linked to states:
                                                                                                                label
1 second basibranchial  present but reduced, posteriorly acuminate, and interlocked with first basibranchial+basihyal
                                                                                                      character.label
1 second basibranchial  present but reduced, posteriorly acuminate, and interlocked with first basibranchial+basihyal
                 study.label
1 Rosen and Greenwood (1976)

Entities:
    basibranchial 2 bone <http://purl.obolibrary.org/obo/UBERON_2001224>
Qualities:
    interlocked with <http://purl.obolibrary.org/obo/PATO_0002437>
Towards:
    basihyal bone <http://purl.obolibrary.org/obo/UBERON_0011618>
Exhibited by taxa:
                                          id                label
1 http://purl.obolibrary.org/obo/VTO_0071648    Monopterus boueti
2 http://purl.obolibrary.org/obo/VTO_0053650    Monopterus cuchia
3 http://purl.obolibrary.org/obo/VTO_0053654 Monopterus fossorius
4 http://purl.obolibrary.org/obo/VTO_0071645   Monopterus indicus

However, the /similarity/frequency endpoint fails to return any result for it (using the taxa corpus). @balhoff can you remind me why that is, and why that's expected? I assume the reason is that it is not propagated to any taxon profile?

curl -X GET "https://kb.phenoscape.org/api/similarity/frequency?terms=%5B%22http%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_0002437%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.obolibrary.org%252Fobo%252FUBERON_2001224%253E%2529%250A%2B%2B%2B%2B%2Band%2B%2528%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FRO_0002503%253E%2Bsome%2B%253Chttp%253A%252F%252Fpurl.obolibrary.org%252Fobo%252FUBERON_0011618%253E%2529%2529%22%5D&corpus_graph=http%3A%2F%2Fkb.phenoscape.org%2Fsim%2Ftaxa" -H "accept: text/csv"
@hlapp hlapp added the question label Feb 15, 2020
@hlapp
Copy link
Member Author

hlapp commented Feb 15, 2020

Also, if the count really should be zero, shouldn't the value retuned be zero, not nothing?

@hlapp hlapp added the bug label Feb 15, 2020
@hlapp
Copy link
Member Author

hlapp commented Feb 16, 2020

The same problem occurs for the following phenotype, which at least appears to have a more complex taxon distribution:

> phens[16,"id"]
[1] "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_0002279%3E%0A+++++and+%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0000052%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_0011618%3E%29%0A+++++and+%28%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FRO_0002503%3E+some+%3Chttp%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FUBERON_2001223%3E%29%29"
> as.phenotype(phens[16,"id"])
Phenotype 'basihyal bone tightly articulated with basibranchial 1 bone'
Linked to states:
                                        label
1 basihyal ankylosed with first basibranchial
                              character.label                study.label
1 basihyal ankylosed with first basibranchial Rosen and Greenwood (1976)

Entities:
    basihyal bone <http://purl.obolibrary.org/obo/UBERON_0011618>
Qualities:
    tightly articulated with <http://purl.obolibrary.org/obo/PATO_0002279>
Towards:
    basibranchial 1 bone <http://purl.obolibrary.org/obo/UBERON_2001223>
> as.phenotype(phens[16,"id"], withTaxa = TRUE)$taxa
                                           id                    label
1  http://purl.obolibrary.org/obo/VTO_0071642      Macrotrema caligans
2  http://purl.obolibrary.org/obo/VTO_0053649         Monopterus albus
3  http://purl.obolibrary.org/obo/VTO_0071648        Monopterus boueti
4  http://purl.obolibrary.org/obo/VTO_0053650        Monopterus cuchia
5  http://purl.obolibrary.org/obo/VTO_0071650        Monopterus eapeni
6  http://purl.obolibrary.org/obo/VTO_0053654     Monopterus fossorius
7  http://purl.obolibrary.org/obo/VTO_0071645       Monopterus indicus
8  http://purl.obolibrary.org/obo/VTO_0053645 Ophisternon aenigmaticum
9  http://purl.obolibrary.org/obo/VTO_0071653        Ophisternon afrum
10 http://purl.obolibrary.org/obo/VTO_0053646   Ophisternon bengalense
11 http://purl.obolibrary.org/obo/VTO_0071654     Ophisternon candidum
12 http://purl.obolibrary.org/obo/VTO_0071655    Ophisternon gutturale
13 http://purl.obolibrary.org/obo/VTO_0071652    Ophisternon infernale
14 http://purl.obolibrary.org/obo/VTO_0071657     Synbranchus madeirae
15 http://purl.obolibrary.org/obo/VTO_0053643   Synbranchus marmoratus

hlapp added a commit to phenoscape/rphenoscape that referenced this issue Feb 18, 2020
Note that not all corpora are supported in the KB API yet. Specifically,
support for the "gene_annotations" corpus is pending in the API
(see phenoscape/phenoscape-kb-services#146 and phenoscape/phenoscape-kb-services#189),
and at least presently there are some issues in the KB API for the "genes"
corpus (see phenoscape/phenoscape-kb-services#191 and
phenoscape/phenoscape-kb-services#192).
@hlapp
Copy link
Member Author

hlapp commented Feb 18, 2020

Show this issue's status in phenoscape/rphenoscape#139.

@balhoff balhoff self-assigned this Mar 26, 2020
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