e73145dcb7ee87d0423dd3d19dd93fb42597920a galt Mon Oct 16 17:04:53 2017 -0700 Removing further broken gad links in hgc. refs #20317 diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index df7e8ec..a887236 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -9707,66 +9707,63 @@ printTrackHtml(tdb); } void printGadDetails(struct trackDb *tdb, char *itemName, boolean encode) /* Print details of a GAD entry. */ { int refPrinted = 0; boolean showCompleteGadList; struct sqlConnection *conn = hAllocConn(database); char query[256]; struct sqlResult *sr; char **row; char *chrom, *chromStart, *chromEnd; struct dyString *currentCgiUrl; -char *upperDisease; char *diseaseClass; -char *upperItemName; char *url = tdb->url; if (url != NULL && url[0] != 0) { showCompleteGadList = FALSE; if (cgiOptionalString("showAllRef") != NULL) { if (sameWord(cgiOptionalString("showAllRef"), "Y") || sameWord(cgiOptionalString("showAllRef"), "y") ) { showCompleteGadList = TRUE; } } currentCgiUrl = cgiUrlString(); printf("

Gene %s: ", itemName); sqlSafef(query, sizeof(query), "select geneName from gadAll where geneSymbol='%s';", itemName); sr = sqlMustGetResult(conn, query); row = sqlNextRow(sr); if (row != NULL)printf("%s", row[0]); printf("

"); sqlFreeResult(&sr); printf("Genetic Association Database: "); - printf("", url, itemName); - printf("%s\n", itemName); + printf("%s\n", itemName); printf("
CDC HuGE Published Literature: "); printf("", itemName); - printf("%s\n", itemName); + printf("%s\n", itemName); sqlSafef(query, sizeof(query), "select distinct g.omimId, o.title from gadAll g, hgFixed.omimTitle o where g.geneSymbol='%s' and g.omimId <>'.' and g.omimId=o.omimId", itemName); sr = sqlMustGetResult(conn, query); row = sqlNextRow(sr); if (row != NULL) printf("
OMIM: "); while (row != NULL) { printf("", "https://www.ncbi.nlm.nih.gov/omim/", row[0]); printf("%s %s\n", row[0], row[1]); row = sqlNextRow(sr); } sqlFreeResult(&sr); @@ -9791,53 +9788,38 @@ diseaseClass = row[0]; printf(", %s", diseaseClass); row = sqlNextRow(sr); } sqlFreeResult(&sr); /* List diseases associated with the gene */ sqlSafef(query, sizeof(query), "select distinct broadPhen from gadAll where geneSymbol='%s' and association = 'Y' order by broadPhen;", itemName); sr = sqlMustGetResult(conn, query); row = sqlNextRow(sr); if (row != NULL) { - upperDisease = replaceChars(row[0], "'", "''"); - touppers(upperDisease); printf("
Positive Disease Associations: "); - - printf("", "%25'%20AND%20upper(GENE)%20%20like%20'%25", upperItemName, "%25'"); - printf("%s\n", row[0]); + printf("%s\n", row[0]); row = sqlNextRow(sr); } while (row != NULL) { - upperDisease = replaceChars(row[0], "'", "''"); - touppers(upperDisease); - printf(", ", - "http://geneticassociationdb.nih.gov/cgi-bin/tableview.cgi?table=allview&cond=upper(DISEASE)%20like%20'%25", - cgiEncode(upperDisease), "%25'%20AND%20upper(GENE)%20%20like%20'%25", itemName, "%25'"); - printf("%s\n", row[0]); + printf(", %s\n", row[0]); row = sqlNextRow(sr); } sqlFreeResult(&sr); refPrinted = 0; sqlSafef(query, sizeof(query), "select broadPhen,reference,title,journal, pubMed, conclusion from gadAll where geneSymbol='%s' and association = 'Y' and title != '' order by broadPhen", itemName); sr = sqlMustGetResult(conn, query); row = sqlNextRow(sr); if (row != NULL) printf("

Related Studies:
    "); while (row != NULL) { printf("
  1. %s ", row[0]);