a81abec91d32883ce04fdb3e944b933ef38664a9
max
  Thu Aug 22 17:53:15 2013 -0700
comment change
diff --git src/hg/hgTracks/pubsTracks.c src/hg/hgTracks/pubsTracks.c
index 1965bdd..2ed4933 100644
--- src/hg/hgTracks/pubsTracks.c
+++ src/hg/hgTracks/pubsTracks.c
@@ -447,30 +447,31 @@
 }
 
 static char *pubsMarkerItemName(struct track *tg, void *item)
 /* retrieve article count from score field and return.*/
 {
 struct bed *bed = item;
 char newName[64];
 safef(newName, sizeof(newName), "%d articles", (int) bed->score);
 return cloneString(newName);
 }
 
 static void pubsMarkerMapItem(struct track *tg, struct hvGfx *hvg, void *item,
                               char *itemName, char *mapItemName, int start, int end,
                               int x, int y, int width, int height)
 {
+/* make sure that mapItem is the bed->name field, not the itemName */
 struct bed *bed = item;
 genericMapItem(tg, hvg, item, bed->name, bed->name, start, end, x, y, width, height);
 }
 
 static struct hash* pubsLookupSequences(struct track *tg, struct sqlConnection* conn, char *articleId, bool getSnippet)
 /* create a hash with a mapping annotId -> snippet or annotId -> shortSeq for an articleId*/
 {
     struct dyString *dy = dyStringNew(LARGEBUF);
     char *sequenceTable = trackDbRequiredSetting(tg->tdb, "pubsSequenceTable");
 
     // work around sql injection fix problem, suggested by galt
     sqlDyStringPrintf(dy, "SELECT annotId, ");
 
      if (getSnippet)
         dyStringAppend(dy, "replace(replace(snippet, \"<B>\", \"\\n>>> \"), \"</B>\", \" <<<\\n\")" );
@@ -566,19 +567,19 @@
 }
 
 void pubsBlatMethods(struct track *tg)
 /* publication blat tracks are bed12+2 tracks of sequences in text, mapped with BLAT */
 {
 //bedMethods(tg);
 tg->loadItems = pubsLoadKeywordYearItems;
 tg->itemName  = pubsItemName;
 tg->itemColor = pubsItemColor;
 tg->mapItem   = pubsMapItem;
 }
 
 void pubsMarkerMethods(struct track *tg)
 /* publication marker tracks are bed5 tracks of genome marker occurences like rsXXXX found in text*/
 {
-tg->mapItem   = pubsMarkerMapItem;
 tg->itemName  = pubsMarkerItemName;
+tg->mapItem   = pubsMarkerMapItem;
 }