4cab7f311cadce7428c1d7e1c4dfdcb0d3a43033 angie Wed Jul 27 10:32:19 2011 -0700 Feature #3710 (vcfTabix UI options): Added controls for selection of centervariant for haplotype clustering/sorting. Also, some hgc improvements: made the Genotype Details table into a collapsible section; better display of QUAL and FILTER column values, which also involved improving the representation of those columns in src/inc/vcf.h. diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 1364274..134c590 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -16,30 +16,31 @@ #include "chainDb.h" #include "netCart.h" #include "obscure.h" #include "wiggle.h" #include "phyloTree.h" #include "hgMaf.h" #include "udc.h" #include "customTrack.h" #include "encode/encodePeak.h" #include "mdb.h" #include "web.h" #include "hPrint.h" #include "fileUi.h" #include "bigBed.h" #include "bigWig.h" +#include "vcfUi.h" static char const rcsid[] = "$Id: hui.c,v 1.297 2010/06/02 19:27:51 tdreszer Exp $"; #define SMALLBUF 128 #define MAX_SUBGROUP 9 #define ADD_BUTTON_LABEL "add" #define CLEAR_BUTTON_LABEL "clear" #define JBUFSIZE 2048 //#define PM_BUTTON "<A NAME=\"%s\"></A><A HREF=\"#%s\"><IMG height=18 width=18 onclick=\"return (setCheckBoxesThatContain('%s',%s,true,'%s','','%s') == false);\" id=\"btn_%s\" src=\"../images/%s\" alt=\"%s\"></A>\n" //#define DEF_BUTTON "<A NAME=\"%s\"></A><A HREF=\"#%s\"><IMG onclick=\"setCheckBoxesThatContain('%s',true,false,'%s','','%s'); return (setCheckBoxesThatContain('%s',false,false,'%s','_defOff','%s') == false);\" id=\"btn_%s\" src=\"../images/%s\" alt=\"%s\"></A>\n" //#define DEFAULT_BUTTON(nameOrId,anc,beg,contains) printf(DEF_BUTTON,(anc),(anc),(nameOrId), (beg),(contains),(nameOrId),(beg),(contains),(anc),"defaults_sm.png","default") //#define PLUS_BUTTON(nameOrId,anc,beg,contains) printf(PM_BUTTON, (anc),(anc),(nameOrId),"true", (beg),(contains),(anc),"add_sm.gif", "+") //#define MINUS_BUTTON(nameOrId,anc,beg,contains) printf(PM_BUTTON, (anc),(anc),(nameOrId),"false",(beg),(contains),(anc),"remove_sm.gif","-") #define PM_BUTTON "<IMG height=18 width=18 onclick=\"setCheckBoxesThatContain('%s',%s,true,'%s','','%s');\" id=\"btn_%s\" src=\"../images/%s\" alt=\"%s\">\n" @@ -3718,30 +3719,32 @@ break; case cfgWigMaf: wigMafCfgUi(cart,tdb,prefix,title,boxed, db); break; case cfgGenePred: genePredCfgUi(cart,tdb,prefix,title,boxed); break; case cfgChain: chainCfgUi(db,cart,tdb,prefix,title,boxed, NULL); break; case cfgNetAlign: netAlignCfgUi(db,cart,tdb,prefix,title,boxed); break; case cfgBedFilt: bedUi(tdb,cart,title, boxed); break; #ifdef USE_BAM case cfgBam: bamCfgUi(cart, tdb, prefix, title, boxed); break; #endif + case cfgVcf: vcfCfgUi(cart, tdb, prefix, title, boxed); + break; case cfgPsl: pslCfgUi(db,cart,tdb,prefix,title,boxed); break; default: warn("Track type is not known to multi-view composites. type is: %d ", cType); break; } } char *encodeRestrictionDateDisplay(char *db,struct trackDb *trackDb) /* Create a string for ENCODE restriction date of this track if return is not null, then free it after use */ { if (!trackDb) return NULL; boolean addMonths = FALSE; @@ -4248,57 +4251,57 @@ /* safef into javascript a sequence of commands that will force a refresh * of this same form, updating the values of whatever variables are necessary * to say what we want to do. */ { safef(javascript, JBUFSIZE*sizeof(char), "document.%s.action = '%s'; document.%s.%s.value='%s'; " "document.%s.submit();", formName, cgiScriptName(), formName, buttonVar, label, formName); } #define MANY_SUBTRACKS 8 #define WIGGLE_HELP_PAGE "../goldenPath/help/hgWiggleTrackHelp.html" -static boolean cfgBeginBoxAndTitle(struct trackDb *tdb, boolean boxed, char *title) +boolean cfgBeginBoxAndTitle(struct trackDb *tdb, boolean boxed, char *title) /* Handle start of box and title for individual track type settings */ { if(!boxed) { boxed = trackDbSettingOn(tdb,"boxedCfg"); if(boxed) printf("<BR>"); } if (boxed) { printf("<TABLE class='blueBox"); char *view = tdbGetViewName(tdb); if(view != NULL) printf(" %s",view); printf("' style='background-color:%s;'><TR><TD>", COLOR_BG_ALTDEFAULT); if (title) printf("<CENTER><B>%s Configuration</B></CENTER>\n", title); } else if (title) printf("<p><B>%s </b>", title ); else printf("<p>"); return boxed; } -static void cfgEndBox(boolean boxed) +void cfgEndBox(boolean boxed) /* Handle end of box and title for individual track type settings */ { if (boxed) puts("</td></tr></table>"); } void wigCfgUi(struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed) /* UI for the wiggle track */ { char *typeLine = NULL; /* to parse the trackDb type line */ char *words[8]; /* to parse the trackDb type line */ int wordCount = 0; /* to parse the trackDb type line */ char option[256]; double minY; /* from trackDb or cart */ double maxY; /* from trackDb or cart */