-
Couldn't load subscription status.
- Fork 17
Description
The app tries to access /api/pc/xref2uri, ostensibly to retrieve properly formatted entity xrefLinks that are used to create hypertext for entities in the UI (e.g. to UniProt), but the service is returning Bad Gateway. The result of this in the app is that no gene information (or links) are shown.
e.g. POST http://localhost:3000/api/pc/xref2uri
with JSON body:
{
"query": {
"name": "uniprot",
"localId": "P04637"
}
}Actual result is : Bad Gateway : https://www.pathwaycommons.org/validate/xref
Expected result is a JSON response with the following:
{
"namespace": "uniprot",
"uri": "https://bioregistry.io/uniprot:P04637"
}
Quick and easy solution: manually create these xreLinks, which is already done within the ncbi.js service:
app-ui/src/server/external-services/ncbi.js
Lines 151 to 167 in 70d267b
| const createUri = ( namespace, localId ) => IDENTIFIERS_URL + '/' + namespace + ':' + localId; | |
| const rawMakeSummary = (ent) => { | |
| const xrefLinks = []; | |
| const uid = ent.uid; | |
| // Fetch external database links first | |
| const localId = _.get( ent, 'name'); | |
| if( localId ){ | |
| [ NS_HGNC_SYMBOL, NS_GENECARDS ].forEach( namespace => { | |
| xrefLinks.push({ | |
| namespace: namespace, | |
| uri: createUri( namespace, localId ) | |
| }); | |
| }); | |
| } |
Links