src/hg/hgc/hgc.c 1.1562
1.1562 2009/07/28 08:56:19 aamp
Added stuff for first cut of the UW Southerns track.
Index: src/hg/hgc/hgc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgc/hgc.c,v
retrieving revision 1.1561
retrieving revision 1.1562
diff -b -B -U 4 -r1.1561 -r1.1562
--- src/hg/hgc/hgc.c 24 Jul 2009 04:20:10 -0000 1.1561
+++ src/hg/hgc/hgc.c 28 Jul 2009 08:56:19 -0000 1.1562
@@ -3416,8 +3416,13 @@
printTrackHtml(tdb);
hFreeConn(&conn);
}
+void doImageItemBed(struct trackDb *tdb, char *item)
+/* Print bed plus an image */
+{
+}
+
void doChromGraph(struct trackDb *tdb)
/* Print information for coloredExon type tracks. */
{
genericHeader(tdb, NULL);
@@ -3431,9 +3436,9 @@
char *dupe, *type, *words[16], *headerItem;
int wordCount;
int start = cartInt(cart, "o");
struct sqlConnection *conn = hAllocConn(database);
-
+char *imagePath = trackDbSettingClosestToHome(tdb, ITEM_IMAGE_PATH);
if (itemForUrl == NULL)
itemForUrl = item;
dupe = cloneString(tdb->type);
@@ -3565,8 +3570,22 @@
{
doAltGraphXDetails(tdb,item);
}
}
+if (imagePath)
+ {
+ char *bigImagePath = trackDbSettingClosestToHome(tdb, ITEM_BIG_IMAGE_PATH);
+ char *bothWords[2];
+ int shouldBeTwo = chopLine(imagePath, bothWords);
+ if (shouldBeTwo != 2)
+ errAbort("itemImagePath setting for %s track incorrect. Needs to be \"itemImagePath <path> <suffix>\".", tdb->tableName);
+ printf("<BR><IMG SRC=\"%s/%s.%s\"><BR><BR>\n", bothWords[0], item, bothWords[1]);
+ shouldBeTwo = chopLine(bigImagePath, bothWords);
+ if (shouldBeTwo != 2)
+ errAbort("bigItemImagePath setting for %s track incorrect. Needs to be \"itemImagePath <path> <suffix>\".", tdb->tableName);
+ printf("<A HREF=\"%s/%s.%s\">Download Original Image</A><BR>\n", bothWords[0], item, bothWords[1]);
+ }
+
printTrackHtml(tdb);
freez(&dupe);
hFreeConn(&conn);
}