df52d842cf575c8b1f250baed87aa0b937f385a8
kate
  Thu Jan 26 14:09:50 2017 -0800
Initial cut of hgTracks and hgTrackUi for new barchart type track (generalization of GTEx gene expression display). refs #18736

diff --git src/hg/lib/trackDbCustom.c src/hg/lib/trackDbCustom.c
index ea12cf7..b4dcc9b 100644
--- src/hg/lib/trackDbCustom.c
+++ src/hg/lib/trackDbCustom.c
@@ -214,31 +214,32 @@
 /* Return TRUE if we can pack this type. */
 {
 char *t = cloneString(type);
 char *s = firstWordInLine(t);
 boolean canPack = (sameString("psl", s) || sameString("chain", s) ||
                    sameString("bed", s) || sameString("genePred", s) ||
 		   sameString("bigBed", s) || sameString("makeItems", s) ||
 		   sameString("bigMaf", s) || sameString("bigGenePred", s) || 
                    sameString("expRatio", s) || sameString("wigMaf", s) ||
                    sameString("factorSource", s) || sameString("bed5FloatScore", s) ||
 		   sameString("bed6FloatScore", s) || sameString("altGraphX", s) ||
 		   sameString("bam", s) || sameString("bedDetail", s) ||
 		   sameString("bed8Attrs", s) || sameString("gvf", s) ||
 		   sameString("vcfTabix", s) || sameString("vcf", s) || sameString("pgSnp", s) ||
 		   sameString("narrowPeak", s) || sameString("broadPeak", s) || 
-                   sameString("peptideMapping", s));
+                   sameString("peptideMapping", s) || sameString("barChart", s)
+                   );
 freeMem(t);
 return canPack;
 }
 
 
 
 void trackDbPolish(struct trackDb *bt)
 /* Fill in missing values with defaults. */
 {
 if (bt->shortLabel == NULL)
     bt->shortLabel = cloneString(bt->track);
 if (bt->longLabel == NULL)
     bt->longLabel = cloneString(bt->shortLabel);
 if (bt->altColorR == 0 && bt->altColorG == 0 && bt->altColorB == 0)
     {
@@ -699,30 +700,32 @@
 	    }
 	}
     }
 else if(startsWith("chain",type) || startsWith("bigChain",type))
     cType = cfgChain;
 else if (startsWith("bamWig", type))
     cType = cfgWig;
 else if (startsWith("bam", type))
     cType = cfgBam;
 else if (startsWith("psl", type) || startsWith("bigPsl", type))
     cType = cfgPsl;
 else if (sameWord("vcfTabix",type) || sameWord("vcf", type))
     cType = cfgVcf;
 else if (sameWord("halSnake",type))
     cType = cfgSnake;
+else if (sameWord("barChart",type))
+    cType = cfgBarChart;
 // TODO: Only these are configurable so far
 
 if (cType == cfgNone && warnIfNecessary)
     {
     if (!startsWith("bed ", type) && !startsWith("bedDetail", type) && !startsWith("bigBed", type)
 	&& !startsWith("gvf", type) && !sameString("pgSnp", type)
         && subgroupFind(tdb, "view", NULL))
         warn("Track type \"%s\" is not yet supported in multi-view composites for %s.",type,tdb->track);
     }
 return cType;
 }
 
 int configurableByAjax(struct trackDb *tdb, eCfgType cfgTypeIfKnown)
 // Is this track configurable by right-click popup, or in hgTrackUi subCfg?
 // returns 0 = no; <0=explicitly blocked;  >0=allowed and will be cfgType if determined