Skip to content

Conversation

@q4wen
Copy link
Collaborator

@q4wen q4wen commented May 25, 2018

Landing page now can accept query token in the form of <database name>: <id>

http://appsbeta.pathwaycommons.org/search?gt=0&lt=250&q=hgnc:ATM&type=Pathway and
http://appsbeta.pathwaycommons.org/search?gt=0&lt=250&q=ATM&type=Pathway will have same result.

Ref: #702

const splitId=id.split(':');

//Parse the query based on the format
if(/uniprot:\w+$/.test(id)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make case insensitive

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i.e. the prefix part (id is case-sensitive)

body:JSON.stringify(query)
}).then(res => res.json()).then(ids=> _.assign(ids,{unrecognized:_.tail(ids.unrecognized)}));//remove padding
if(query.genes.length>=1){
query.genes= query.genes;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Necessary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jeff, what do you mean by 'necessary'?

Copy link
Member

@jvwong jvwong May 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm referring to line 35 query.genes= query.genes;. Isn't this assigning a variable reference to itself?

Copy link
Member

@jvwong jvwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One addition: For viewing interactions link, use 'HGNC Approved Symbol' as the source url parameters rather than NCBI Gene IDs. That is, in landing-box.js:

const landingBox = (props) => {
  ...
        interactionsLink(box.databaseID,'View Interactions')
     ...
  return h('div.search-landing',landingHTML);
};
...

box.databaseID should always be HGNC approved symbol.

@jvwong jvwong requested a review from IgorRodchenkov May 26, 2018 16:19
@IgorRodchenkov
Copy link
Member

Please, do not insert word "approved" into "HGNC Symbol" (official primary name for that resource, ID type) anywhere.

q4wen added 2 commits May 28, 2018 10:45
1. Format validator is now case insensitive (ps: this function only validate the format of query, so whether the id is case-sensitive does not affect the output)

2. Links to interation pages now use HGNC symbol rather than NCBI Gene ID
Copy link
Member

@IgorRodchenkov IgorRodchenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@jvwong jvwong merged commit 62d4971 into PathwayCommons:development May 28, 2018
@IgorRodchenkov
Copy link
Member

Ah, Jeff was quick to merge this before me (I was just testing...) Great!

@PathwayCommons PathwayCommons deleted a comment from q4wen May 28, 2018
@PathwayCommons PathwayCommons locked as resolved and limited conversation to collaborators May 28, 2018
@q4wen q4wen deleted the databaseLabels branch June 19, 2018 17:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants