15973bdabacf5ddf5dd9289d05e83a7cd4080dbb
braney
  Tue Nov 9 09:12:48 2021 -0800
support for bigRmsk from Robert Hubley robert.hubley@isbscience.org

diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index f048759..7b39967 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -18,30 +18,31 @@
 #include "chainCart.h"
 #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 "bigRmskUi.h"
 #include "bigWig.h"
 #include "regexHelper.h"
 #include "snakeUi.h"
 #include "vcfUi.h"
 #include "vcf.h"
 #include "errCatch.h"
 #include "samAlignment.h"
 #include "makeItemsItem.h"
 #include "bedDetail.h"
 #include "pgSnp.h"
 #include "memgfx.h"
 #include "trackHub.h"
 #include "gtexUi.h"
 #include "genbank.h"
 #include "htmlPage.h"
@@ -4505,30 +4506,53 @@
 for (tdbRef = *tdbRefList; tdbRef != NULL; tdbRef = tdbRef->next)
     {
     struct trackDb *tdb = tdbRef->val;
     safef(htmlIdentifier, sizeof(htmlIdentifier), "%s.priority", tdb->track);
     char *cartHas = cartOptionalString(cart,htmlIdentifier);
     if (cartHas != NULL)
 	{
 	tdb->priority = atof(cartHas);
 	cartPriorities = TRUE;
 	}
     }
 slSort(tdbRefList, trackDbRefCmp);
 return cartPriorities;
 }
 
+void bigRmskCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed)
+/* UI for the bigRmsk track */
+{
+boxed = cfgBeginBoxAndTitle(tdb, boxed, title);
+boolean showUnalignedExtents = cartUsualBoolean(cart, BIGRMSK_SHOW_UNALIGNED_EXTENTS, BIGRMSK_SHOW_UNALIGNED_EXTENTS_DEFAULT);
+boolean showLabels = cartUsualBoolean(cart, BIGRMSK_SHOW_LABELS, BIGRMSK_SHOW_LABELS_DEFAULT);
+boolean origPackViz = cartUsualBoolean(cart, BIGRMSK_ORIG_PACKVIZ, BIGRMSK_ORIG_PACKVIZ_DEFAULT);
+boolean regexpFilter = cartUsualBoolean(cart, BIGRMSK_REGEXP_FILTER, BIGRMSK_REGEXP_FILTER_DEFAULT);
+char * nameFilter = cartUsualString(cart, BIGRMSK_NAME_FILTER, BIGRMSK_NAME_FILTER_DEFAULT);
+puts("<br>");
+printf("<b>Filter by 'name#class/subclass' field (e.g. '*Alu*' would match 'FRAM#SINE/Alu'):</b> ");
+cgiMakeTextVar(BIGRMSK_NAME_FILTER, cartUsualString(cart, BIGRMSK_NAME_FILTER, nameFilter), 20);
+cgiMakeCheckBox(BIGRMSK_REGEXP_FILTER, regexpFilter);
+puts("&nbsp;<B>regular expression</B></P>");
+cgiMakeCheckBox(BIGRMSK_SHOW_UNALIGNED_EXTENTS, showUnalignedExtents);
+puts("&nbsp;<B>Show unaligned repeat regions</B></P>");
+cgiMakeCheckBox(BIGRMSK_SHOW_LABELS, showLabels);
+puts("&nbsp;<B>Show annotation labels</B></P>");
+cgiMakeCheckBox(BIGRMSK_ORIG_PACKVIZ, origPackViz);
+puts("&nbsp;<B>Display original pack visualization</B></P>");
+cfgEndBox(boxed);
+}
+
 void lollyCfgUi(char *db, struct cart *cart, struct trackDb *tdb, char *name, char *title, boolean boxed)
 /* UI for the wiggle track */
 {
 int maxHeightPixels;
 int minHeightPixels;
 char option[256];
 int defaultHeight;  /*  pixels per item */
 int settingsDefault;
 
 #define MIN_HEIGHT_LOLLY        32
 cartTdbFetchMinMaxPixels(cart, tdb, MIN_HEIGHT_LOLLY, atoi(DEFAULT_HEIGHT_PER), atoi(DEFAULT_HEIGHT_PER),
                                 &minHeightPixels, &maxHeightPixels, &settingsDefault, &defaultHeight);
 
 boxed = cfgBeginBoxAndTitle(tdb, boxed, title);
 printf("<TABLE BORDER=0>");
@@ -4743,30 +4767,32 @@
 			break;
     case cfgBam:        bamCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgVcf:        vcfCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgLong:       longRangeCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgSnake:      snakeCfgUi(cart, tdb, prefix, title, boxed);
 			break;
     case cfgPsl:        pslCfgUi(db,cart,tdb,prefix,title,boxed);
                         break;
     case cfgBarChart:   barChartCfgUi(db,cart,tdb,prefix,title,boxed);
                         break;
     case cfgInteract:   interactCfgUi(db,cart,tdb,prefix,title,boxed);
                         break;
+    case cfgBigRmsk:    bigRmskCfgUi(db,cart,tdb,prefix,title,boxed);
+                        break;
     case cfgLollipop:   lollyCfgUi(db,cart,tdb,prefix,title,boxed);
 			scoreCfgUi(db, cart,tdb,prefix,title,1000,boxed);
                         break;
     case cfgHic:        hicCfgUi(db,cart,tdb,prefix,title,boxed);
                         break;
     case cfgBigDbSnp:   bigDbSnpCfgUi(db, cart, tdb, prefix, title, boxed);
                         break;
     default:            warn("Track type is not known to multi-view composites. type is: %d ",
 			     cType);
 			break;
     }
 }
 
 char *encodeRestrictionDate(char *db,struct trackDb *trackDb,boolean excludePast)
 // Create a string for ENCODE restriction date of this track