4d8114dc7e4b1fc59020916ba13a525f669b9517
tdreszer
  Wed Aug 31 15:37:18 2011 -0700
Bob and I figured out that if there is no cart set of for a user on the Denmark mirror, then the link to it needs c, l and r passed in the link.
diff --git src/hg/hgc/rnaFoldClick.c src/hg/hgc/rnaFoldClick.c
index 42883d1..bbe2a52 100644
--- src/hg/hgc/rnaFoldClick.c
+++ src/hg/hgc/rnaFoldClick.c
@@ -360,64 +360,64 @@
 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=\"../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&o=%d&t=%d&g=evofold&i=%s",
-database, item->chromStart, item->chromEnd, cgiEncode(item->name));
+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></p>", "click here to go to genome-mirror.moma.ki.au.dk.");
 }
 
 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');
 
 safef(fileName, sizeof(fileName), "/gbdb/%s/evoFoldV2/%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=\"../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&o=%d&t=%d&g=evofoldV2&i=%s",
-database, item->chromStart, item->chromEnd, cgiEncode(item->name));
+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></p>", "click here to go to genome-mirror.moma.ki.au.dk.");
 }
 
 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;
 char *mafTrack = trackDbRequiredSetting(tdb, "mafTrack");
 int start = cartInt(cart, "o");