9723799cf6f1a8fb714ae1493b224b8e91aebf09 tdreszer Mon Jul 30 12:17:38 2012 -0700 Making final pass through tree of checkins as dictated by Jim. None of these changes should affect executables in any way. This pass is due to expanding fingerprint caused by kompare. diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 33310cf..1df21c5 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -2655,32 +2655,31 @@ innerLine(hvg, x1, midY, w, color); } if (!hideArrows) { if ((intronGap == 0) && (vis == tvFull || vis == tvPack)) { if (lf->highlightColor && (lf->highlightMode == highlightOutline)) clippedBarbs(hvg, x1, midY, w, tl.barbHeight, tl.barbSpacing, lf->orientation, lf->highlightColor, FALSE); else clippedBarbs(hvg, x1, midY, w, tl.barbHeight, tl.barbSpacing, lf->orientation, bColor, FALSE); } } -components = (lf->codons && zoomedToCdsColorLevel) ? - lf->codons : lf->components; +components = (lf->codons && zoomedToCdsColorLevel) ? lf->codons : lf->components; for (sf = components; sf != NULL; sf = sf->next) { s = sf->start; e = sf->end; /* Draw UTR portion(s) of exon, if any: */ if (s < tallStart) { e2 = e; if (e2 > tallStart) e2 = tallStart; if (lf->highlightColor && (lf->highlightMode == highlightOutline)) { drawScaledBoxSample(hvg, s, e2, scale, xOff, y+shortOff , shortHeight , lf->highlightColor, lf->score); drawScaledBoxSample(hvg, s, e2, scale, xOff + 1, y+shortOff + 1, shortHeight - 2, color, lf->score); @@ -2762,32 +2761,32 @@ { /* If highlighting differences between aligned sequence and genome when * zoomed way out, this must be done in a separate pass after exons are * drawn so that exons sharing the pixel don't overdraw differences. */ if (indelShowQueryInsert || indelShowPolyA) baseColorOverdrawQInsert(tg, lf, hvg, xOff, y, scale, heightPer, mrnaSeq, psl, winStart, drawOpt, indelShowQueryInsert, indelShowPolyA); baseColorOverdrawDiff(tg, lf, hvg, xOff, y, scale, heightPer, mrnaSeq, psl, winStart, drawOpt); baseColorDrawCleanup(lf, &mrnaSeq, &psl); } } static void lfSeriesDrawConnecter(struct linkedFeaturesSeries *lfs, - struct hvGfx *hvg, int start, int end, double scale, int xOff, int midY, - Color color, Color bColor, enum trackVisibility vis) + struct hvGfx *hvg, int start, int end, double scale, int xOff, + int midY, Color color, Color bColor, enum trackVisibility vis) /* Draw connection between two sets of linked features. */ { if (start != -1 && !lfs->noLine) { int x1 = round((double)((int)start-winStart)*scale) + xOff; int x2 = round((double)((int)end-winStart)*scale) + xOff; int w = x2-x1; if (w > 0) { if (vis == tvFull || vis == tvPack) clippedBarbs(hvg, x1, midY, w, tl.barbHeight, tl.barbSpacing, lfs->orientation, bColor, TRUE); hvGfxLine(hvg, x1, midY, x2, midY, color); } } @@ -3534,32 +3533,31 @@ void linkedFeaturesSeriesMethods(struct track *tg) /* Fill in track methods for linked features.series */ { tg->freeItems = freeLinkedFeaturesSeriesItems; tg->drawItems = linkedFeaturesSeriesDraw; tg->drawItemAt = linkedFeaturesSeriesDrawAt; tg->itemName = linkedFeaturesSeriesName; tg->mapItemName = linkedFeaturesSeriesName; tg->totalHeight = tgFixedTotalHeightNoOverflow; tg->itemHeight = tgFixedItemHeight; tg->itemStart = linkedFeaturesSeriesItemStart; tg->itemEnd = linkedFeaturesSeriesItemEnd; } -struct linkedFeatures *lfFromBedExtra(struct bed *bed, int scoreMin, - int scoreMax) +struct linkedFeatures *lfFromBedExtra(struct bed *bed, int scoreMin, int scoreMax) /* Return a linked feature from a (full) bed. */ { struct linkedFeatures *lf; struct simpleFeature *sf, *sfList = NULL; int grayIx = grayInRange(bed->score, scoreMin, scoreMax); int *starts = bed->chromStarts, start; int *sizes = bed->blockSizes; int blockCount = bed->blockCount, i; assert(starts != NULL && sizes != NULL && blockCount > 0); AllocVar(lf); lf->grayIx = grayIx; lf->name = cloneString(bed->name); lf->orientation = orientFromChar(bed->strand[0]); @@ -9038,32 +9036,31 @@ MgFont *font, Color color, enum trackVisibility vis) /* Draw triangle items. Relies mostly on bedDrawSimple, but does put * a horizontal box connecting items in full mode. */ { /* In dense mode try and draw golden background for promoter regions. */ if (vis == tvDense) { if (hTableExists(database, "esRegUpstreamRegion")) { int heightPer = tg->heightPer; Color gold = hvGfxFindColorIx(hvg, 250,190,60); int rowOffset; double scale = scaleForPixels(width); struct sqlConnection *conn = hAllocConn(database); struct sqlResult *sr = hRangeQuery(conn, "esRegUpstreamRegion", - chromName, winStart, winEnd, - NULL, &rowOffset); + chromName, winStart, winEnd, NULL, &rowOffset); char **row; while ((row = sqlNextRow(sr)) != NULL) { int start, end; row += rowOffset; start = atoi(row[1]); end = atoi(row[2]); drawScaledBox(hvg, start, end, scale, xOff, yOff, heightPer, gold); } hFreeConn(&conn); } } bedDrawSimple(tg, seqStart, seqEnd, hvg, xOff, yOff, width, font, color, vis); } @@ -11946,32 +11943,31 @@ tg->items = motif; } int logoHeight(struct track *tg, enum trackVisibility vis) /* set up size of sequence logo */ { if (tg->items == NULL) tg->height = tg->lineHeight; else tg->height = 52; return tg->height; } -void logoMethods(struct track *track, struct trackDb *tdb, - int argc, char *argv[]) +void logoMethods(struct track *track, struct trackDb *tdb, int argc, char *argv[]) /* Load up logo type methods. */ { track->loadItems = logoLoad; track->drawLeftLabels = logoLeftLabels; track->drawItems = logoDrawSimple; track->totalHeight = logoHeight; track->mapsSelf = TRUE; } #endif /* GBROWSE */ static void remoteDrawItems(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis) { @@ -12270,33 +12266,31 @@ 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) { struct bed *bed = item; -genericMapItem(tg, hvg, item, - bed->name, bed->name, start, end, - x, y, width, height); +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*/ { char query[LARGEBUF]; char *sequenceTable = trackDbRequiredSetting(tg->tdb, "pubsSequenceTable"); char *selectValSql = NULL; if (getSnippet) selectValSql = "replace(replace(snippet, \"<B>\", \"\\n>>> \"), \"</B>\", \" <<<\\n\")"; else selectValSql = "concat(substr(sequence,1,4),\"...\",substr(sequence,-4))"; safef(query, sizeof(query), "SELECT annotId, %s FROM %s WHERE articleId='%s' ", selectValSql, sequenceTable, articleId);