Skip to content

PC Service at /validate/xref is not available #1479

@jvwong

Description

@jvwong

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions