4a6269f418d09ffca133c40f0a138e115d0f895a
tdreszer
Mon Jul 23 11:55:38 2012 -0700
Make subtracks in dense use composite, not view label as noticed by gencode hub user Andrea. Also add a space between 'for' and '('. Can this really be justified?
diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 8f87ba6..5151590 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -374,32 +374,32 @@
/*print out a box along the DNA bases that toggles a cart variable
* "complement" to complement the DNA bases at the top by the ruler*/
{
struct dyString *ui = uiStateUrlPart(toggleGroup);
x = hvGfxAdjXW(hvg, x, width);
if (theImgBox && curImgTrack)
{
char link[512];
safef(link,sizeof(link),"%s?complement_%s=%d&%s", hgTracksName(), database,
!cartUsualBooleanDb(cart, database, COMPLEMENT_BASES_VAR, FALSE),ui->string);
imgTrackAddMapItem(curImgTrack,link,(char *)(message != NULL?message:NULL),x, y, x+width, y+height, NULL);
}
else
{
hPrintf("string);
freeDyString(&ui);
if (message != NULL)
mapStatusMessage("%s", message);
hPrintf(">\n");
}
}
char *trackUrl(char *mapName, char *chromName)
/* Return hgTrackUi url; chromName is optional. */
{
char *encodedMapName = cgiEncode(mapName);
char buf[2048];
if(chromName == NULL)
safef(buf, sizeof(buf), "%s?%s=%u&g=%s", hgTrackUiName(), cartSessionVarName(), cartSessionId(cart), encodedMapName);
@@ -574,40 +574,40 @@
break;
}
}
}
void fillInStartEndBands(struct track *ideoTrack, char *startBand, char *endBand, int buffSize)
/* Loop through the bands and fill in the one that the current window starts
on and ends on. */
{
struct cytoBand *cb = NULL, *cbList = ideoTrack->items;
for(cb = cbList; cb != NULL; cb = cb->next)
{
/* If the start or end is encompassed by this band fill
it in. */
- if(winStart >= cb->chromStart &&
- winStart <= cb->chromEnd)
+ if (winStart >= cb->chromStart
+ && winStart <= cb->chromEnd)
{
safef(startBand, buffSize, "%s", cb->name);
}
/* End is > rather than >= due to odditiy in the
cytoband track where the starts and ends of two
bands overlaps by one. */
- if(winEnd > cb->chromStart &&
- winEnd <= cb->chromEnd)
+ if (winEnd > cb->chromStart
+ && winEnd <= cb->chromEnd)
{
safef(endBand, buffSize, "%s", cb->name);
}
}
}
void makeChromIdeoImage(struct track **pTrackList, char *psOutput,
struct tempName *ideoTn)
/* Make an ideogram image of the chromsome and our position in it. If the
* ideoTn parameter is not NULL, it is filled in if the ideogram is created. */
{
struct track *ideoTrack = NULL;
MgFont *font = tl.font;
char *mapName = "ideoMap";
struct hvGfx *hvg;
@@ -669,32 +669,32 @@
{
trashDirFile(ideoTn, "hgtIdeo", "hgtIdeo", ".png");
hvg = hvGfxOpenPng(ideoWidth, ideoHeight, ideoTn->forCgi, FALSE);
}
hvg->rc = revCmplDisp;
initColors(hvg);
ideoTrack->ixColor = hvGfxFindRgb(hvg, &ideoTrack->color);
ideoTrack->ixAltColor = hvGfxFindRgb(hvg, &ideoTrack->altColor);
hvGfxSetClip(hvg, 0, gfxBorder, ideoWidth, ideoTrack->height);
if (sameString(startBand, endBand))
safef(title, sizeof(title), "%s (%s)", chromName, startBand);
else
safef(title, sizeof(title), "%s (%s-%s)", chromName, startBand, endBand);
textWidth = mgFontStringWidth(font, title);
hvGfxTextCentered(hvg, 2, gfxBorder, textWidth, ideoTrack->height, MG_BLACK, font, title);
- ideoTrack->drawItems(ideoTrack, winStart, winEnd, hvg, textWidth+4, gfxBorder, ideoWidth-textWidth-4,
- font, ideoTrack->ixColor, ideoTrack->limitedVis);
+ ideoTrack->drawItems(ideoTrack, winStart, winEnd, hvg, textWidth+4, gfxBorder,
+ ideoWidth-textWidth-4, font, ideoTrack->ixColor, ideoTrack->limitedVis);
hvGfxUnclip(hvg);
/* Save out picture and tell html file about it. */
hvGfxClose(&hvg);
/* Finish map. */
if (!psOutput)
hPrintf("\n");
}
hPrintf("