Skip to content

Conversation

@IgorRodchenkov
Copy link
Member

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).

@IgorRodchenkov IgorRodchenkov requested review from d2fong and jvwong May 22, 2018 17:06
@IgorRodchenkov
Copy link
Member Author

Fixes #764

const params = {
source : sources,
pattern : ['controls-phosphorylation-of','in-complex-with','controls-expression-of', 'interacts-with'],
kind : sources.length>1 ? 'pathsbetween' : 'neighborhood',
Copy link
Member

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'?

Copy link
Member Author

@IgorRodchenkov IgorRodchenkov May 23, 2018

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).

@IgorRodchenkov
Copy link
Member Author

IgorRodchenkov commented May 23, 2018

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)
Copy link
Member

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?

Copy link
Member Author

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 =>
Copy link
Member

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?

Copy link
Member Author

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.)
@IgorRodchenkov
Copy link
Member Author

I am curious, who named a branch 'garbage-pc-search'? So untrue and hurts for some reason :/

@IgorRodchenkov IgorRodchenkov merged commit 03a549e into development May 24, 2018
@IgorRodchenkov IgorRodchenkov deleted the issue_764_etc branch May 24, 2018 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants