91c7dfbd21a1418f9030314f86719672fa33e6dd
chinhli
Wed Sep 21 11:41:18 2011 -0700
Complete switch over to use bigBed trick
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index b342e6e..9f6a55a 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -9766,31 +9766,31 @@
printf("Related UCSC Gene(s): ");
else
printf(", ");
printf("", "../cgi-bin/hgGene?hgg_gene=", row[0]);
printf("%s", row[0]);
printedCnt++;
}
if (printedCnt >= 1) printf("
\n");
}
sqlFreeResult(&sr);
// show GeneReviews link(s)
if (sqlTablesExist(conn, "geneReviewsRefGene"))
{
safef(query, sizeof(query),
- "select distinct r.name2 from refLink l, mim2gene g, refGene r where l.omimId=%s and g.geneId=l.locusLinkId and g.entryType='gene' and chrom='%s' and txStart = %s and txEnd= %s",
+ "select distinct r.name2 from refLink l, omim2gene g, refGene r where l.omimId=%s and g.geneId=l.locusLinkId and g.entryType='gene' and chrom='%s' and txStart = %s and txEnd= %s",
itemName, chrom, chromStart, chromEnd);
sr = sqlMustGetResult(conn, query);
if (sr != NULL)
{
while ((row = sqlNextRow(sr)) != NULL)
{
prGRShortRefGene(row[0]);
}
}
sqlFreeResult(&sr);
}
}
printf("
");
@@ -23855,37 +23855,41 @@
{
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 */
+/* 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 'Short name' link below to search GeneReviews";
+char *clickMsg = "Click link(s) below to search GeneReviews and GeneTests";
boolean firstTime = TRUE;
safef(query, sizeof(query), "select grShort, diseaseID, diseaseName from geneReviewsRefGene where geneSymbol='%s'", itemName);
sr = sqlGetResult(conn, query);
while ((row = sqlNextRow(sr)) != NULL)
{
char *grShort = *row++;
char *diseaseID = *row++;
char *diseaseName = *row++;
if (firstTime)
{
printf("
GeneReview(s) available for %s: (%s)
",itemName,clickMsg);
firstTime = FALSE;
@@ -25154,31 +25158,31 @@
{
doT2gDetails(tdb, item);
}
else if (tdb != NULL && startsWith("bedDetail", tdb->type))
{
doBedDetail(tdb, NULL, item);
}
else if (startsWith("numtS", table))
{
doNumtS(tdb, item);
}
else if (startsWith("cosmic", table))
{
doCosmic(tdb, item);
}
-else if (startsWith("geneReviews", table))
+else if (sameString("geneReviews", table))
{
doGeneReviews(tdb, item);
}
else if (tdb != NULL)
{
genericClickHandler(tdb, item, NULL);
}
else
{
cartWebStart(cart, database, "%s", track);
printf("Sorry, clicking there doesn't do anything yet (%s).", track);
}
/* End of 1000+ line dispatch on table involving 100+ if/elses. */
if (didCartHtmlStart)