43db719c3cd215749bb0b9e1de5358eb364a8c0a
braney
  Tue Sep 11 09:52:02 2012 -0700
move things around in the printf in hgGene that prints out the transcript start and stop, and CDS start and stop (#8249)
diff --git src/hg/hgGene/hgGene.c src/hg/hgGene/hgGene.c
index 1d3e568..2f6b77b 100644
--- src/hg/hgGene/hgGene.c
+++ src/hg/hgGene/hgGene.c
@@ -240,66 +240,63 @@
     }
 return dyStringCannibalize(&description);
 }
 
 static void printDescription(char *id, struct sqlConnection *conn)
 /* Print out description of gene given ID. */
 {
 char *description = descriptionString(id, conn);
 int  i, exonCnt = 0, cdsExonCnt = 0;
 int  cdsStart, cdsEnd;
 
 hPrintf("%s", description);
 freez(&description);
 
 /* print genome position and size */
-char asciiNumber[1024];
-hPrintf("<B>Transcription Chromosome:</B> %s\n", curGeneChrom);
-hPrintf("&nbsp;&nbsp;<B>Strand:</B> %s\n", curGenePred->strand);
-sprintLongWithCommas(asciiNumber, (long long)curGeneEnd - curGeneStart);
-hPrintf("&nbsp;&nbsp;<B>Size:</B> %s\n", asciiNumber);
-sprintLongWithCommas(asciiNumber, (long long) curGeneStart);
-hPrintf("&nbsp;&nbsp;<B>Start:</B> %s\n", asciiNumber);
-sprintLongWithCommas(asciiNumber, (long long)curGeneEnd);
-hPrintf("&nbsp;&nbsp;<B>End:</B> %s\n", asciiNumber);
-
-/* print exon count(s) */
+char buffer[1024];
+char *commaPos;
+   
 exonCnt = curGenePred->exonCount;
-hPrintf("&nbsp;&nbsp;<B>Exon Count:</B> %d\n", exonCnt);
+safef(buffer, sizeof buffer, "%s:%d-%d", curGeneChrom, curGeneStart+1, curGeneEnd);
+commaPos = addCommasToPos(database, buffer);
+
+hPrintf("<B>Transcript</B><br>\n");
+hPrintf("&nbsp&nbsp<B>Position:</B>&nbsp%s&nbsp",commaPos);
+sprintLongWithCommas(buffer, (long long)curGeneEnd - curGeneStart);
+hPrintf("<B>Size:</B>&nbsp%s&nbsp", buffer);
+hPrintf("<B>Exon Count:</B>&nbsp%d&nbsp", exonCnt);
+hPrintf("<B>Strand:</B>&nbsp%s<br>\n",curGenePred->strand);
 
 cdsStart= curGenePred->cdsStart;
 cdsEnd  = curGenePred->cdsEnd;
 
 /* count CDS exons */
 if (cdsStart < cdsEnd)
     {
     for (i=0; i<exonCnt; i++)
 	{
 	if ( (cdsStart <= curGenePred->exonEnds[i]) &&
 	     (cdsEnd >= curGenePred->exonStarts[i]) )
 	     cdsExonCnt++;
 	}
-    /* print CDS exon count only if it is different than exonCnt */
-    hPrintf("<BR>");
-    hPrintf("<B>Coding&nbsp;&nbsp;");
-    sprintLongWithCommas(asciiNumber, (long long)cdsEnd - cdsStart);
-    hPrintf("Size:</B> %s\n", asciiNumber);
-    sprintLongWithCommas(asciiNumber, (long long) cdsStart);
-    hPrintf("<B>Start:</B> %s\n", asciiNumber);
-    sprintLongWithCommas(asciiNumber, (long long)cdsEnd );
-    hPrintf("&nbsp;&nbsp;<B>End:</B> %s\n", asciiNumber);
-    hPrintf("<B>Exon Count:</B> %d\n", cdsExonCnt);
+    hPrintf("<B>Coding Region</B><br>\n");
+    safef(buffer, sizeof buffer, "%s:%d-%d", curGeneChrom, cdsStart+1, cdsEnd);
+    commaPos = addCommasToPos(database, buffer);
+    hPrintf("&nbsp&nbsp<B>Position:</B>&nbsp%s&nbsp",commaPos);
+    sprintLongWithCommas(buffer, (long long)cdsEnd - cdsStart);
+    hPrintf("<B>Size:</B>&nbsp%s&nbsp", buffer);
+    hPrintf("<B>Coding Exon Count:</B>&nbsp%d&nbsp\n", cdsExonCnt);
     }
 fflush(stdout);
 }
 
 char *sectionSetting(struct section *section, char *name)
 /* Return section setting value if it exists. */
 {
 return hashFindVal(section->settings, name);
 }
 
 char *sectionRequiredSetting(struct section *section, char *name)
 /* Return section setting.  Squawk and die if it doesn't exist. */
 {
 char *res = sectionSetting(section, name);
 if (res == NULL)