Skip to content

Commit cdc3b9e

Browse files
committed
Query parser and interatction link update
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
1 parent 322211b commit cdc3b9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/client/features/search/landing-box.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ const getLandingResult= (query)=> {
131131
const splitId=id.split(':');
132132

133133
//Parse the query based on the format
134-
if(/uniprot:\w+$/.test(id)) {
134+
if(/uniprot:\w+$/i.test(id)) {
135135
uniprotIds[splitId[1]]=splitId[1];
136-
} else if(/(ncbi:[0-9]+|hgnc:\w+)$/.test(id)) {
136+
} else if(/(ncbi:[0-9]+|hgnc:\w+)$/i.test(id)) {
137137
labeledId[splitId[1]]=splitId[1];
138138
genesToSearch.push(splitId[1]);
139139
} else {
@@ -267,7 +267,7 @@ const landingBox = (props) => {
267267
h('div.search-landing-section',{key: 'ids'},[hgncSymbol,otherNames]),
268268
h('div.search-landing-section',{key: 'functions'},[functions]),
269269
h('div.search-landing-section',{key: 'links'},[links]),
270-
interactionsLink(box.databaseID,'View Interactions')
270+
interactionsLink(box.hgncSymbol,'View Interactions')
271271
])
272272
];
273273
});

0 commit comments

Comments
 (0)