6ee3fe36febedef865d3cb3fa7e7116b96fd71f1 larrym Thu Mar 22 23:09:21 2012 -0700 mark pubsMarker items as bed5 so the article count is correct; fix some indentation diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 16b6743..5a23e83 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -12380,41 +12380,39 @@ loadSimpleBedAsLinkedFeaturesPerBase(tg); //tg->items = simpleBedListToLinkedFeatures(tg->items, tg->bedSize, TRUE, FALSE); //if (! (hashFindVal(tdb->settingsHash, "pubsMarkerTable"))) enum trackVisibility vis = tg->visibility; if (vis == tvDense || vis == tvSquish) return; struct linkedFeatures *lf = NULL; for (lf = tg->items; lf != NULL; lf = lf->next) lf->extra = lf->name; } char *pubsMarkerItemName(struct track *tg, void *item) /* retrieve article count from score field and return.*/ { -//struct bed *bed = item; struct linkedFeatures *lf = item; char newName[64]; safef(newName, sizeof(newName), "%d articles", (int) lf->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) -/* use previously saved itemName for the mouseOver */ { struct linkedFeatures *lf = item; genericMapItem(tg, hvg, item, lf->extra, lf->extra, 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*/ { char query[LARGEBUF]; char *sequenceTable = trackDbRequiredSetting(tg->tdb, "pubsSequenceTable"); char *selectValSql = NULL; if (getSnippet) selectValSql = "replace(replace(snippet, \"<B>\", \"-->\"), \"</B>\", \"<--\")"; @@ -12501,32 +12499,33 @@ activatePslTrackIfCgi(tg); tg->loadItems = pubsPslLoadItems; tg->itemName = pubsItemName; tg->mapItem = pubsMapItem; } static void pubsBlatMethods(struct track *tg) /* publication blat tracks are bed12+2 tracks of sequences in text, mapped with BLAT */ { tg->loadItems = pubsLoadItems; tg->itemName = pubsItemName; tg->mapItem = pubsMapItem; } static void pubsMarkerMethods(struct track *tg) -/* publication marker tracks are bed4 tracks of genome marker occurences like rsXXXX found in text*/ +/* publication marker tracks are bed5 tracks of genome marker occurences like rsXXXX found in text*/ { +tg->bedSize = 5; tg->loadItems= pubsLoadMarkerItem; tg->mapItem = pubsMarkerMapItem; tg->itemName = pubsMarkerItemName; } void fillInFromType(struct track *track, struct trackDb *tdb) /* Fill in various function pointers in track from type field of tdb. */ { char *typeLine = tdb->type, *words[8], *type; int wordCount; if (typeLine == NULL) return; wordCount = chopLine(cloneString(typeLine), words); if (wordCount <= 0) return;