5b97c90762187cf1993742fe8c422308e08d082c tdreszer Wed Jul 11 17:08:55 2012 -0700 Next batch of many checkins as dictated by Jim. Formatting if and limiting lines to 100 chars. Changes limited to lines last touched by tdreszer (git blame) so as not to ruin history. None of these changes should affect executables in any way. diff --git src/hg/hgTracks/expRatioTracks.c src/hg/hgTracks/expRatioTracks.c index 651acee..853afdf 100644 --- src/hg/hgTracks/expRatioTracks.c +++ src/hg/hgTracks/expRatioTracks.c @@ -169,40 +169,41 @@ void mapBoxHcTwoItems(struct hvGfx *hvg, int start, int end, int x, int y, int width, int height, char *track, char *item1, char *item2, char *statusLine) /* Print out image map rectangle that would invoke the htc (human track click) * program. */ { char *encodedItem1 = cgiEncode(item1); char *encodedItem2 = cgiEncode(item2); x = hvGfxAdjXW(hvg, x, width); if(theImgBox && curImgTrack) { char link[512]; safef(link,sizeof(link),"%s&c=%s&o=%d&t=%d&g=%s&i=%s&i2=%s", // NOTE: winStart,winEnd removed due to portal hgcNameAndSettings(), chromName, start, end, track, encodedItem1, encodedItem2); #ifdef IMAGEv2_SHORT_MAPITEMS if(x < insideX && x+width > insideX) - warn("mapBoxHcTwoItems(%s) map item spanning slices. LX:%d TY:%d RX:%d BY:%d link:[%s]",track,x, y, x+width, y+height, link); + warn("mapBoxHcTwoItems(%s) map item spanning slices. LX:%d TY:%d RX:%d BY:%d link:[%s]", + track,x, y, x+width, y+height, link); #endif//def IMAGEv2_SHORT_MAPITEMS imgTrackAddMapItem(curImgTrack,link,statusLine,x, y, x+width, y+height, track); } else { hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", x, y, x+width, y+height); hPrintf("HREF=\"%s&o=%d&t=%d&g=%s&i=%s&i2=%s&c=%s&l=%d&r=%d&db=%s&pix=%d\" ", - hgcNameAndSettings(), start, end, track, encodedItem1, encodedItem2,chromName, winStart, winEnd, - database, tl.picWidth); + hgcNameAndSettings(), start, end, track, encodedItem1, encodedItem2,chromName, + winStart, winEnd, database, tl.picWidth); hPrintf("TITLE=\"%s\">\n", statusLine); } freeMem(encodedItem1); freeMem(encodedItem2); } int affyUclaNormIndexForName(char *string) /* Return the index in sorting as provided by Allen Day at UCLA. */ { int i = 0; char *tissues[] = {"adipose tissue", "abdominal aorta", "cartilage", "ligament", "tendon", "adrenal gland", "pancreas", "thyroid gland", "pituitary gland", "bone marrow", "lymph node", "spleen", "thymus", "mammary gland", "body skin", "cardiac muscle", "skeletal muscle", @@ -215,32 +216,32 @@ "oesophagus", "stomach", "liver", "kidney", "ureter", "urinary bladder", "ovary", "placenta", "uterus", "prostate gland", "testis", "lung", "trachea", "monocyte", "chondrocyte", "granulocyte"}; for(i = 0; i < ArraySize(tissues); i++) { if(sameWord(tissues[i], string)) return i; } /* If no match. */ /* warn("Can't match %s in affyUclaNorm.", string); */ return -1; } -void lfsMapItemName(struct track *tg, struct hvGfx *hvg, void *item, char *itemName, char *mapItemName, int start, int end, - int x, int y, int width, int height) +void lfsMapItemName(struct track *tg, struct hvGfx *hvg, void *item, char *itemName, + char *mapItemName, int start, int end, int x, int y, int width, int height) { if(tg->visibility != tvDense && tg->visibility != tvHide) mapBoxHcTwoItems(hvg, start, end, x,y, width, height, tg->track, itemName, itemName, itemName); } struct linkedFeaturesSeries *lfsFromMsBedSimple(struct bed *bedList, char *name) /* create a lfs containing all beds on a single line */ { struct linkedFeaturesSeries *lfs = NULL, *lfsList = NULL; struct linkedFeatures *lf; struct bed *bed = NULL; if(bedList == NULL) return NULL; @@ -1422,37 +1423,39 @@ totalHeight = nExps * lineHeight; if ((nProbes > MICROARRAY_CLICK_LIMIT) && !(sameString(tg->table, "expRatioUCSFDemo") || sameString(tg->table, "cnvLungBroadv2") || sameString(tg->table, "CGHBreastCancerUCSF") || sameString(tg->table, "expBreastCancerUCSF")) ) { int xOffRc = hvGfxAdjXW(hvg, xOff, insideWidth); if(theImgBox && curImgTrack) { char link[512]; #if defined(IMAGEv2_DRAG_SCROLL_SZ) && (IMAGEv2_DRAG_SCROLL_SZ > 1) // Tim isn't sure what to do here if/when we implement drag scroll. warn("Tim take a look at this link and whether it needs different winStart and winEnd values with dragScroll > 1."); #endif safef(link,sizeof(link),"%s&c=%s&o=%d&t=%d&g=%s&i=zoomInMore", hgcNameAndSettings(), chromName, seqStart, seqEnd, tg->track); #ifdef IMAGEv2_SHORT_MAPITEMS if(xOffRc < insideX && xOffRc+insideWidth > insideX) - warn("expRatioMapBoxes(%s) map item spanning slices. LX:%d TY:%d RX:%d BY:%d link:[%s]",tg->track,xOffRc, y, xOffRc+insideWidth, y+totalHeight, link); + warn("expRatioMapBoxes(%s) map item spanning slices. LX:%d TY:%d RX:%d BY:%d " + "link:[%s]",tg->track,xOffRc, y, xOffRc+insideWidth, y+totalHeight, link); #endif//def IMAGEv2_SHORT_MAPITEMS imgTrackAddMapItem(curImgTrack,link,"zoomInMore",xOffRc, y, xOffRc+insideWidth, y+totalHeight, tg->track); } else { - hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", xOffRc, y, xOffRc+insideWidth, y+totalHeight); + hPrintf("<AREA SHAPE=RECT COORDS=\"%d,%d,%d,%d\" ", + xOffRc, y, xOffRc+insideWidth, y+totalHeight); hPrintf("HREF=\"%s&c=%s&o=%d&t=%d&g=%s&c=%s&l=%d&r=%d&db=%s&i=zoomInMore\" ", hgcNameAndSettings(), chromName, seqStart, seqEnd, tg->track, chromName, winStart, winEnd, database); hPrintf("TITLE=\"zoomInMore\">\n"); } } else { struct linkedFeatures *probe; for (probe = probes; probe != NULL; probe = probe->next) { int x1 = round((double)((int)probe->start-winStart)*scale); int x2 = round((double)((int)probe->end-winStart)*scale); int w; if (x1 < 0) x1 = 0;