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/hui.c src/hg/lib/hui.c
index 1f1abd8..2d81000 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -35,30 +35,31 @@
#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"
#include "longRange.h"
#include "tagRepo.h"
+#include "barChartUi.h"
#define SMALLBUF 256
#define MAX_SUBGROUP 9
#define ADD_BUTTON_LABEL "add"
#define CLEAR_BUTTON_LABEL "clear"
#define JBUFSIZE 2048
#define PM_BUTTON "
\n"
#define DEF_BUTTON "
\n"
#define DEFAULT_BUTTON(nameOrId,anc,beg,contains) \
printf(DEF_BUTTON,(nameOrId),(beg),(contains),(nameOrId),(beg),(contains),(anc), \
"defaults_sm.png","default")
@@ -4034,30 +4035,32 @@
break;
case cfgNetAlign: netAlignCfgUi(db,cart,tdb,prefix,title,boxed);
break;
case cfgBedFilt: bedFiltCfgUi(cart,tdb,prefix,title, boxed);
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;
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
// if return is not null, then free it after use
{
if (!trackDb)
return NULL;
char *date = NULL;
@@ -8472,30 +8475,32 @@
// TODO: standardize to a wig as
//else if (tdbIsBigWig(tdb))
// asObj = asObjFrombigBed(conn,tdb);
else if (tdbIsLongTabix(tdb))
asObj = longTabixAsObj();
else if (tdbIsBam(tdb))
asObj = bamAsObj();
else if (tdbIsVcf(tdb))
asObj = vcfAsObj();
else if (startsWithWord("makeItems", tdb->type))
asObj = makeItemsItemAsObj();
else if (sameWord("bedDetail", tdb->type))
asObj = bedDetailAsObj();
else if (sameWord("pgSnp", tdb->type))
asObj = pgSnpAsObj();
+else if (sameWord("barChart", tdb->type))
+ asObj = asParseText(barChartAutoSqlString);
else
asObj = asFromTableDescriptions(conn, tdb->table);
return asObj;
}
struct asObject *asForTdb(struct sqlConnection *conn, struct trackDb *tdb)
// Get autoSQL description if any associated with table, ignoring errAborts if any.
{
struct errCatch *errCatch = errCatchNew();
struct asObject *asObj = NULL;
// Wrap some error catching around asForTdbOrDie.
if (errCatchStart(errCatch))
{
asObj = asForTdbOrDie(conn, tdb);
}