406740c2dc67f2bb8e217627dcbbe00a204fd594 kate Mon Dec 4 15:37:32 2017 -0800 Add support for item color, using Ensembl extension (RGB instead of value). http://www.ensembl.org/info/website/upload/pairwise.html diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c index 95243f9..3442af4 100644 --- src/hg/hgc/hgc.c +++ src/hg/hgc/hgc.c @@ -4034,33 +4034,33 @@ AllocArray(doubleArray, count); int ii = 0; for(longRange = longRangeList; longRange; longRange = longRange->next, ii++) { if (longRange->id == itemNum) { ourLongRange = longRange; } doubleArray[ii] = longRange->score; } if (ourLongRange == NULL) errAbort("cannot find long range item with id %d\n", itemNum); -struct aveStats *as = aveStatsCalc(doubleArray, count); - printf("Item you clicked on:
\n"); +if (!ourLongRange->hasColor) + // if there's color, then there's no score in this format printf("Score: %g
\n", ourLongRange->score); printf("ID: %u
\n", ourLongRange->id); unsigned padding = (ourLongRange->e - ourLongRange->s) / 10; int s = ourLongRange->s - padding; int e = ourLongRange->e + padding; if (s < 0 ) s = 0; int chromSize = hChromSize(database, seqName); if (e > chromSize) e = chromSize; char num1Buf[1024],num2Buf[1024]; char num3Buf[1024],num4Buf[1024]; char num5Buf[1024],num6Buf[1024]; char num7Buf[1024]; @@ -4081,30 +4081,35 @@ ourLongRange->eChrom, num3Buf, num4Buf, ourLongRange->eChrom, num3Buf, num4Buf, num6Buf); } else { printf("Lower region: "); printf("%s:%s-%s (%sbp)
\n", ourLongRange->sChrom, num1Buf,num2Buf, ourLongRange->sChrom, num1Buf,num2Buf, num5Buf); printf("Upper region: "); printf("%s:%s-%s (%sbp)

\n", ourLongRange->eChrom, num3Buf, num4Buf, ourLongRange->eChrom, num3Buf, num4Buf, num6Buf); printf("Intrachromasomal interaction region: "); printf("%s:%s-%s (%sbp)

\n", ourLongRange->eChrom, num1Buf, num4Buf, ourLongRange->eChrom, num1Buf, num4Buf, num7Buf); } +if (ourLongRange->hasColor) + return; + +struct aveStats *as = aveStatsCalc(doubleArray, count); + printf("
Statistics on the scores of all items in window (go to track controls to set minimum score to display):\n"); printf("\n"); printf("\n", as->q1); printf("\n", as->median); printf("\n", as->q3); printf("\n", as->average); printf("\n", as->minVal); printf("\n", as->maxVal); printf("\n", as->count); printf("\n", as->total); printf("\n", as->stdDev); printf("
Q1%f
median%f
Q3%f
average%f
min%f
max%f
count%d
total%f
standard deviation%f
\n"); }