- 
                Notifications
    You must be signed in to change notification settings 
- Fork 17
Issue 764 etc #778
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
Issue 764 etc #778
Conversation
…client) npm module; not finished yet (fails)
…m/PathwayCommons/app-ui into issue_764_etc # Conflicts: # src/client/features/interactions/index.js
| Fixes #764 | 
| const params = { | ||
| source : sources, | ||
| pattern : ['controls-phosphorylation-of','in-complex-with','controls-expression-of', 'interacts-with'], | ||
| kind : sources.length>1 ? 'pathsbetween' : 'neighborhood', | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the case that 'pathsbetween' will not return 'interacts-with'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My changes (using one universal new method ServerAPI.pcQuery instead of ServerAPI.getNeighborhood): bc43b13#diff-48d6e306661f0412cd8851fd566e8bba
ServerAPI.getNeighborhood (removed by bc43b13#diff-0e447967aaeb299d989022e921439ad2) used the same graph query parameters.
No, these changes have nothing to do with the other issue about and pathsbetween, which never finds interacts-with due its implementation in java (Paxtools/pattern).
| Ah, let me fix a bug in pc queries to download pathway data in different formats (SIF, BioPAX, etc.) from the right panel... Please wait, don't merge this PR. | 
| ServerAPI.datasources() | ||
| .then(result => { | ||
| this.setState({ | ||
| dataSources: Object.values(result).filter(ds => ds.hasPathways==true) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasPathways new in PC v10?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it was always returned for each datasource in the array - by  /pc2/metadata/datasources query.
I just added this filed to the server-side pc code (https://github.com/PathwayCommons/app-ui/blob/issue_764_etc/src/server/pathway-commons/index.js#L107) and can filter as shown above.
PS:
note that internal pc client module is now just one file: src/server/pathway-commons/index.js, and there is no 'pathway-commons' import from npm.
| .then(id=> _.words(id.traverseEntry[0].value[0]).length===1 ? id.traverseEntry[0].value[0].split('_')[0] : ''): | ||
| source.replace(/\//g,' ') | ||
| //get ids from uris | ||
| const geneIds = sources.map(source => | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What case was this traverse trying to handle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It says "get ids from uris" in the comment line above that code (if, e.g., an uri is standard PR's uri, I bet); @logmosier can comment on exact purpose of this. I did not change the purpose of this code. It would be great to have more comments in the code, in many places.
PS(other): - (interactions) queries like /pc-client/graph?source=9241 should use gene symbol instead id; - there are many errors on the sbgn views and sif like "Edge `Complex_9fb32941a08115fc12311985e436d989--to--Transport_feac0a7c834893e7b53f8f0bcfcfde40_LEFT_TO_RIGHT` has invalid endpoints and so it is impossible to draw...", which I guess are not related to changes in this branch (cytoscape.js model, dependencies?... might I am wrong.)
…into issue_764_etc
| I am curious, who named a branch 'garbage-pc-search'? So untrue and hurts for some reason :/ | 
Implemented PC_URL environment option made other improvements, such as simplified PC web service queries - pathway-commons-client (npm) module is not required anymore, and the pc client code is now simpler and reused better.
Also implemented one solution for #761 (see my comments there).