66b676451210374b93cbfb156ee3f7d49a8da31e aamp Sun Apr 3 15:30:30 2011 -0700 Removed filtering chainlist bits just to get the CGI at a usable speed diff --git src/hg/hgLiftOver/hgLiftOver.c src/hg/hgLiftOver/hgLiftOver.c index 117e915..733571e 100644 --- src/hg/hgLiftOver/hgLiftOver.c +++ src/hg/hgLiftOver/hgLiftOver.c @@ -1,612 +1,612 @@ /* hgLiftOver - CGI-script to convert coordinates using chain files */ #include "common.h" #include "errabort.h" #include "hCommon.h" #include "jksql.h" #include "portable.h" #include "linefile.h" #include "dnautil.h" #include "fa.h" #include "cheapcgi.h" #include "htmshell.h" #include "hdb.h" #include "hui.h" #include "cart.h" #include "web.h" #include "hash.h" #include "liftOver.h" #include "liftOverChain.h" static char const rcsid[] = "$Id: hgLiftOver.c,v 1.62 2009/07/14 20:17:30 markd Exp $"; /* CGI Variables */ #define HGLFT_USERDATA_VAR "hglft_userData" /* typed/pasted in data */ #define HGLFT_DATAFILE_VAR "hglft_dataFile" /* file of data to convert */ #define HGLFT_DATAFORMAT_VAR "hglft_dataFormat" /* format of data to convert */ #define HGLFT_FROMORG_VAR "hglft_fromOrg" /* FROM organism */ #define HGLFT_FROMDB_VAR "hglft_fromDb" /* FROM assembly */ #define HGLFT_TOORG_VAR "hglft_toOrg" /* TO organism */ #define HGLFT_TODB_VAR "hglft_toDb" /* TO assembly */ #define HGLFT_ERRORHELP_VAR "hglft_errorHelp" /* Print explanatory text */ #define HGLFT_REFRESHONLY_VAR "hglft_doRefreshOnly" /* Just refresh drop-down lists */ /* liftOver options: */ #define HGLFT_MINMATCH "hglft_minMatch" #define HGLFT_MINSIZEQ "hglft_minSizeQ" #define HGLFT_MINCHAINT "hglft_minChainT" #define HGLFT_MULTIPLE "hglft_multiple" #define HGLFT_MINBLOCKS "hglft_minBlocks" #define HGLFT_FUDGETHICK "hglft_fudgeThick" /* Global Variables */ struct cart *cart; /* CGI and other variables */ struct hash *oldVars = NULL; /* Data Formats */ #define POSITION_FORMAT "Position" #define BED_FORMAT "BED" #define WIGGLE_FORMAT "Wiggle" char *formatList[] = {BED_FORMAT, POSITION_FORMAT, 0}; #define DEFAULT_FORMAT "BED" /* Filename prefix */ #define HGLFT "hglft" /* Javascript to support New Assembly pulldown when Orig Assembly changes */ /* Copies selected value from the Original Assembly pulldown to a hidden form */ char *onChange = "onchange=\"document.mainForm." HGLFT_REFRESHONLY_VAR ".value = 1;" "document.mainForm.submit();\""; void webMain(struct liftOverChain *chain, char *dataFormat, boolean multiple) /* set up page for entering data */ { struct dbDb *dbList; char *fromOrg = hArchiveOrganism(chain->fromDb), *toOrg = hArchiveOrganism(chain->toDb); cgiParagraph( "This tool converts genome coordinates and genome annotation files " "between assemblies. " "The input data can be pasted into the text box, or uploaded from a file. " "If a pair of assemblies cannot be selected from the pull-down menus," " a direct lift between them is unavailable. " "However, a sequential lift may be possible. " "Example: lift from Mouse, May 2004, to Mouse, Feb. 2006, and then from Mouse, " "Feb. 2006 to Mouse, July 2007 to achieve a lift from mm5 to mm9. " ""); /* create HMTL form */ puts("