94c06184a32f9465b63c0dc812d8914e0993127e markd Mon Oct 15 13:21:03 2018 -0700 fixed link to APPRIS server (#21852) diff --git src/hg/hgc/gencodeClick.c src/hg/hgc/gencodeClick.c index 2496784..746b8f3 100644 --- src/hg/hgc/gencodeClick.c +++ src/hg/hgc/gencodeClick.c @@ -37,33 +37,32 @@ /* Various URLs and URL templates. At one time, these were in the ra file, * but that didn't prove that helpful and end up requiring updated the ra * files for every GENCODE version if a URL was added or changed. */ //FIXME: clean up RA files when CGIs no longer need them static char *gencodeBiotypesUrl = "http://www.gencodegenes.org/gencode_biotypes.html"; static char *gencodeTagsUrl = "http://www.gencodegenes.org/gencode_tags.html"; static char *ensemblTranscriptIdUrl = "http://www.ensembl.org/%s/Transcript/Summary?db=core;t=%s"; static char *ensemblGeneIdUrl = "http://www.ensembl.org/%s/Gene/Summary?db=core;t=%s"; static char *ensemblProteinIdUrl = "http://www.ensembl.org/%s/Transcript/ProteinSummary?db=core;t=%s"; static char *ensemblSupportingEvidUrl = "http://www.ensembl.org/%s/Transcript/SupportingEvidence?db=core;t=%s"; static char *vegaTranscriptIdUrl = "http://vega.sanger.ac.uk/%s/Transcript/Summary?db=core;t=%s"; static char *vegaGeneIdUrl = "http://vega.sanger.ac.uk/%s/Gene/Summary?db=core;g=%s"; static char *yalePseudoUrl = "http://tables.pseudogene.org/%s"; static char *hgncUrl = "http://www.genenames.org/data/hgnc_data.php?match=%s"; static char *geneCardsUrl = "http://www.genecards.org/cgi-bin/carddisp.pl?gene=%s"; -static char *apprisHomeUrl = "http://appris.bioinfo.cnio.es/"; -static char *apprisGeneUrl = "http://appris.bioinfo.cnio.es/report.html?id=%s&namespace=Ensembl_Gene_Id&specie=%s"; -static char *apprisTranscriptUrl = "http://appris.bioinfo.cnio.es/report.html?id=%s&namespace=Ensembl_Transcript_Id&specie=%s"; +static char *apprisHomeUrl = "http://appris-tools.org/"; +static char *apprisGeneUrl = "http://appris-tools.org/#/database/id/%s/%s?sc=ensembl"; static char *getBaseAcc(char *acc, char *accBuf, int accBufSize) /* get the accession with version number dropped. */ { safecpy(accBuf, accBufSize, acc); char *dot = strchr(accBuf, '.'); if (dot != NULL) *dot = '\0'; return accBuf; } static bool haveGencodeTable(struct trackDb *tdb, char *tableBase) /* determine if table is in settings and thus in this gencode release */ { return trackDbSetting(tdb, tableBase) != NULL; @@ -263,31 +262,31 @@ { printf(""); 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. char *speciesArg = hScientificName(database); toLowerN(speciesArg, strlen(speciesArg)); subChar(speciesArg, ' ', '_'); char accBuf[64]; printf("%s", label); freeMem(speciesArg); } static void writePosLink(char *chrom, int chromStart, int chromEnd) /* write link to a genomic position */ { printf("%s:%d-%d", hgTracksPathAndSettings(), database, chrom, chromStart, chromEnd, chrom, chromStart+1, chromEnd); } static bool geneHasApprisTranscripts(struct trackDb *tdb, struct sqlConnection *conn, struct wgEncodeGencodeAttrs *transAttrs) /* check if any transcript in a gene has an APPRIS tags */ @@ -325,33 +324,34 @@ return buf; } static void writeAprrisRow(struct sqlConnection *conn, struct trackDb *tdb, struct wgEncodeGencodeAttrs *transAttrs, struct wgEncodeGencodeTag *tags) /* write row for APPRIS */ { // Get labels to use. if transcript has an appris tag, then we link to the transcript. // if it doesn;t have a appris tag, we can still link to the gene if any of the transcripts // have appris tags char* apprisTag = findApprisTag(tags); char* transLabel = (apprisTag != NULL) ? apprisTagToSymbol(apprisTag) : NULL; char *geneLabel = ((apprisTag != NULL) || geneHasApprisTranscripts(tdb, conn, transAttrs)) ? transAttrs->geneName : NULL; +// APPRIS gene and transcript now go to the same location printf("APPRIS\n", apprisHomeUrl); if (transLabel != NULL) - prApprisTdAnchor(transAttrs->transcriptId, transLabel, apprisTranscriptUrl); + prApprisTdAnchor(transAttrs->geneId, transLabel, apprisGeneUrl); else printf(" "); if (geneLabel != NULL) prApprisTdAnchor(transAttrs->geneId, geneLabel, apprisGeneUrl); else printf(" "); printf("\n"); } static void writeBasicInfoHtml(struct sqlConnection *conn, struct trackDb *tdb, char *gencodeId, struct genePred *transAnno, struct wgEncodeGencodeAttrs *transAttrs, int geneChromStart, int geneChromEnd, struct wgEncodeGencodeGeneSource *geneSource, struct wgEncodeGencodeTranscriptSource *transcriptSource, struct wgEncodeGencodeTag *tags, bool haveTsl, struct wgEncodeGencodeTranscriptionSupportLevel *tsl) /* write basic HTML info for all genes */