b3660684338a45c565fb79c89a72479941b7b2bd
braney
Thu Jun 2 14:31:26 2016 -0700
some tweaks to longRange support #15232
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index ad042cb..61dc8b1 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -3954,36 +3954,50 @@
errAbort("cannot find long range item with id %d\n", itemNum);
struct aveStats *as = aveStatsCalc(doubleArray, count);
printf("Item you clicked on:
\n");
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];
+sprintLongWithCommas(num1Buf, ourLongRange->s);
+sprintLongWithCommas(num2Buf, ourLongRange->e);
if (differentString(ourLongRange->sChrom, ourLongRange->eChrom))
- printf("Link to range covered by interaction.
\n",
- ourLongRange->sChrom, ourLongRange->s - 20, ourLongRange->s + 20);
+ {
+ printf("Interchromosomal: (Position on chrom you clicked on) %s:%s-%s
\n",
+ ourLongRange->sChrom, num1Buf,num1Buf);
+ printf("Position on other chromosome: %s:%s-%s
\n",
+ ourLongRange->eChrom, num2Buf, num2Buf);
+ }
else
+ {
+ char num3Buf[1024];
+ sprintLongWithCommas(num3Buf, ourLongRange->e - ourLongRange->s);
+ printf("Intrachromosomal: %s:%s-%s (%sbp)
\n",
+ ourLongRange->sChrom, num1Buf, num2Buf, num3Buf);
printf("Link to range covered by interaction.
\n",
ourLongRange->sChrom, s, e);
+ }
printf("
Statistics on the scores of all items in window (go to track controls to set minimum score to display):\n");
printf("
Q1 | %f |
median | %f |
Q3 | %f |
average | %f |
min | %f |
max | %f |
count | %d |
total | %f |
standard deviation | %f |