2e9a42eb1791472834ee9e90467eab183e8586fc galt Fri Jan 10 01:30:43 2025 -0800 code review feedback. fixed compiler warning in hgc gencodeClick. diff --git src/hg/hgc/gencodeClick.c src/hg/hgc/gencodeClick.c index 73bbc43..cbdc71c 100644 --- src/hg/hgc/gencodeClick.c +++ src/hg/hgc/gencodeClick.c @@ -58,36 +58,44 @@ static char *apprisHomeUrl = "https://appris.bioinfo.cnio.es/#/"; static char *apprisGeneUrl = "https://appris.bioinfo.cnio.es/#/database/id/%s/%s?sc=ensembl"; // species-specific static char *hgncByIdUrl = "https://www.genenames.org/data/gene-symbol-report/#!/hgnc_id/%s"; static char *hgncBySymUrl = " https://www.genenames.org/data/gene-symbol-report/#!/symbol/%s"; static char *geneCardsUrl = "http://www.genecards.org/cgi-bin/carddisp.pl?gene=%s"; static char *mgiBySymUrl = "http://www.informatics.jax.org/quicksearch/summary?queryType=exactPhrase&query=%s"; static char *mgiByIdUrl = "http://www.informatics.jax.org/accession/%s"; static char* UNKNOWN = "unknown"; static boolean isGrcHuman() /* is this a GRC human assembly? */ { -bool result = FALSE; +//bool result = FALSE; +//if (startsWith("hg", database)) +// result = TRUE; +//else if (!startsWith("mm", database)) +// warn("BUG: gencodeClick on wrong database: %s", database); +//return result; + if (startsWith("hg", database)) - result = TRUE; -else if (!startsWith("mm", database)) - warn("BUG: gencodeClick on wrong database: %s", database); -return result; + return TRUE; +else if (startsWith("mm", database)) + return FALSE; +else + errAbort("BUG: gencodeClick on wrong database: %s", database); +return FALSE; // make compiler happy. errAbort should never return. } static bool haveGencodeTable(struct sqlConnection *conn, struct trackDb *tdb, char *tableBase) /* determine if a gencode table exists; it might be option or not in older releases */ { return sqlTableExists(conn, gencodeGetTableName(tdb, tableBase)); } static boolean isGrcH37Native(struct trackDb *tdb) /* Is this GENCODE GRCh37 native build, which requires a different Ensembl site. */ { // check for non-lifted GENCODE on GRCh37/hg19 if (sameString(database, "hg19")) return stringIn("lift37", gencodeGetVersion(tdb)) == NULL; else