{"action":"created","issue":{"url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/issues/24","labels_url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/issues/24/comments","events_url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/issues/24/events","html_url":"https://github.com/phenoscape/phenoscape-kb-services/issues/24","id":112622024,"number":24,"title":"API to obtain NeXML matrix for studies matching taxon or entity expression","user":{"login":"hlapp","id":51458,"avatar_url":"https://avatars.githubusercontent.com/u/51458?v=3","gravatar_id":"","url":"https://api.github.com/users/hlapp","html_url":"https://github.com/hlapp","followers_url":"https://api.github.com/users/hlapp/followers","following_url":"https://api.github.com/users/hlapp/following{/other_user}","gists_url":"https://api.github.com/users/hlapp/gists{/gist_id}","starred_url":"https://api.github.com/users/hlapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlapp/subscriptions","organizations_url":"https://api.github.com/users/hlapp/orgs","repos_url":"https://api.github.com/users/hlapp/repos","events_url":"https://api.github.com/users/hlapp/events{/privacy}","received_events_url":"https://api.github.com/users/hlapp/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/labels/holdup%20for%20client","name":"holdup for client","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-21T15:58:43Z","updated_at":"2015-10-22T19:59:13Z","closed_at":null,"body":"To better enable retrieving data from the KB that is suitable for comparative analysis, create an API that accepts (similar to the OntoTrace API) an OWL expression for selecting taxa and one for selecting entities, and that then returns the data matrices (presumably in NeXML format) for matching studies. A study matches if it includes one or more of the selected taxa, and one or more of the selected entities.\r\n\r\nPerhaps an optional \"strict\" interpretation could be that in order to match, studies must not include taxa or entities _not_ selected by the input expressions. (This is the same as requiring to include _only_ taxa and entities that were selected, but different from requiring to include _all_ taxa and entities that were selected - the latter would likely be impossible given that the taxon and entity ontologies encompass much more than any particular study ever would.)"},"comment":{"url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/issues/comments/150339212","html_url":"https://github.com/phenoscape/phenoscape-kb-services/issues/24#issuecomment-150339212","issue_url":"https://api.github.com/repos/phenoscape/phenoscape-kb-services/issues/24","id":150339212,"user":{"login":"hlapp","id":51458,"avatar_url":"https://avatars.githubusercontent.com/u/51458?v=3","gravatar_id":"","url":"https://api.github.com/users/hlapp","html_url":"https://github.com/hlapp","followers_url":"https://api.github.com/users/hlapp/followers","following_url":"https://api.github.com/users/hlapp/following{/other_user}","gists_url":"https://api.github.com/users/hlapp/gists{/gist_id}","starred_url":"https://api.github.com/users/hlapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlapp/subscriptions","organizations_url":"https://api.github.com/users/hlapp/orgs","repos_url":"https://api.github.com/users/hlapp/repos","events_url":"https://api.github.com/users/hlapp/events{/privacy}","received_events_url":"https://api.github.com/users/hlapp/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T19:59:13Z","updated_at":"2015-10-22T19:59:13Z","body":"> I guess you would want the initial service to return a list of publications. Then another service would return NeXML for a given publication ID.\r\n\r\nThat would be fine. Note though that from the perspective of the Rphenoscape use case, the intermediate step of returning a list of publications isn't necessary. I.e., there is currently no use case in Rphenoscape to return to its user a list of matching publications. (One could be constructed, I suppose, for text mining the abstracts or full text of those publications. But that's a hypothetical one right now.)\r\n\r\n> When returning a NeXML matrix for a publication, how much should it resemble the annotated source file in GitHub?\r\n\r\nWhat matters for the Rphenoscape-motivated use cases is to get a matrix that is useful for comparative trait analysis, with traits (and states) linked to ontology terms. How exactly it mirrors the NeXML file in the Github repo is unimportant.\r\n\r\nI suppose the initial web service that you plan that would return a list of matching publications could include links to the respective matrix digitization on Github. Then if a faithful reproduction of that file is what the user wants, they can retrieve it from there and don't need to query the KB. \r\n\r\n> Would it be better to store a mapping so that a link directly to that file could be provided for a given publication ID?\r\n\r\nI'm not sure what you mean by \"store a mapping\". But perhaps it's what I'm referring to above?\r\n\r\n> The EQ annotation format stored by Phenex would be a challenge to recreate from the database representation.\r\n\r\nI don't think there's a use case right now that requires that.\r\n\r\n> However, the OWL version of the annotation could be instead attached to character states in returned NeXML. \r\n\r\nYes, you can do that.\r\n\r\nAn alternative way is synthesizing the matrix. If we stay within a study, we know which phenotype annotations go together into a column - namely the ones attached to the states for the same character. States can decompose into multiple EQ annotations, so what was one column in the original matrix can become several columns in the matrix re-synthesized from its phenotype annotations. But we can group the phenotypes that originated from one column by entity-attribute, can't we?\r\n\r\n> Having different types of annotated NeXML files from Phenoscape could certainly be a source of confusion though.\r\n\r\nI don't think so, so long as you don't make promises in the documentation that the returned content should somehow be expected to be the same as the files in the Phenex file repo."}}