e60c92aa698eb013b9a226d2d99e3aa719d91928 markd Wed Sep 13 17:56:43 2017 -0700 fixed link to Ensembl web site for GENCODE lift37 release diff --git src/hg/hgc/gencodeClick.c src/hg/hgc/gencodeClick.c index 2f7a2fa..2165890 100644 --- src/hg/hgc/gencodeClick.c +++ src/hg/hgc/gencodeClick.c @@ -217,32 +217,38 @@ #if UNUSED static void prTdExtIdAnchor(char *id, char *urlTemplate) /* print a table data element with an anchor for a id */ { printf("<td>"); prExtIdAnchor(id, urlTemplate); } #endif static void prEnsIdAnchor(char *id, char *urlTemplate) /* if an id to an ensembl or vega database is not empty, print an HTML anchor to it */ { if (!isEmpty(id)) { - char urlBuf[512]; - safef(urlBuf, sizeof(urlBuf), urlTemplate, getScientificNameSym(), id); + char idBuf[64], urlBuf[512]; + /* The lift37 releases append a '_N' modifier to the ids to indicate the are + * mapped. N is an integer mapping version. Don't include this in link if it exists. */ + safecpy(idBuf, sizeof(idBuf), id); + char *p = strchr(idBuf, '_'); + if (p != NULL) + *p = '\0'; + safef(urlBuf, sizeof(urlBuf), urlTemplate, getScientificNameSym(), idBuf); printf("<a href=\"%s\" target=_blank>%s</a>", urlBuf, id); } } static void prTdEnsIdAnchor(char *id, char *urlTemplate) /* print a table data element with an ensembl/vega anchor for a id */ { printf("<td>"); prEnsIdAnchor(id, urlTemplate); } static void prApprisTdAnchor(char *id, char *label, char *urlTemplate) /* print a gene or transcript link to APPRIS */ { // under bar separated, lower case species name.