bd0b0a42ee56a2e20728a1e4d5002127c724e72d
tdreszer
  Mon Jun 25 17:08:25 2012 -0700
Next batch of many checkins as dictated by Jim.  Formatting space after 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.  Only affect is to my sanity and Jim's.
diff --git src/hg/hgc/rnaFoldClick.c src/hg/hgc/rnaFoldClick.c
index 044a744..fe557c6 100644
--- src/hg/hgc/rnaFoldClick.c
+++ src/hg/hgc/rnaFoldClick.c
@@ -279,38 +279,54 @@
     freeMem(scoreColorFormat);
     }
 for (i = 0; i < N; i++)
     freeMem(mafColorFormats[i]);
 freeMem(mafColorFormats);
 }
 
 void mafAndFoldLegend(FILE *f)
 /* Print legend for the maf and fold section */
 {
 char *s          = "0123456789";
 int colorFormat[] = {0,1,2,3,4,5,6,7,8,9};
 int colors[]      = {0x999999,0x888888,0x777777,0x666666,0x555555,0x444444,0x333333,0x222222,0x111111,0x000000};
 fprintf(f, "<h3> Color legend </h3>");
 fprintf(f, "<TABLE BORDER=0>");
-fprintf(f, "<TR> <TD style='color:#%06X;'> GRAY:       </TD> <TD> Not part of annotated pair, no substitution. <BR>             </TD> </TR>", LTGRAY);
-fprintf(f, "<TR> <TD style='color:#%06X;'> LT. PURPLE: </TD> <TD> Not part of annotated pair, substitution. <BR>                </TD> </TR>", LTPURPLE);
-fprintf(f, "<TR> <TD style='color:#%06X;'> BLACK:      </TD> <TD> Compatible with annotated pair, no substitutions.<BR>         </TD> </TR>", BLACK);
-fprintf(f, "<TR> <TD style='color:#%06X;'> BLUE:       </TD> <TD> Compatible with annotated pair, single substitution.<BR>      </TD> </TR>", BLUE);
-fprintf(f, "<TR> <TD style='color:#%06X;'> GREEN:      </TD> <TD> Compatible with annotated pair, double substitution.<BR>      </TD> </TR>", GREEN);
-fprintf(f, "<TR> <TD style='color:#%06X;'> RED:        </TD> <TD> Not compatible with annotated pair, single substitution. <BR> </TD> </TR>", RED);
-fprintf(f, "<TR> <TD style='color:#%06X;'> ORANGE:     </TD> <TD> Not compatible with annotated pair, double substitution. <BR> </TD> </TR>", ORANGE);
-fprintf(f, "<TR> <TD style='color:#%06X;'> MAGENTA:    </TD> <TD> Not compatible with annotated pair, involves gap. <BR>        </TD> </TR>", MAGENTA);
+fprintf(f, "<TR> <TD style='color:#%06X;'> GRAY:       </TD> "
+           "<TD> Not part of annotated pair, no substitution. <BR>             </TD> </TR>",
+           LTGRAY);
+fprintf(f, "<TR> <TD style='color:#%06X;'> LT. PURPLE: </TD> "
+           "<TD> Not part of annotated pair, substitution. <BR>                </TD> </TR>",
+           LTPURPLE);
+fprintf(f, "<TR> <TD style='color:#%06X;'> BLACK:      </TD> "
+           "<TD> Compatible with annotated pair, no substitutions.<BR>         </TD> </TR>",
+           BLACK);
+fprintf(f, "<TR> <TD style='color:#%06X;'> BLUE:       </TD> "
+           "<TD> Compatible with annotated pair, single substitution.<BR>      </TD> </TR>",
+           BLUE);
+fprintf(f, "<TR> <TD style='color:#%06X;'> GREEN:      </TD> "
+           "<TD> Compatible with annotated pair, double substitution.<BR>      </TD> </TR>",
+           GREEN);
+fprintf(f, "<TR> <TD style='color:#%06X;'> RED:        </TD> "
+           "<TD> Not compatible with annotated pair, single substitution. <BR> </TD> </TR>",
+           RED);
+fprintf(f, "<TR> <TD style='color:#%06X;'> ORANGE:     </TD> "
+           "<TD> Not compatible with annotated pair, double substitution. <BR> </TD> </TR>",
+           ORANGE);
+fprintf(f, "<TR> <TD style='color:#%06X;'> MAGENTA:    </TD> "
+           "<TD> Not compatible with annotated pair, involves gap. <BR>        </TD> </TR>",
+           MAGENTA);
 fprintf(f, "</TABLE>");
 /* Score legend */
 fprintf(f, "<BR>SCORE:   min ");
 htmlColorPrintString(f, s, colorFormat, colors, 0);
 fprintf(f, " max");
 }
 
 struct mafAli *mafFromRnaSecStrItem(char *mafTrack, struct rnaSecStr *item)
 {
 struct mafAli *maf;
 maf = hgMafFrag(database, mafTrack, item->chrom, item->chromStart, item->chromEnd, item->strand[0], NULL, NULL);
 return maf;
 }
 
 void mafSortBySpeciesOrder(struct mafAli *maf, char *speciesOrder)
@@ -350,41 +366,44 @@
 struct dnaSeq *seq;
 seq = hChromSeq(database, item->chrom, item->chromStart, item->chromEnd);
 touppers(seq->dna);
 if (item->strand[0] == '-')
     reverseComplement(seq->dna, seq->size);
 memSwapChar(seq->dna, seq->size, 'T', 'U');
 
 safef(fileName, sizeof(fileName), "/gbdb/%s/evoFold/%s/%s.png",
        database, item->chrom, item->name);
 if (fileExists(fileName))
     {
     fprintf(f, "<center><h2> RNA secondary structure drawing </h2></center>");
     fprintf(f,"<B>");
 
     // Could consider to serve up all EvoFold .png files from our public server in the future
-    // fprintf(f,"<IMG SRC=\"http://genome.ucsc.edu/evoFold/%s/%s/%s.png\" border = '2' ALT=\"ERROR: VARA plotting failed.\"</B><BR>",
+    // fprintf(f,"<IMG SRC=\"http://genome.ucsc.edu/evoFold/%s/%s/%s.png\" border = '2' "
+    //           "ALT=\"ERROR: VARA plotting failed.\"</B><BR>",
     fprintf(f,"<IMG SRC=\"../evoFold/%s/%s/%s.png\" border = '2' ALT=\"ERROR: symlink to file not found.\"</B><BR>",
             database, item->chrom, item->name);
     fprintf(f,"</B>");
     }
 
 freeMem(seq);
 printf("<p>The UCSC Genome Browser mirror site at the Molecular Diagnostic Laboratory (MDL) at Aarhus University Hospital Skejby in Denmark offers a VARNA Java applet to view the above RNA structure with more options, ");
 printf("<A HREF=\"");
-printf("http://genome-mirror.moma.ki.au.dk/cgi-bin/hgc?db=%s&c=%s&l=%d&r=%d&o=%d&t=%d&g=evofold&i=%s",
-database, item->chrom, item->chromStart, item->chromEnd, item->chromStart, item->chromEnd, cgiEncode(item->name)); // c, l and r are needed because mirror may have no cart for us.  Not actually used, however.
+printf("http://genome-mirror.moma.ki.au.dk/cgi-bin/hgc?db=%s&c=%s&l=%d&r=%d&o=%d&t=%d"
+        "&g=evofold&i=%s",database, item->chrom, item->chromStart, item->chromEnd, 
+        item->chromStart, item->chromEnd, cgiEncode(item->name)); 
+        // c, l and r are needed because mirror may have no cart for us. Not actually used, however.
 printf("\" TARGET=_blank>%s</A>.", "click here to go to genome-mirror.moma.ki.au.dk");
 fprintf(f,"  <B><FONT COLOR = RED>NOTE:</FONT> some operating system/browser combinations require ");
 fprintf(f," the latest version of Java for this to work properly.</FONT></B></P>");
 }
 
 void htmlPrintSecStrEvofoldV2Drawing(FILE *f, struct rnaSecStr *item)
 {
 char fileName[512];
 struct dnaSeq *seq;
 seq = hChromSeq(database, item->chrom, item->chromStart, item->chromEnd);
 touppers(seq->dna);
 if (item->strand[0] == '-')
     reverseComplement(seq->dna, seq->size);
 memSwapChar(seq->dna, seq->size, 'T', 'U');
 
@@ -393,32 +412,34 @@
 if (fileExists(fileName))
     {
     fprintf(f, "<center><h2> RNA secondary structure drawing </h2></center>");
     fprintf(f,"<B>");
 
     // Could consider to serve up all EvoFold .png files from our public server in the future
     // fprintf(f,"<IMG SRC=\"http://genome.ucsc.edu/evoFold/%s/%s/%s.png\" border = '2' ALT=\"ERROR: VARA plotting failed.\"</B><BR>",
     fprintf(f,"<IMG SRC=\"../evoFoldV2/%s/%s/%s.png\" border = '2' ALT=\"ERROR:  symlink to file not found.\"</B><BR>",
             database, item->chrom, item->name);
     fprintf(f,"</B>");
     }
 
 freeMem(seq);
 printf("<p>The UCSC Genome Browser mirror site at the Molecular Diagnostic Laboratory (MDL) at Aarhus University Hospital Skejby in Denmark offers a VARNA Java applet to view the above RNA structure with more options, ");
 printf("<A HREF=\"");
-printf("http://genome-mirror.moma.ki.au.dk/cgi-bin/hgc?db=%s&c=%s&l=%d&r=%d&o=%d&t=%d&g=evofoldV2&i=%s",
-database, item->chrom, item->chromStart, item->chromEnd, item->chromStart, item->chromEnd, cgiEncode(item->name));  // c, l and r are needed because mirror may have no cart for us.  Not actually used, however.
+printf("http://genome-mirror.moma.ki.au.dk/cgi-bin/hgc?db=%s&c=%s&l=%d&r=%d&o=%d&t=%d"
+        "&g=evofoldV2&i=%s", database, item->chrom, item->chromStart, item->chromEnd, 
+        item->chromStart, item->chromEnd, cgiEncode(item->name));  
+        // c, l and r are needed because mirror may have no cart for us. Not actually used, however.
 printf("\" TARGET=_blank>%s</A>.", "click here to go to genome-mirror.moma.ki.au.dk");
 fprintf(f," <B><FONT COLOR = RED>NOTE:</FONT> some operating system/browser combinations require ");
 fprintf(f," the latest version of Java for this to work properly.</FONT></B></P>");
 }
 
 void doRnaSecStr(struct trackDb *tdb, char *itemName)
 /* Handle click on rnaSecStr type elements. */
 {
 char *table = tdb->table;
 struct sqlConnection *conn = hAllocConn(database);
 struct sqlResult *sr;
 struct rnaSecStr *item;
 char extraWhere[256];
 char **row;
 int  rowOffset = 0;