cca9be14d72ae015901148c46908374d4a99635a
chinhli
Fri Apr 11 13:18:55 2014 -0700
Remove the "NVBI book id" column from geneReviews detail page display.See Bob's note http://redmine.soe.ucsc.edu/issues/11226#note-27
in Track #11226 for more details.
diff --git src/hg/hgc/geneReviewsClick.c src/hg/hgc/geneReviewsClick.c
index 8b36a90..c2bbef7 100644
--- src/hg/hgc/geneReviewsClick.c
+++ src/hg/hgc/geneReviewsClick.c
@@ -1,112 +1,114 @@
/* geneReviewsClick - hgc code to display geneReviews track item detail page */
#include "common.h"
#include "hgc.h"
#include "geneReviewsClick.h"
void doGeneReviews(struct trackDb *tdb, char *itemName)
/* generate the detail page for geneReviews */
{
struct sqlConnection *conn = hAllocConn(database);
//char *table = tdb->table;
int start = cartInt(cart, "o");
int num = 4;
genericHeader(tdb, itemName);
genericBedClick(conn, tdb, itemName, start, num);
prGeneReviews(conn, itemName);
printf("
");
printTrackHtml(tdb);
hFreeConn(&conn);
}
void prGeneReviews(struct sqlConnection *conn, char *itemName)
/* print GeneReviews associated to this item
Note: this print function has been replaced by addGeneReviewToBed.pl
which print the same information to the field 5 of bigBed file
*/
{
struct sqlResult *sr;
char **row;
char query[512];
int i;
-char *clickMsg = "Click GR short name or NCBI Book id link to find the GeneReviews article.";
+char *clickMsg = "Click GR short name link to find the GeneReviews article on NCBI Bookshelf.";
char *spacer = " ";
boolean firstTime = TRUE;
if (!sqlTableExists(conn, "geneReviewsGeneGRshortNBKidGRtitle")) return;
sqlSafef(query, sizeof(query), "select grShort, NBKid, grTitle from geneReviewsGeneGRshortNBKidGRtitle where geneSymbol='%s'", itemName);
sr = sqlGetResult(conn, query);
while ((row = sqlNextRow(sr)) != NULL)
{
char *grShort = *row++;
char *NBKid = *row++;
char *grTitle = *row++;
if (firstTime)
{
printf("
GeneReviews available for %s: (%s)
",itemName,clickMsg);
firstTime = FALSE;
printf("
");
// #123456789-123456789-123456789-123456789-123456789-123456789-
- printf("GR short name NCBI Book id Disease name
");
+ printf("GR short name Disease name
");
- printf("------------------------------------------------------------");
+ printf("---------------------------------------------------------");
printf("--------------------
");
}
- printf("%s", grShort, grShort);
+ printf("%s", NBKid, grShort);
if (strlen(grShort) <= 20) {
for (i = 0; i < 20-strlen(grShort); i ++ )
{
printf("%s", " " );
}
}
- printf("%s%s%s
", NBKid, NBKid, spacer, grTitle);
+ printf("%s%s
", spacer, grTitle);
+
+// printf("%s%s%s
", NBKid, NBKid, spacer, grTitle);
} /* end while */
printf("");
sqlFreeResult(&sr);
} /* end of prGeneReviews */
void prGRShortRefGene(char *itemName)
/* print GeneReviews short label associated to this refGene item */
{
struct sqlConnection *conn = hAllocConn(database);
struct sqlResult *sr;
char **row;
char query[512];
boolean firstTime = TRUE;
if (!sqlTableExists(conn, "geneReviewsGeneGRshortNBKidGRtitle")) return;
sqlSafef(query, sizeof(query), "select grShort, NBKid, grTitle from geneReviewsGeneGRshortNBKidGRtitle where geneSymbol='%s'", itemName);
sr = sqlGetResult(conn, query);
while ((row = sqlNextRow(sr)) != NULL)
{
char *grShort = *row++;
char *NBKid = *row++;
char *grTitle = *row++;
if (firstTime)
{
printf("Related GeneReviews disease(s): ");
firstTime = FALSE;
printf("%s", grShort, grShort);
printf(" (");
printf("%s", NBKid, grTitle);
printf(")");
} else {
printf(", ");
printf("%s", grShort, grShort);
printf(" (");
printf("%s", NBKid, grTitle);
printf(")");
}
}
printf("