6e5ee11ca95cd971984038cf65bae00d9c898707 galt Wed Jun 4 15:40:02 2014 -0700 Since we have git, it is easy to rename errabort.c to errAbort.c without losing any history. diff --git src/isPcr/webPcr/webPcr.c src/isPcr/webPcr/webPcr.c index cc1ede2..ebb31b8 100644 --- src/isPcr/webPcr/webPcr.c +++ src/isPcr/webPcr/webPcr.c @@ -1,182 +1,182 @@ /* webPcr - Web CGI Program For Fast In-Silico PCR Using gfServer. */ /* Copyright 2004 Jim Kent. All rights reserved. */ #include "common.h" #include "linefile.h" #include "hash.h" -#include "errabort.h" +#include "errAbort.h" #include "errCatch.h" #include "htmshell.h" #include "dnautil.h" #include "dnaseq.h" #include "cheapcgi.h" #include "gfPcrLib.h" #include "gfWebLib.h" void usage() /* Explain usage and exit. */ { errAbort( "webPcr - Web CGI Program For Fast In-Silico PCR Using gfServer\n" "This program is not generally meant to be run from the command line.\n" ); } struct gfWebConfig *cfg; /* Our configuration. */ void doGetPrimers(char *fPrimer, char *rPrimer, int maxSize, int minPerfect, int minGood) /* Put up form to get primers. */ { struct gfServerAt *server; printf("
"); gfPcrOutputWriteAll(gpoList, "fa", NULL, "stdout"); printf(""); ok = TRUE; } else errAbort("No matches to %s %s in %s", fPrimer, rPrimer, server->name); } errCatchEnd(errCatch); if (errCatch->gotError) { warn("%s", errCatch->message->string); } errCatchFree(&errCatch); return ok; } void doHelp() /* Print up help page */ { puts( "
\n" ">chr22:31000551+31001000 TAACAGATTGATGATGCATGAAATGGG CCCATGAGTGGCTCCTAAAGCAGCTGC\n" "TtACAGATTGATGATGCATGAAATGGGgggtggccaggggtggggggtga\n" "gactgcagagaaaggcagggctggttcataacaagctttgtgcgtcccaa\n" "tatgacagctgaagttttccaggggctgatggtgagccagtgagggtaag\n" "tacacagaacatcctagagaaaccctcattccttaaagattaaaaataaa\n" "gacttgctgtctgtaagggattggattatcctatttgagaaattctgtta\n" "tccagaatggcttaccccacaatgctgaaaagtgtgtaccgtaatctcaa\n" "agcaagctcctcctcagacagagaaacaccagccgtcacaggaagcaaag\n" "aaattggcttcacttttaaggtgaatccagaacccagatgtcagagctcc\n" "aagcactttgctctcagctccacGCAGCTGCTTTAGGAGCCACTCATGaG\n" "\n" "The + between the coordinates in the fasta header indicates that\n" "this is on the positive strand. \n" ); } void doMiddle() /* Parse out CGI variables and decide which page to put up. */ { int maxSize = 4000; int minPerfect = 15; int minGood = 15; char *fPrimer = ""; char *rPrimer = ""; if (cgiVarExists("wp_size")) maxSize = cgiInt("wp_size"); if (cgiVarExists("wp_perfect")) minPerfect = cgiInt("wp_perfect"); if (cgiVarExists("wp_good")) minGood = cgiInt("wp_good"); if (minPerfect < 15) minPerfect = 15; if (minGood < minPerfect) minGood = minPerfect; if (cgiVarExists("wp_help")) { doHelp(); return; } else if (cgiVarExists("wp_f") && cgiVarExists("wp_r")) { fPrimer = gfPcrMakePrimer(cgiString("wp_f")); rPrimer = gfPcrMakePrimer(cgiString("wp_r")); if (doPcr(fPrimer, rPrimer, maxSize, minPerfect, minGood)) return; } doGetPrimers(fPrimer, rPrimer, maxSize, minPerfect, minGood); } int main(int argc, char *argv[]) /* Process command line. */ { boolean isFromWeb = cgiIsOnWeb(); htmlPushEarlyHandlers(); dnaUtilOpen(); cfg = gfWebConfigRead("webPcr.cfg"); if (!isFromWeb && !cgiSpoof(&argc, argv)) usage(); if (cfg->background != NULL) { htmlSetBackground(cfg->background); } htmShell("In-Silico PCR", doMiddle, NULL); return 0; }