phenoscape / rphenoscape

R package to make phenotypic traits from the Phenoscape Knowledgebase available from within R.
https://rphenoscape.phenoscape.org/
Other
5 stars 5 forks source link

Add support for new dev v2-beta KB API #243

Closed johnbradley closed 2 years ago

johnbradley commented 2 years ago

There is a new API endpoint with some changes to the phenoscape KB API. This API replaces the corpus_graph=<IRI> parameter with corpus=taxa|states. The current URL for this API is: https://dev.phenoscape.org/api/v2-beta/

johnbradley commented 2 years ago

API changes to endpoints used in rphenoscape

New v2-beta Swagger Docs Old v2-beta Swagger Docs

/similarity/corpus_size

Change Required corpus_graph parameter was replaced by required corpus parameter. Values for corpus_graph were http://kb.phenoscape.org/sim/taxa and http://kb.phenoscape.org/sim/genes. Values for corpus are taxa and states.

rphenoscape usage https://github.com/phenoscape/rphenoscape/blob/6b59eda736431a8f25e08969eebe2dcbbf3c3150/R/term-weights.R#L166-L174

/similarity/matrix

Change Added optional corpus argument. Allowed values are taxa and states. NOTE: corpus is being changed to required!!

rphenoscape usage https://github.com/phenoscape/rphenoscape/blob/3ea9a2069f98bc29060a013a2191653d3c293b4c/R/semsim.R#L78-L81

/similarity/frequency

Change Required corpus_graph parameter was replaced by required corpus and type parameters. I think values for corpus_graph were http://kb.phenoscape.org/sim/taxa and http://kb.phenoscape.org/sim/genes. Values for corpus are taxa and states. Values for type are phenotype and anatomical_entity.

rphenoscape usage https://github.com/phenoscape/rphenoscape/blob/3ea9a2069f98bc29060a013a2191653d3c293b4c/R/term-weights.R#L66-L73

johnbradley commented 2 years ago

The (test-semsim.R:140:3): profile similarity with Resnik test started failing after upgrading to the new API. A 500 error was returned when POSTing 912 IRIs to /similarity/frequency. I created the following issue to track this problem: https://github.com/phenoscape/phenoscape-kb-services/issues/572

Example of the failure in github actions: https://github.com/phenoscape/rphenoscape/runs/7198952176?check_suite_focus=true#step:9:325

https://github.com/phenoscape/rphenoscape/blob/757b9a29b6cca80e2470a7866940b4d9be35f80c/tests/testthat/test-semsim.R#L133-L140

johnbradley commented 2 years ago

Two tests started failing due to missing sqs$entities in the response from /phenotype/info.

I created the following issue to track this problem: https://github.com/phenoscape/phenoscape-kb-services/issues/571

https://github.com/phenoscape/rphenoscape/runs/7198952349?check_suite_focus=true#step:9:288 https://github.com/phenoscape/rphenoscape/runs/7198952349?check_suite_focus=true#step:9:293

https://github.com/phenoscape/rphenoscape/blob/757b9a29b6cca80e2470a7866940b4d9be35f80c/tests/testthat/test-phenotypes.R#L153

https://github.com/phenoscape/rphenoscape/blob/757b9a29b6cca80e2470a7866940b4d9be35f80c/tests/testthat/test-phenotypes.R#L195

hlapp commented 2 years ago

@johnbradley I think this is complete now and can be closed, right?