78349c78059d29f80919916fdbf82416333fd473 chinhli Fri Apr 11 16:20:24 2014 -0700 Feed back from CR #13033Rename geneReviewsGeneGRshortNBKidGRtitle to geneReviewsDetail Add a comment in the geneReviewsGrshortNBKid.sql and geneReviewsGrshortTitleNBKid.sql to let reader know they are temp files used by track build. diff --git src/hg/hgGene/geneReviews.c src/hg/hgGene/geneReviews.c index c2acafd..e82eb41 100644 --- src/hg/hgGene/geneReviews.c +++ src/hg/hgGene/geneReviews.c @@ -1,85 +1,85 @@ /* GeneReviews - print out GeneReviews for this gene. */ #include "common.h" #include "hash.h" #include "hdb.h" #include "linefile.h" #include "dystring.h" #include "hgGene.h" static void geneReviewsPrint(struct section *section, struct sqlConnection *conn, char *itemName) /* print GeneReviews short label associated to this refGene item */ { char query[256]; char * geneSymbol; -if (sqlTableExists(conn, "geneReviewsGeneGRshortNBKidGRtitle")) +if (sqlTableExists(conn, "geneReviewsDetail")) { sqlSafef(query, sizeof(query), "select geneSymbol from kgXref where kgId = '%s'", itemName); geneSymbol = sqlQuickString(conn, query); if (geneSymbol != NULL) { prGRShortKg(conn,geneSymbol); } else { hPrintf("<B>No GeneReview for this gene </B><BR>" ); } } } void prGRShortKg(struct sqlConnection *conn, char *itemName) /* print GeneReviews short label associated to this refGene item */ { struct sqlResult *sr; char **row; char query[512]; boolean firstTime = TRUE; -sqlSafef(query, sizeof(query), "select geneSymbol, grShort, NBKid, grTitle from geneReviewsGeneGRshortNBKidGRtitle where geneSymbol='%s'", itemName); +sqlSafef(query, sizeof(query), "select geneSymbol, grShort, NBKid, grTitle from geneReviewsDetail where geneSymbol='%s'", itemName); sr = sqlGetResult(conn, query); while ((row = sqlNextRow(sr)) != NULL) { if (firstTime) { printf("<B>GeneReviews article(s) related to gene </B>%s:<BR>", row[0]); firstTime = FALSE; } - printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/books/n/gene/%s\" TARGET=_blank><B>%s</B></A>",row[1], row[1]); + printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/books/%s\" TARGET=_blank><B>%s</B></A>",row[2], row[1]); printf(" ("); printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/books/%s\" TARGET=_blank>%s</A>", row[2], row[3]); printf(")<BR>"); } sqlFreeResult(&sr); } static boolean geneReviewsExists(struct section *section, struct sqlConnection *conn, char *geneId) -/* Return TRUE if geneReviewsGeneGRshortNBKidGRtitle table exist and have GeneReviews articles +/* Return TRUE if geneReviewsDetail table exist and have GeneReviews articles * on this one. */ { char query[256]; char * geneSymbol; char * grSymbol; -if (sqlTableExists(conn, "geneReviewsGeneGRshortNBKidGRtitle")) +if (sqlTableExists(conn, "geneReviewsDetail")) { sqlSafef(query, sizeof(query), "select geneSymbol from kgXref where kgId = '%s'", geneId); geneSymbol = sqlQuickString(conn, query); if (geneSymbol != NULL) { - sqlSafef(query, sizeof(query), "select geneSymbol from geneReviewsGeneGRshortNBKidGRtitle where geneSymbol='%s'", geneSymbol); + sqlSafef(query, sizeof(query), "select geneSymbol from geneReviewsDetail where geneSymbol='%s'", geneSymbol); grSymbol = sqlQuickString(conn, query); if (grSymbol != NULL) { return TRUE; } } } return FALSE; } struct section *geneReviewsSection(struct sqlConnection *conn, struct hash *sectionRa) /* Create geneReviews section. */ { struct section *section = sectionNew(sectionRa, "geneReviews");